fix(graph): exclude archived pages from kb.neighbors - #698
Conversation
|
the behaviour is right — neighbors was the one graph surface still serving archived pages while context expansion dropped them, and matching the two is correct. but the new # graph.py, this PR
try:
return store.get_page(node_id).status is not PageStatus.ARCHIVED
except ArtifactNotFoundError:
return False
# context.py:601-604, already on test
try:
return store.get_page(page_id).status is not PageStatus.ARCHIVED
except ArtifactNotFoundError:
return Falseidentical apart from the parameter name, and the comment you wrote — "match context._page_is_live" — says you knew where it lived. that matters more than usual here, because if the import direction is awkward (graph → context), the cleaner move is the one suggested on #708: promote a one smaller thing: |
Fixes vouchdev#696: _neighbor_ok filtered retracted claims but accepted any on-disk page, so archived titles still appeared in neighbors while context expansion already dropped them. pages now use a live-status check.
d57ea0c to
c4326ad
Compare
Upstream imported coerce_numeric but still used bare int()/float(), which left an unused-import ruff F401 that failed CI on vouchdev#713.
resolve the changelog union; both the vouchdev#696 archived-page filter and the vouchdev#716 edge-leak fix belong in the same section.
Summary
kb.neighbors/vouch neighborsno longer return archived pages._page_is_live); claims were already filtered.Fixes #696
Test plan
pytest tests/test_graph.pyruff checkon touched filesMade with Cursor