fix: review follow-up — rag adapter crash, count/link false positives, hygiene - #7
Merged
Conversation
…, hygiene
Remaining findings from the library review:
- rag adapter read result.is_faithful, a field FaithfulnessResult has never
had (verified against installed attune-rag and its current source), so the
semantic layer crashed and degraded to a warning on every call. faithful
is now derived from unsupported_claims; calling from inside a running
event loop raises a clear error instead of asyncio.run's generic one.
- Count checker: values 1900-2099 near a source keyword are treated as
years unless the keyword directly follows the number, and keyword
matching now requires a leading word boundary ("test" no longer matches
"latest"). check_counts docstring aligned with actual skip behavior.
- Link checker: targets escaping project_root (../ traversal) yield a
warning instead of silently passing when the file exists elsewhere on
disk; site-absolute targets (/docs/page.md) resolve under project_root.
- FindingKind.CHECKER_ERROR replaces the repurposed UNRESOLVED_IMPORT for
checker infrastructure failures.
- Import resolution cached per call (one subprocess per distinct module).
- VerifyContext.judge typed Optional[Judge]; README status unstaled;
black enforced in CI and repo formatted.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Merged
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
The remaining findings from the library review (follow-up to #6). One turned out to be a live crash, not a comment problem.
rag adapter crashed on every call
The adapter read
result.is_faithful— a field attune-rag'sFaithfulnessResulthas never had (verified against installed attune-rag 0.1.23 and the current attune-rag source; its verdict is score/claims-based). Every semantic run raisedAttributeErrorand degraded to a warning.faithfulis now derived fromunsupported_claims, the translation lives in a unit-tested_to_verdict(), and calling the sync judge from inside a running event loop raises a clear, actionable error. The stale Phase-3 TODO and the wrong "verified against rag 0.2.0" protocol claim are gone.Count checker false positives
widgets=12(error severity → fails a clean doc). Values in 1900–2099 are now compared only when the source keyword directly follows the number — "2026 widgets" is still checked, so no recall loss (guarded by a hallucinated corpus case).testno longer matches insidelatest; plural drift (widget~widgets) still matches.check_countsdocstring no longer promises warnings the code never produced.Link checker root escape
../-traversal targets that happen to hit a real file outsideproject_root(e.g./etc/passwd) previously passed silently. Escapes now yield a warning (unverifiable as a project link — same "never a silent pass" rule as flags), and site-absolute targets (/docs/page.md) resolve underproject_rootinstead of the filesystem root.Hygiene
FindingKind.CHECKER_ERRORfor checker infra failures (was repurposingunresolved_import)VerifyContext.judgetypedOptional[Judge]Tests
pytest: 83 passed ·ruff+black --check: clean🤖 Generated with Claude Code