Harden coverage honesty, diff GONE gating, and key redaction - #22
Merged
Conversation
Deep-test + Codex adversarial audit findings, all with regression tests: - kstartup_api: fail closed to the crawl on duplicate/overlapping pages, id-less rows, or within-page duplicate ids — a repeated page could otherwise "prove" exhaustion while dropping the real tail (false proven=True). Exhaustion now requires distinct, non-empty ids. - diff_surveys: GONE/CLOSED is now allowed only for sources the current run proved it covered in full (run_manifest status=ok, exit 0). A partial (api-window/page-cap) or manifest-absent source has its removals suppressed (--assume-complete overrides for legacy dirs) so a partial crawl can never read as "all closed". - diff_surveys: first-time content_hash appearance is CHANGED (re-review), not UNCHANGED; profile carryover now requires ALL judgment axes; duplicate JSON keys are rejected (object_pairs_hook). - run_manifest: reject negative counts and status↔exit_code contradictions; refuse unknown manifest_schema_version (preserve as .corrupt) instead of a silent v1 rewrite; reject duplicate JSON keys on read. Tests: 220 passed, 1 skipped. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HNthU8pnPYv2vpEetXdK6P
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.
Deep dummy-data testing + Codex adversarial cross-audit surfaced real correctness/coverage/security gaps. All fixed with regression tests (220 passed, 1 skipped) plus offline persona E2E.
What changed
totalCountby row position and declareproven=Truewhile silently dropping the real tail.run_manifeststatus=ok, exit 0). Partial (api-window/page-cap) or manifest-absent sources have removals suppressed — a partial crawl can no longer read as "everything closed".--assume-completeoverrides for legacy/manifest-less dirs.content_hashappearance → CHANGED re-review (was UNCHANGED); profile carryover requires ALL judgment axes; duplicate JSON keys rejected.manifest_schema_versionpreserved as.corruptrather than silently rewritten; duplicate keys rejected on read.🤖 Generated with Claude Code
https://claude.ai/code/session_01HNthU8pnPYv2vpEetXdK6P