Skip to content

fix(docsync): Three quick-win checks from the findings triage - #290

Merged
pterw merged 8 commits into
mainfrom
fix/docsync-quick-wins
Oct 31, 2026
Merged

pterw merged 8 commits into
mainfrom
fix/docsync-quick-wins

Conversation

@pterw

@pterw pterw commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Summary

Three docsync quick wins from the verified findings triage (owner go-ahead 2026-10-31), each its own commit, plus two docs commits.

  • F-B23-17 (resolved): DOC012 now flags a Validation line whose bold count holds no digit (the entry template's **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.
  • F-DOCSYNC-16 (resolved): an allow_after marker in config/docsync.toml that matches no line of its file is reported as DOC011, instead of silently dropping the exemption. Today's four markers match.
  • F-B23-35, slice S3-5 (finding stays open for S3-8): ArchiveStore._load compares each page's manifest entries and lines with 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; --fix stays idempotent, including on a CRLF checkout.
  • Docs: the CI split's post-merge check (b2) is recorded in its plan (PR docs(findings): Write the canonical status line for 24 findings #287 skipped browser and 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 a Final validation: or continuation line is not flagged; today's log uses neither shape).

State

Task What Commit Review
D1 F-B23-17: digitless Validation count da7741e needs fixes (wrapped form)
D2 F-DOCSYNC-16: dead allow_after marker 7baedf1 approved
D1 fix wrapped and unquoted placeholder, Validation lines only ef18f96 approved
D3 F-B23-35 S3-5: manifest counts checked 0a57cdb approved (wording conflict)
D4 record CI check b2 9f9e80c approved
D3 fix DOC020 wording made consistent; other direction tested 778f5a1 approved
R1 file F-B23-66 bde173b approved (one unsupported clause)
R1 fix drop that clause 9dfbd4a ruled by the controller from the review; diff checked

Validation 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, 9f9e80ca and 778f5a17 all pass (docsync suite 705, 706, 709, 712, 712, 713). Each new test case was shown failing on the unpatched code first. Full pytest -q: 3169 passed (pinned). bde173bf and 9dfbd4a7 are docs only; pre-commit run --all-files (10 hooks) and --check were re-run fresh at 9dfbd4a7 before 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 -q passes (update SESSION_CONTEXT Section 1 if test count changed)
  • pre-commit run --all-files passes (all hooks)
  • python scripts/doc_state_sync.py --check exits 0
  • PLAYBOOK Section 3 reflects current WP/task state
  • PLAYBOOK Section 4 has a dated log entry:
    - Batch WP: inside DOCSYNC:CURRENT-BATCH-START/END markers
    - Side task: after DOCSYNC:CURRENT-BATCH-END marker
  • Changes are within scope of the active batch definition
    (or deviation is logged in the Section 4 entry)

pterw added 8 commits October 31, 2026 14:28
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.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 11 complexity · 0 duplication

Metric Results
Complexity 11
Duplication 0

View in Codacy

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.

@pterw
pterw marked this pull request as ready for review October 31, 2026 19:16
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-31T19:16:18.555102Z
We couldn’t complete this review. Comment @codex review to try again.
9dfbd4a Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@pterw
pterw merged commit 2a8837b into main Oct 31, 2026
6 checks passed

@graphify-labs graphify-labs Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@pterw pterw mentioned this pull request Oct 31, 2026
6 tasks done
@pterw
pterw deleted the fix/docsync-quick-wins branch October 31, 2026 20:10
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.

1 participant