Repository navigation
fix(docsync): Three quick-win checks from the findings triage - #290
Conversation
The entry template's placeholder, with a letter where the count goes, was committed twice and --check exited 0: every DOC012 count regex needs a digit, so such a line recorded nothing and raised nothing. DOC012 now flags a full-suite command followed by a bold pass count with no digit. Resolves F-B23-17.
A renamed heading left an allow_after marker matching nothing, so the declaration silently lost its history exemption. check_retired now reports DOC011 naming the file and the marker. Resolves F-DOCSYNC-16.
The DOC012 placeholder check missed a Validation line whose bold count wraps onto the next line and one written without backticks, and it flagged any prose that quoted the template. It now reads the wrapped form via the trigger helper, makes backticks optional and flags only a line that opens a Validation record. Cases wrapped, unquoted and prose-quote-not-validation added to the existing parametrize.
ArchiveStore._load never compared a page's manifest entries and lines with the page as read, so a page with an entry deleted was ratified by --fix. A mismatch now raises the existing SyncError (DOC020), telling the reader to restore the page or index from git history. Also corrects the config comment that said an unmatched allow_after marker is ignored (ruling D3a; D2 made it DOC011). F-B23-35 stays open for S3-8.
Post-merge check (b2) of the CI parallel-jobs plan is done: on docs-only PR #287 browser was skipped and quality-gate passed in 1 min 51 s. Tick the box, add the record line, update PLAYBOOK Section 3.
The count error told the reader not to hand-edit, which contradicted DOC020's fixed suffix that allows correcting the index by hand. It now states only the fact and the rule; the suffix gives the remediation. Add the page-entry-added case (manifest records fewer entries than the page holds) and restore the consistent-store test's exact comparison.
The F-B23-17 fix leaves a placeholder count on a Final validation or continuation line unflagged. Filed as open P3 with the fix shape; docs only.
No line under docs/ opens with Final validation, so the claim that only archive pages do was wrong when written. The finding now says only that DOC012 scans the live PLAYBOOK.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 11 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Graphify reviewed this change.
No issues found by static checks — no coupling regressions or blocking issues in the code graph. That is not the same as safe to merge: see what was not checked.
Not checked: tests were not run; formal verification proved 0 of 3 changed function(s) (3 not verified).
Formal verification. PR-changed functions: 0/3 verified (0 proven, 0 may-equivalent, 0 distinguished) · 3 not verified (2 vacuous, 1 unsupported).
Not verified on this run: \_load (vacuous: never exercised), check\_retired (unsupported), \_check\_unbolded\_test\_counts (vacuous: never exercised).
Graphify review — findings
Closes two long-open docsync findings. DOC012 now flags a Section 4 Validation line whose bold count has no digit (F-B23-17), and an allow_after marker that matches no line in its file is now a DOC011 error instead of being silently ignored (F-DOCSYNC-16). Both findings leave the open list, and the docsync.toml comment is updated to say so. The pinned test count moves from 3159 to 3169 across the status docs, and a new F-B23-66 records that the digit check still misses a placeholder on a Final validation: or continuation line. Hardens the paginated archive store. ArchiveStore.page_path stays inside its own index directory, and a version-1 index is refused rather than reordered. A prepended entry rewrites only the tail page, and replanning produces no further changes. The legacy body is no longer left beside the paginated copy, and unrelated pages in a shared archive root are not reported as orphans. Extends declaration and integrity checks. validate_closeout and the closeout config read a declared boundary. A bold lead-in inside a list item counts as a citable place, and a site naming a nonexistent file is reported. DOC012 also checks that the stated docsync catalogue matches the codes actually raised, and it keeps checking batch references that are not definitions, while subdirectory and generic batch templates are no longer candidates.
Review partial — this diff was larger than one review pass covers, so later files were not reviewed; some findings may be missing.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 1010 functions depend on the 925 functions this change touches.
Health — this change adds coupling hotspots:
- worse:
check_retired()— 21 callers, 9 callees - worse:
_paginate()— 14 callers, 4 callees
Verification — 1010 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 969 function(s) in the blast radius were not formally verified this run
Formal verification
Could not verify: Could not verify \_load.
The verifier did not have enough to check \_load, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: not verifiable: all 27 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly __init__ raised on the synthesized receiver args — names the real obstacle, not a sampling gap)
Could not verify: Could not verify check\_retired.
The verifier did not have enough to check check\_retired, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: parameter `files` is annotated `_Files` — outside the synthesizable primitive/collection set
Could not verify: Could not verify \_check\_unbolded\_test\_counts.
The verifier did not have enough to check \_check\_unbolded\_test\_counts, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: non-vacuity: domain too small (only 2 distinct inputs exercised, need 3) — 'no divergence' would be near-vacuous
· 2 more finding(s) on lines outside this diff (see the check run).
Summary
Three docsync quick wins from the verified findings triage (owner go-ahead 2026-10-31), each its own commit, plus two docs commits.
**N passed**placeholder), including the wrapped form where**N passed**starts the next line and the form without backticks. Only Validation lines are checked, so prose that quotes the template is not a false red.allow_aftermarker inconfig/docsync.tomlthat matches no line of its file is reported as DOC011, instead of silently dropping the exemption. Today's four markers match.ArchiveStore._loadcompares each page's manifestentriesandlineswith the page as read; a mismatch is reported as DOC020 (a page and its index manifest change together, only through--fix). Checked on both paginated archives: no mismatch today;--fixstays idempotent, including on a CRLF checkout.browserand took 1 min 51 s); the one gap the F-B23-17 review left open is filed as F-B23-66 (P3: a placeholder on aFinal validation:or continuation line is not flagged; today's log uses neither shape).State
allow_aftermarkerValidation at this head
Every code commit was gated on its own by an independent gate runner (docsync suite,
pre-commit run --all-files,doc_state_sync.py --check):da7741e0,7baedf11,ef18f96b,0a57cdb0,9f9e80caand778f5a17all pass (docsync suite 705, 706, 709, 712, 712, 713). Each new test case was shown failing on the unpatched code first. Fullpytest -q: 3169 passed (pinned).bde173bfand9dfbd4a7are docs only;pre-commit run --all-files(10 hooks) and--checkwere re-run fresh at9dfbd4a7before this PR opened.Codex: waived by the owner until the usage limits reset. CI: green at this head on all four jobs (run 41232808484: checks 3009 passed, 4 skipped, 156 deselected; browser ran). Codacy 0 new issues, qlty no blocking issues, no open review threads.
Checklist
pytest -qpasses (update SESSION_CONTEXT Section 1 if test count changed)pre-commit run --all-filespasses (all hooks)python scripts/doc_state_sync.py --checkexits 0- Batch WP: inside
DOCSYNC:CURRENT-BATCH-START/ENDmarkers- Side task: after
DOCSYNC:CURRENT-BATCH-ENDmarker(or deviation is logged in the Section 4 entry)