1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//! VERIFICATION OF EXACT REMAINING GAP
//!
//! This test documents the specific gap preventing .geo workflow completion.
use std::path::Path;
/// The gap: magellan::CodeGraph::open() cannot open .geo files
///
/// ERROR: DB_COMPAT: not a sqlite database: ./code.geo
///
/// Root cause: magellan's CodeGraph::open() runs db_compat::preflight_sqlitegraph_compat()
/// which expects SQLite format. .geo files use GEODB binary format.
#[test]
#[cfg(feature = "geometric")]
fn verify_exact_gap_magellan_cannot_open_geo() {
use magellan::CodeGraph as MagellanGraph;
let geo_path = Path::new("./code.geo");
if !geo_path.exists() {
eprintln!("SKIP: ./code.geo not found");
return;
}
// This is what MagellanIntegration::open() calls internally
let result = MagellanGraph::open(geo_path);
// EXPECTED FAILURE: magellan::CodeGraph doesn't support .geo format
assert!(
result.is_err(),
"CONFIRMED: magellan::CodeGraph cannot open .geo files (expected)"
);
let err = result.err().unwrap();
let err_msg = format!("{}", err);
assert!(
err_msg.contains("DB_COMPAT") || err_msg.contains("not a sqlite database"),
"Error should be DB_COMPAT/sqlite mismatch: {}",
err_msg
);
eprintln!("CONFIRMED GAP: {}", err_msg);
}
/// Verify GeometricBackend CAN open .geo files (if accessible)
#[test]
#[cfg(feature = "geometric")]
fn verify_geometric_backend_can_open_geo() {
use magellan::graph::geometric_backend::GeometricBackend;
let geo_path = Path::new("./code.geo");
if !geo_path.exists() {
eprintln!("SKIP: ./code.geo not found");
return;
}
// GeometricBackend::open() is the correct API for .geo files
let result = GeometricBackend::open(geo_path);
// This SHOULD succeed - GeometricBackend understands GEODB format
assert!(
result.is_ok(),
"GeometricBackend should open .geo files, got: {:?}",
result.err()
);
eprintln!("CONFIRMED: GeometricBackend CAN open .geo files");
}