Skip to content

docs(archives): Paginate the four archives past the page target - #284

Merged
pterw merged 3 commits into
mainfrom
docs/paginate-archives
Oct 31, 2026
Merged

pterw merged 3 commits into
mainfrom
docs/paginate-archives

Conversation

@pterw

@pterw pterw commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Summary

Splits the four archives past the 500-line page target into numbered pages, at the owner's request: the side-task log archive had reached about 17,000 lines and the findings archive 3,500, too long for an agent to grep or read. doc_state_sync.py --paginate-archives keeps each archive file in place as an index and writes its entries to a pages/ folder beside it, so every existing reference still resolves.

  • Side-task log archive: 36 pages. Findings archive: 8 pages. Batch 21 log: 2 pages. Batch 22 log: 3 pages. Every page is under 500 lines; none is oversized; no cold storage.
  • Lossless, checked outside the tool: every non-blank line of each old file is present across its index and pages, and the only new lines are page headers and index lines. An independent review re-checked this with its own method, including entry order.
  • Live instructions that searched an archive file by name now search its directory (AGENTS.md, DEVELOPMENT.md, docs/AGENT_DOC_MAP.md, docs/SWE_AUDIT_CHARTER.md, docs/logarchive/README.md, PLAYBOOK Section 4's read guide, the cloud kit's expected warnings). Point-in-time records keep their old paths.
  • The side-task archive's built-in read helpers (SIDE_ARCHIVE_PREFIX in scripts/docsync/renderer.py) now search docs/logarchive/. One new test checks that every helper reaches the archive's pages.
  • Known gap, not changed here: F-B23-35 (page manifests are never checked) is ranked in the next findings triage (owner ruling).

State

Task What Commits Review
1 Paginate the four archives, repoint search instructions, PLAYBOOK Section 3 2169955 approved after 1 fix round
2 Read helpers search the directory (docsync control plane) 0b03c66 approved after 1 fix round
-- Review fixes: remaining pointers, configurable page-target wording, helper test 881f00d approved

Validation at this head

Head 881f00d7. Gate runs are scoped to what changed (owner ruling 2026-10-31):

  • 881f00d7: suite-docsync 703 passed, pre-commit (every hook) and docsync-check pass. Full pytest -q: 3119 passed (pinned).
  • 0b03c661 (before the review fixes, which touch docs, renderer.py and one docsync test only): every gate, including suite-subdirs 1511 and suite-core 905 (3118 in all), and the frontend gate at 58 checks in 89 runs across Chromium and Firefox.

The two control-plane commits use the documented SKIP=doc-state-sync-check escape after the hook's expected exit-3 refusal; doc_state_sync.py --check passed directly on each. Expected --check warnings: the root BATCH23_DEFINITION.md notice, and two informational DOC024 lines for findings pages 0001 and 0002, whose undated entries never age into cold storage.

Codex: weekly quota spent; waived by the owner for this head (docs and docsync only, Codacy 0 issues). CI for this head: run 41219439839 green (2959 passed, 4 skipped; 156 browser tests; frontend gate 58 checks in 89 runs). 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 3 commits October 31, 2026 12:00
The side-task log archive had grown to 17,000 lines, the findings
archive to 3,500, and the Batch 21 and 22 logs past 500, so an agent
could not usefully grep or read them. doc_state_sync.py
--paginate-archives splits each into numbered pages under a pages/
folder and keeps the original file as an index, so every existing
reference still resolves.

Instructions that searched an archive file by name now search its
directory, because the index holds no entries. The side-task
archive's built-in read helpers are docsync control-plane text and
change in a separate commit.
SIDE_ARCHIVE_PREFIX is the prologue DOC004 holds the side-task
archive to. Its read helpers searched the archive file, which the
previous commit turned into an index with no entries, so an agent
following them found nothing. They now search docs/logarchive/, and
the prologue says why. The Get-Content helper is dropped: reading
the whole archive is what the split exists to avoid.

This stages docsync control-plane code, so the commit uses the
documented SKIP=doc-state-sync-check escape; doc_state_sync.py
--check passed directly on the same tree.
The review of the split found PLAYBOOK Section 4's own read guide
still sending agents to the side-task archive file, which is now an
index, and AGENT_DOC_MAP still saying that file and the findings
archive hold the entries. Both now point at the pages and say to
search the directory. The read-helper prologue no longer states the
500-line default, because the page target is configurable.

A new test checks that every read helper searches a place holding
the archive's pages; it fails with a helper aimed back at the file.
renderer.py is docsync control-plane code, so this uses the
documented SKIP=doc-state-sync-check escape.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

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 16:32
@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-31T16:32:21.753298Z
We couldn’t complete this review. Comment @codex review to try again.
881f00d 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 7f85bad into main Oct 31, 2026
3 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; no formal proof of the changed code.


Graphify review — findings

Paginates the four real archives that were over the 500-line page target (the side-task log archive, the findings archive, and the Batch 21 and 22 logs), so each file becomes an index and its entries move to numbered pages in a pages/ folder beside it. Docs, the charter and the history-lookup steps now tell readers to search the archive directories rather than grep the index file, and the standing DOC024 warnings drop to the two findings-archive pages that hold undated entries and so never age into cold storage. The pinned test count moves from 3118 to 3119 across the config, SESSION_CONTEXT and FINDINGS to cover one new docsync renderer test.

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 — 426 functions depend on the 281 functions this change touches.

Health — grade B; 10 existing hotspot(s) in the area this change touches (pre-existing, not introduced here):

  • collect_integrity_issues() — 99 callers, 24 callees (high)
  • _sync() — 24 callers, 17 callees (high)
  • _build_status_block() — 19 callers, 3 callees (high)
  • _close_batch() — 1 callers, 27 callees (high)
  • _computed_next_wp() — 3 callers, 5 callees (medium)
  • _merge_entries_into_log() — 5 callers, 3 callees (medium)
  • _split_archive() — 4 callers, 3 callees (medium)
  • _drift_updates() — 1 callers, 10 callees (medium)
  • …and 2 more

Verification — 426 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: 326 function(s) in the blast radius were not formally verified this run

@pterw
pterw deleted the docs/paginate-archives 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