Skip to content

fix: read through the facade in the test suite (closes #30) - #31

Merged
danielhuici merged 2 commits into
reverseame:apotheosis2from
Dani-giron:k1-facade-draw-model
Sep 1, 2026
Merged

danielhuici merged 2 commits into
reverseame:apotheosis2from
Dani-giron:k1-facade-draw-model

Conversation

@Dani-giron

@Dani-giron Dani-giron commented Aug 7, 2026 •

Copy link
Copy Markdown

Summary

The apotheosis2 branch does not compile: the test suite added in #21 accesses Apotheosis::hnsw and Apotheosis::records, which #14 made private.

The root cause is that #14 was only partially implemented. Its Expected behavior specified draw_model(), len() and is_empty() on the facade; only the last two were added, so the tests had no facade method to read the graph structure through and reached into the private field instead.

Changes

  • src/controllers/apotheosis.rs: adds the missing draw_model(), delegating to Hnsw::draw_model(). It adds no state and no new invariant: it exposes for reading the same data draw() already writes out as GEXF.
  • The affected call sites move onto the facade: .hnsw.draw_model() becomes .draw_model() (13 sites) and .records.len() becomes the existing .len() (18 sites), across config_boundary.rs, config_matrix.rs, fitness_functions.rs, ann_correctness.rs and api_contract.rs. No test logic changed, only how each test reaches the data.

Test plan

Verified locally with the same commands CI runs: cargo clippy --all-targets --all-features -- -D warnings clean, cargo fmt --check clean, and all 44 tests passing.

Closes #30.

@Dani-giron

Copy link
Copy Markdown
Author

Merge order note for the current batch of open PRs.

#34, #35, #37 were branched from this PR's branch (k1-facade-draw-model), so they already carry these commits forward. Merging this one first avoids any duplicate-commit confusion when those three land afterward, they'll simply recompute clean against the updated apotheosis2.

I looked into retargeting their base branch to this one to make GitHub enforce the order, but that only works when the base branch exists in this repo; k1-facade-draw-model only exists on my fork, so it's not possible for cross-fork PRs. Documenting it here instead.

Recommended order: this one (#31) first.

@danielhuici
danielhuici merged commit 7797647 into reverseame:apotheosis2 Sep 1, 2026
12 checks passed
danielhuici added a commit to Dani-giron/APOTHEOSIS that referenced this pull request Sep 1, 2026
The documentation was written in July and reviewed against the code of
that moment. Meanwhile reverseame#24 (distance type in the dump/load header),
reverseame#25 (GEXF export extracted to export::gexf, gexf fork emits the
attribute schema), reverseame#27 (record constructors return Result) and reverseame#31
(facade read accessors) landed. Update the interface document, the
three views, the glossary and the README accordingly. Text only; the
C&C component model and diagrams are untouched.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants