fix(intelligence): VOR read-path skips prose scan when explicit anchors exist - #34
Merged
Merged
Conversation
…rs exist Read-path re-scanned prose via _PATH_RE even when data.anchors were already captured at write-time. ADR body prose contains historical "X -> Y" paths, so a rename-sweep resurrected the old path and falsely REFUTED live nodes (ADR-7232a6e2ba34: src/utils/paths.py -> adapters/local_fs/windows.py). extract_anchors now accepts read_path=True; VerifyOnRead.run() passes it. When the node has explicit anchors the prose is not scanned, so historical paths never become checkable anchors. Legacy nodes without explicit anchors keep prose scanning (backward compat). Add regression tests: explicit anchors trusted on read-path, historical prose path not refuting live node, legacy node still refutes on real drift. Verified: 53 tests in test_verify_on_read.py + 28 in test_memory_retraction.py.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
added 2 commits
September 11, 2026 21:47
- AGENT_DIARY: session entry for PR #34 (extract_anchors read_path=True, prose skip when explicit anchors exist) + decision that 178s gate-zero is normal and pytest stays single-threaded. - WISDOM: "Commit overhead — НЕ баг" — 8-min commit = llama-server contention, not slow tests; basetemp race is known, do not fix.
…nto VOR read-path fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fix false REFUTED in VOR (VerifyOnRead, ADR-0003): read-path re-scanned the prose of ADR body via
_PATH_REeven when the node already had explicitdata.anchorscaptured at write-time. ADR bodies contain historicalX -> Ypaths, so a rename-sweep resurrected the old path as a checkable anchor and falsely refuted live nodes.Real case found:
ADR-7232a6e2ba34— its stored anchors (adapters/zed/zed_config.py,src/main.py,pkg:MCP) all still exist, but it was auto-REFUTED because prose/src/utils/paths.py → adapters/local_fs/windows.py(a git R083 rename) leaked into the anchor set.Root Cause
extract_anchors()(verify_on_read.py:290) extracted explicitdata.anchorsfirst, then ALSO scanned prose text. A rename described asold_path -> new_pathin the ADR body adds BOTH paths as anchors. The old path no longer exists → classify →SILENT_ABSENCE→ REFUTED.Fix
extract_anchors(..., read_path: bool = False)— new param.VerifyOnRead.run()passesread_path=Truefor the read-path call.data.anchors, prose is NOT scanned: historical paths never become checkable anchors. Explicit anchors remain authoritative.layer.pyare unchanged (defaultread_path=False).Tests
test_extract_anchors_read_path_trusts_explicit_anchors— prose history not extracted on read-path, backward compat without flag.test_read_path_prose_history_not_refuting_live_node— live node with explicit anchors stays VERIFIED despite historical path in body.test_read_path_prose_history_legacy_node_keeps_refuting— legacy node without anchors still refutes on real drift.Numbers (from EXPERIMENTS_LOG 2026-09-11)
git mvVerification
tests/test_verify_on_read.py: 53 passedtests/test_memory_retraction.py: 28 passed