Text description
The apotheosis2 branch does not compile. The integration test suite added in #21 accesses Apotheosis::hnsw and Apotheosis::records directly, but both fields were made private in #14. Each change is correct on its own; together they do not build.
The root cause is that #14 was only partially implemented. Its Expected behavior stated that external read access "is served instead by draw_model(), len() and is_empty() on the Apotheosis facade". Only len() and is_empty() were added. draw_model() was never implemented, so the test suite had no facade method to read the graph structure through and reached into the private field instead.
Actual behavior
cargo test and cargo clippy --all-targets fail on apotheosis2 with 31 instances of E0616 across five test files:
error[E0616]: field `hnsw` of struct `apotheosis2::controllers::apotheosis::Apotheosis` is private
--> tests/config_matrix.rs:69:32
|
69 | let zero_layer_count = idx.hnsw.draw_model()[0].0.len();
| ^^^^ private field
[ ... redacted ... ]
error: could not compile `apotheosis2` (test "config_matrix") due to 9 previous errors
Affected files: config_boundary.rs (12), config_matrix.rs (9), fitness_functions.rs (6), ann_correctness.rs (3), api_contract.rs (1). tlsh_correctness.rs is unaffected.
Expected behavior
The branch compiles with the fields staying private. Apotheosis gains the read-only draw_model() accessor that #14 specified, delegating to the existing Hnsw::draw_model():
pub fn draw_model(&self) -> Vec<(Vec<usize>, Vec<(String, String, f32)>)> {
self.hnsw.draw_model()
}
This adds no state and no new invariant: it exposes for reading exactly the data draw() already writes out as GEXF.
The test suite then reads through the facade: .hnsw.draw_model() becomes .draw_model() (13 sites) and .records.len() becomes the existing .len() (18 sites). No test logic changes, only how each test reaches the data.
Text description
The
apotheosis2branch does not compile. The integration test suite added in #21 accessesApotheosis::hnswandApotheosis::recordsdirectly, but both fields were made private in #14. Each change is correct on its own; together they do not build.The root cause is that #14 was only partially implemented. Its Expected behavior stated that external read access "is served instead by
draw_model(),len()andis_empty()on theApotheosisfacade". Onlylen()andis_empty()were added.draw_model()was never implemented, so the test suite had no facade method to read the graph structure through and reached into the private field instead.Actual behavior
cargo testandcargo clippy --all-targetsfail onapotheosis2with 31 instances of E0616 across five test files:Affected files:
config_boundary.rs(12),config_matrix.rs(9),fitness_functions.rs(6),ann_correctness.rs(3),api_contract.rs(1).tlsh_correctness.rsis unaffected.Expected behavior
The branch compiles with the fields staying private.
Apotheosisgains the read-onlydraw_model()accessor that #14 specified, delegating to the existingHnsw::draw_model():This adds no state and no new invariant: it exposes for reading exactly the data
draw()already writes out as GEXF.The test suite then reads through the facade:
.hnsw.draw_model()becomes.draw_model()(13 sites) and.records.len()becomes the existing.len()(18 sites). No test logic changes, only how each test reaches the data.