Skip to content

P3.30: fix CLAUDE.md stale/broken links; harden issue-3 doc guard - #71

Merged
franciszver merged 7 commits into
mainfrom
docs/p3-30-claude-md-and-guard
Jul 26, 2026
Merged

P3.30: fix CLAUDE.md stale/broken links; harden issue-3 doc guard#71
franciszver merged 7 commits into
mainfrom
docs/p3-30-claude-md-and-guard

Conversation

@franciszver

Copy link
Copy Markdown
Owner

Summary

  • Part A: CLAUDE.md said "Private repo." (repo is PUBLIC per gh repo view) and pointed at planning/PLAN.md / planning/APPROACH.md, which were relocated to gitignored prd/ in 9708fc9 and are no longer tracked. Both fixed -- pointers now name prd/PLAN.md/prd/APPROACH.md explicitly as local-only/gitignored. planning/KICKOFF_PROMPT.md's matching ./planning/APPROACH.md / ./planning/PLAN.md pointers fixed the same way.
  • Part B: tests/test_doc_issue3_consistency.py was 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.
  • Consolidated the identical _tracked_markdown_files() helper duplicated across tests/test_doc_consistency.py and tests/test_doc_issue3_consistency.py into tests/conftest.py.
  • Bumped documented test counts (227/327 -> 232/332) in docs/ATO_EVIDENCE_PACKET.md / docs/DEMO_SCRIPT.md for the 5 new tests, per tests/test_doc_test_counts.py.

Test plan

  • Red-first: committed failing assertions for both parts (CLAUDE.md staleness + both reviewer mutation strings) -- 5 failed, 2 passed.
  • Fix applied; targeted suite green -- 12 passed.
  • Full suite green -- 332 passed.
  • Three inline gates (declutter, sec-audit, deep-review) run on the full diff -- no findings.
  • docs/vuln_reports/*.json sha256 unchanged before/after (not touched).

Closes #61

…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.
@franciszver
franciszver merged commit fd19db7 into main Jul 26, 2026
1 check passed
@franciszver
franciszver deleted the docs/p3-30-claude-md-and-guard branch July 26, 2026 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

P3.30: CLAUDE.md still says 'Private repo' and links two relocated files; harden the issue-3 doc guard

1 participant