P3.30: fix CLAUDE.md stale/broken links; harden issue-3 doc guard - #71
Merged
Conversation
…tion regressions Issue #61 part A: CLAUDE.md still claims "Private repo." (repo is PUBLIC) and points at planning/PLAN.md / planning/APPROACH.md, which were relocated to gitignored prd/ in 9708fc9 and are no longer tracked. planning/KICKOFF_PROMPT.md carries the same broken pointers. New tests/test_claude_md_accuracy.py asserts neither -- currently failing. Issue #61 part B: a reviewer mutation-tested tests/test_doc_issue3_consistency.py and found it passes on real regressions, because _ISSUE3_RE is case-sensitive (misses "Issue #3") and the second test only matches one near-verbatim deleted sentence. Two new mutation tests reproduce both regressions against the current (unfixed) guard logic -- currently failing. Red state: 5 failed, 2 passed.
…sue-3 doc guard Part A: CLAUDE.md no longer claims "Private repo." (repo is PUBLIC) and no longer links planning/PLAN.md / planning/APPROACH.md, which were relocated to gitignored prd/ in 9708fc9. Pointers now name prd/PLAN.md and prd/APPROACH.md explicitly as local-only/gitignored, not tracked in this public repo. planning/KICKOFF_PROMPT.md's matching ./planning/APPROACH.md and ./planning/PLAN.md pointers fixed the same way. Part B: tests/test_doc_issue3_consistency.py hardened per the reviewer's mutation-testing findings -- _ISSUE3_RE generalized to a case-insensitive _TOPIC_RE covering "issue #3", "Tailscale (live) exposure", "deployed-URL hard gate", and "P3.2", and _STALE_STATUS_RE extended to also catch "not yet"/"TBD". Checking logic factored into _stale_topic_violations() so the two mutation-test cases can exercise it directly against synthetic strings. Both reviewer mutations now fail the guard (see the two new test_guard_catches_*_mutation tests); swept every existing deferred/ pending/not yet/TBD occurrence in tracked docs for false positives -- none. Consolidation: tests/test_doc_consistency.py and tests/test_doc_issue3_consistency.py had an identical _tracked_markdown_files() helper; moved to tests/conftest.py as tracked_markdown_files() so both import one implementation. Doc test counts bumped 227/327 -> 232/332 in ATO_EVIDENCE_PACKET.md and DEMO_SCRIPT.md (5 new tests: 3 in test_claude_md_accuracy.py, 2 mutation tests here) to keep tests/test_doc_test_counts.py's live-suite check green. Green state: 332 passed (full suite, sibling checkout present).
…t pinned Phase 2 repo Issue #61's own PR left scripts/ingest_demo_pdf.py in CLAUDE.md's "Standing up the target" section -- a path that exists in neither repo. Extends the doc-accuracy guard to extract every script/config path that section presents as a target-repo command and assert it exists at the pinned v2.0.0 tag in the sibling checkout, closing the defect class rather than just the one instance. Skips cleanly when the sibling checkout is absent (CI has no target checkout).
…checkout context scripts/ingest_demo_pdf.py does not exist in either repo; the real location in the pinned Phase 2 target (v2.0.0) is services/copilot-agent/scripts/ingest_demo_pdf.py. Also makes explicit that the "Standing up the target" commands run from the sibling target checkout, not this repo, so a reader does not try them here.
…kout helper into conftest.py test_dos_input_bound_resolution.py and the new target-path checks in test_claude_md_accuracy.py each defined an identical _TARGET_REPO / _TARGET_TAG / _target_repo_available() trio. Consolidated into tests/conftest.py (TARGET_REPO, TARGET_TAG, target_repo_available()), matching the existing tracked_markdown_files() consolidation pattern in this same file. Behavior-preserving: both files' suites pass unchanged, including the skipif path with the sibling checkout absent.
…hecks unconditionally deep-review findings against the diff: - test_dos_input_bound_resolution.py had only one blank line before a top-level function def after the helper consolidation (PEP8 wants two). - TestStandingUpTargetPathsExistInPinnedTarget conditioned its parametrize on target_repo_available(), collapsing to a single [NOTSET] placeholder item with the sibling absent instead of one named-and-skipped item per path -- inconsistent with the established TestTraceCitationsAgainstPinnedTarget pattern in the same suite, which parametrizes unconditionally (the source list is always available) and lets skipif alone gate the skip.
…32 -> 233/339) tests/test_doc_test_counts.py's self-deriving CI-count formula only subtracted the two pre-existing sibling-gated citation classes; it needed a third term for the new TestStandingUpTargetPathsExistInPinnedTarget class (6 skips in CI) or its own live-derived expectation would drift just like the docs it guards. Updated the formula and the two docs it checks (ATO_EVIDENCE_PACKET.md, DEMO_SCRIPT.md): 232/332 -> 233/339 passed, 100 -> 106 skipped in CI, with the breakdown prose in DEMO_SCRIPT.md naming all three skip-contributing classes.
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.
Summary
CLAUDE.mdsaid "Private repo." (repo is PUBLIC pergh repo view) and pointed atplanning/PLAN.md/planning/APPROACH.md, which were relocated to gitignoredprd/in9708fc9and are no longer tracked. Both fixed -- pointers now nameprd/PLAN.md/prd/APPROACH.mdexplicitly as local-only/gitignored.planning/KICKOFF_PROMPT.md's matching./planning/APPROACH.md/./planning/PLAN.mdpointers fixed the same way.tests/test_doc_issue3_consistency.pywas mutation-tested by a reviewer and passed on two real regressions (case-sensitive_ISSUE3_RE; a too-narrow second test). Hardened: case-insensitive topic regex covering issue P3.2 — Expose target live via Tailscale (deployed-URL hard gate) #3 / "Tailscale (live) exposure" / "deployed-URL hard gate" / "P3.2", extended stale-status regex (+"not yet"/"TBD"), checking logic factored out so the two reviewer mutations are exercised directly as tests and now fail the guard as required._tracked_markdown_files()helper duplicated acrosstests/test_doc_consistency.pyandtests/test_doc_issue3_consistency.pyintotests/conftest.py.docs/ATO_EVIDENCE_PACKET.md/docs/DEMO_SCRIPT.mdfor the 5 new tests, pertests/test_doc_test_counts.py.Test plan
5 failed, 2 passed.12 passed.332 passed.docs/vuln_reports/*.jsonsha256 unchanged before/after (not touched).Closes #61