Skip to content

docs: declare the selected-window path public for walk-forward use, with a doc-lint rule that holds it - #564

Merged
luisleo526 merged 14 commits into
mainfrom
docs/selected-window-public
Oct 28, 2026
Merged

luisleo526 merged 14 commits into
mainfrom
docs/selected-window-public

Conversation

@luisleo526

@luisleo526 luisleo526 commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

What

Declares the selected-window path a public surface for walk-forward use. docs/pages/public-contract.md gets a new section ({#selected_windows_walk_forward}) that says, from what the tree shows:

  • the public entry points, each cited with its symbol: the docker/run_json.py selected-window options and --capabilities-json, the capability record (capabilities.selected_window_contract_revisions), the report policy, and the two C headers selected_window.h and selected_window_plan.h with the PF_API functions each declares;
  • how a consumer detects support and the contract revision before relying on it;
  • the stability rule, in the words the page already uses for the other surfaces: append-only within 1.x, a contract revision changes only by a new revision literal, typed failures, and what only a major release may change;
  • what is not public (the helper modules and anything not reachable from the CLI or the headers);
  • the walk-forward use as the tree supports it: successive non-overlapping windows over one chart, each window an independent request, preroll and anchor, and where the report carries them.

It also adds a pointer from the README and a line under 1.8.0 in the changelog.

A new doc-lint rule holds the section: it reads the complete PF_API declarations of both headers and the selected-window add_argument block of docker/run_json.py at run time (parsing the CLI with ast, never importing it), and fails when the section is missing or duplicated, when a name the sources declare is absent from it, or when a source cannot be read or parsed. No name list is typed into the checker. Six cases in scripts/test_check_doc_lint.py cover it with temporary trees the test builds.

Verification

  • The new rule fails on the base page, for the right reason: the doc-lint stage reports cannot read or parse the selected-window public section: expected one {#selected_windows_walk_forward} section (one offender) when the three documentation files are reverted and the checker is kept.
  • On this head the full ci_preflight (59 stages, including doc-anchors, doc-lint and doc-reverts) and the documentation build pass.
  • The change touches no engine code. Parity is measured on this exact tree.

🤖 Generated with Claude Code

@luisleo526
luisleo526 marked this pull request as ready for review October 27, 2026 20:24
luisleo526 and others added 12 commits October 28, 2026 04:38
Corrects four comments that no longer match the code they describe, and one
stale line number in a script comment:

- scripts/ci_verify.py: the selected-sink memory test is registered at its
  current line of tests/CMakeLists.txt.
- tests/test_scratch_create_pinned_text.cpp: the header names the files that
  produce the pinned create diagnostics instead of a release.
- src/source/pine_adapter.cpp: the placement table scans the retained
  placements and consults the historical minima for erased rows; it has no
  per-id index.
- include/pineforge/native_host.hpp: the live-order read comment no longer
  claims the reads allocate nothing, since a spilled row is read into a buffer.

No code changes.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… path it pins

The header named two producing files; the test also pins the id-pair scratch
file and the successor-roots create. It now lists all four scratch paths by
what they are, and drops a stale note about an unobserved prediction. Comment
text only.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… capital export edit

The export added to the report writer moved the argument parser and the
selected-window helpers of docker/run_json.py by 16 lines (17 for the parser's
flags), so eleven citations in the public contract page pointed at neighbouring
lines. They cite the same functions and flags again.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@luisleo526
luisleo526 merged commit 58c42ca into main Oct 28, 2026
12 checks passed
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