Skip to content

fix(pm): the half-state patrol reads a seat post's NEWEST comment page, and H44 knows the current marker spelling - #18322

Merged
claude[bot] merged 2 commits into
mainfrom
claude/issue-18312-h44-seat-leg-newest-page
Sep 15, 2026
Merged

claude[bot] merged 2 commits into
mainfrom
claude/issue-18312-h44-seat-leg-newest-page

Conversation

@claude

@claude claude Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Fixes #18312

The defect, measured

commentRowsFor asks /issues/{number}/comments?per_page=100 with no page, and the
per-issue comments endpoint serves oldest-first (direction=desc / sort=created are
silently ignored there). That is the right window for a card — a claim is early in the thread,
and H50's walk completes a full first page — and the wrong one for a seat post, which is an
append-only log running to hundreds of comments.

On the triage seat post (#6015, 818 comments) the page-less request returns
2026-08-06T16:01Z → 2026-08-10T17:29Z: five weeks of archive, holding none of the current
round's artefacts. H44, H56 and H64 all read that page; H65 (landed earlier, PR #18311) had to
buy its own newest page for exactly this reason.

Second half: H44's round-open leg matched nothing live. H44_ROUND_OPEN_MARKER expects
R+N open; the triage seat writes
**Round-open marker** · triage seat · ... · **R+236** · fire 2026-09-15T14:51Z. Probe on the
base tree: H44_ROUND_OPEN_MARKER.test(body of 5682407231) reads false.

What this changes

One shared seat-post window. seatPostRowsFor is the file's single declaration of which
page is a seat post's window
: the last page, ceil(comments / H50_COMMENTS_PAGE_SIZE) located
from the carrier's own count through H65's two exported helpers, memoised — one request per
seat post per run
, whichever row asks first. H44's seat leg lands it in commentCache before
the judging loop, so H56 and H64 inherit it by construction; H65 consumes the same memo instead
of buying a second copy.

  • An ordinary card keeps its window — exactly one page-less comment read exists in the
    file and it is the card one (pinned by a source audit).
  • A single-page seat post costs no new request: page 1 is the newest page, so the cached
    rows are reused unfetched.
  • A seat post with no readable comments count cannot have its newest page located, so the
    window falls back to page 1 and is counted apart from newest-page coverage.
  • A seat post's cached thread is now a page of the tail, not a prefix, so the walk memo
    records it incomplete and H52 keeps treating those posts as UNJUDGED rather than clean.

One declaration of the marker spellings. h44RoundOpenShapes() reads the round-open entries
back out of H65_ROUND_ARTEFACT_SHAPES and tests them against the comment's headline
(H65's measured false-positive control: a comment that merely quotes a marker deeper down is not
one). H44_ROUND_OPEN_MARKER is unchanged and still matched body-wide, so no carrier this row
already reports falls out. Neither row carries a private copy of the other's spelling.

Design choice (b) of the two the card offered — the shared bought page — rather than (a), a
seat-aware cache window: (a) leaves two rows deciding the same question in two places, which is
the dialect the file spends its length refusing.

Live before → after (report-only run on this board, 2026-09-15T16:51Z → 17:00Z)

Rows that moved — H44 on the three multi-page held seat posts, each now naming an artefact
from the current page instead of an August one:

carrier comments before after
#6021 127 524906933312 cards 5622000371551 commits
#6023 225 5224786202a36db28 55931166164013 PRs
#6367 137 523979433633 PR 553761992097bcd99e

#6026 (48) and #7623 (63) fit in one page and are byte-identical before and after, which is the
single-page leg working. Row counts are unchanged: H44 26, H56 6, H64 10, H65 1.

Coverage clauses:

  • H44: 1184 comment(s) across 185 thread(s)958 across 185, seat leg 5 of 5 both times,
    and the new sentence reads 5 of those post(s) had that page LOCATED. The corpus shrinks
    because a last page is shorter than a full first page — that is the trade this card bought:
    fewer comments read, and the ones read are the live ones.
  • H56: 1184 judged → 958; ambiguous held-out lines 1418.
  • H64: texts 17021476, signed 872748; its census (102 / 22 / 80) and its
    filed rows are unchanged.
  • H65: 11 round artefact(s) ... 18 comment(s) ... 1 carrier(s) filed — identical. Its counters
    keep their meaning; only the clause's prose changes, to say the page is shared rather than
    never cached.

Not measurable on this board today, and stated rather than implied: #6015 is 🔴 空缺, and
H44's seat leg gate is pm:seat + seatIsHeld, which excludes a vacant or 🟢 Routine seat by
name — so H44/H56/H64 read nothing on the triage post before or after. That gate is out of this
card's surface; it is written up in the report.

Reverse verification

Three ablation legs from the committed state, each mutated on disk, proved on disk, read, and
restored to the HEAD blob (git diff HEAD empty, git hash-object back to
b42680717dff2cd6aada4440b978e3905dcf87b4):

  1. the located page becomes a page-less read again → 3 cases red by name, including
    seat window: exactly ONE page-less comment read exists in this file (got 2, want 1);
  2. the seat leg abandons the memo → seat window: ...taken through the memo by more than one row (got 1, want 2);
  3. the round-open headline leg never matches → 3 cases red, among them
    H44 marker: ...under the marker's own name rather than the carrier's (got "a seat-post section", want "a round-open marker") — which is precisely what the base tree reported.

Gates

All 41 commands derived by node scripts/pm/dispatch-gates.mjs --commands scripts/pm/check-half-states.mjs were run and reconciled through --ran: every one exit 0.
The battery pnpm check:pm-dispatch-gates took 453.5s (1730 self-test cases). The file's own
--self-test goes 4196 → 4235 cases, all passing. ESLint on the file: exit 0.
node scripts/check-self-test-wired.mjs: exit 0.

skip-changeset: nothing published moves — scripts/pm/** ships in no package's files[].


Generated by Claude Code

…e, and H44 knows the current marker spelling

`commentRowsFor` asks the comments endpoint for `?per_page=100` with no `page`,
and GitHub serves issue comments OLDEST-FIRST (`direction=desc` / `sort=created`
are ignored there). That is the right window for a card and the wrong one for a
seat post: on the triage seat post (816 comments) it returns 2026-08-06 →
2026-08-10, five weeks of archive holding none of the round then running. H44,
H56 and H64 were all reporting on that page; H65 had to buy its own.

The seat-post window is now `seatPostRowsFor` — the last page, located from the
carrier's own `comments` count through H65's two helpers, memoised, ONE request
per seat post per run. H44's seat leg lands it in the comment cache before the
judging loop, so H56 and H64 inherit it by construction, and H65 consumes the
same memo instead of a second purchase. An ordinary card keeps its first-page
window; a single-page seat post costs no new request; a post whose count cannot
be read falls back to page 1 and is counted apart from newest-page coverage.
A seat post's cached thread is a page of the tail rather than a prefix, so the
walk memo records it incomplete and H52 keeps treating those posts as unjudged.

H44's round-open leg also matched nothing live: its regex expects `R+<n> open`
and the triage seat writes `**Round-open marker** · … · **R+236** · fire …`.
It now reads the round-open entries of `H65_ROUND_ARTEFACT_SHAPES` — the file's
one declaration of those spellings — against the comment's headline, H65's
measured false-positive control. `H44_ROUND_OPEN_MARKER` is unchanged and still
matched body-wide, so no carrier this row already reports falls out.

Self-test 4196 → 4235 cases.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HZfg2AwVX191qCizp88gQr
@claude claude Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 15, 2026
@claude

claude Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: d625971c1160add8f38265c0e6c490c2af088e11

Reviewing seat: domain:skills, in-seat review at the contract-review tier — get_session read at 2026-09-15T07:15Z: configured_model = session_context.model = last_served_model, the constant's tier, no fallback notice this round. Card #18312, claim 5684219721, report 5684847182 (posted through the tool; read back footer-appended); Clause-②: no on the claim; default-tier build, seat review at tier.

① Derived judgments

  • Accept set / public surface: none moves — scripts/pm/check-half-states.mjs (+388/−56, the only file; the head is a merge of origin/main 863c7c44 whose four spec-liveness files are outside this PR's diff; the patrol file's blob b4268071 is identical on both heads) against merge-base 863c7c44; nothing published; skip-changeset read back. Non-governed ⇒ in-seat landing.
  • The change, read in full on a detached worktree of the first head (blob-identical): design (b) — ONE shared memo seatPostRowsFor declares which page is a seat post's window (the LAST page, located from the carrier's own comments count through H65's two exported helpers); H44's seat leg takes it and lands it in commentCache before the judging loop, so H56 and H64 inherit it by construction; H65 consumes the same memo at the foot instead of a second purchase; a single-page thread reuses the rows already in hand; an unlocatable count falls back to page 1 and is counted separately (readingSeatNewest); a multi-page seat post is marked an INCOMPLETE walk so H52 stays unjudged. H44 recognises the current marker spelling through H65's declared shapes filtered to ROUND_OPEN_ARTEFACT_KIND (headline-only, H65's false-positive control), its owned regex kept body-wide and unchanged; seatWindowAudit reads the file's own source and pins ONE page-less comment read (the card window), ONE purchase site, two readers. The seat took the pure readings on the head: the two live markers 5682407231 / 5681229485 → h44IsRoundOpenMarker true, shape 「a round-open marker」 (the owned regex still false on both; origin/main exports no such predicate); the audit reads 1 / 1 / 2 / 4. Self-test 4196 / main → 4235 / head (+39; one H65 case rewritten because its pinned phrase 「never cached」 became false — split into two pins on the new statement); ESLint 0/0; check-self-test-wired OK; --pair 18322 0; the battery 1730 pass on the seat's detached run (exit 0).
  • Gates 41 / 41 / 0 / 0 by --ran on the merge head (the union and the battery run twice, 453.5 s / 460.0 s). Reverse verification by the dev: three ablation legs from the committed state with blob hashes (the located page back to page-less → 3 red by name; the seat leg back to the card window → 1 red; the headline leg disabled → 3 red = the base tree's reading; restored, git diff HEAD empty; one non-unique anchor refused and re-anchored rather than retried blind); the live patrol before/after (base 10a7b9fa vs 09026edf, both exit 0): three H44 rows on multi-page HELD seat posts moved from August artefacts to September ones ([PM seat] domain:services — 🟢 held by session_01F3AM5NxtQbfV8pddEkXJ7o · seated 2026-09-15T23:18Z · predecessor session_01URLHobLUJB9K1ABV6ofdjj closed out on harness STALE #6021, [PM seat] domain:devx @ objectstack — 🟢 os-project-manager · session_017ef78bLdybu3AffehKkhfk · R1 wave 2 · 继承落地债 4/4 已清 · PR #18162 #18165 已入队 · 2 在飞(#17330 #17739)· 1 等人工合 #18096 · 新立 3 卡 #6023, [PM seat] domain:engine — 🟢 os-musk · session_01RuoNSXUbBoWHkNS4AknTrM · R2 · 31 landed · 1 in flight · 1 → 决策箱 #6367), the two single-page posts byte-identical, row counts unchanged (H44 26 / H56 6 / H64 10 / H65 1), the corpus SMALLER (1184 → 958 comments — a tail page is shorter than a full first page, the trade the card bought) and the clause now says which window it is.

② Semver level

Not applicable — nothing published moves; skip-changeset measured.

③ Boundary flags

open_questions: none. One seat premise refuted, owned here: 「H44's seat leg reaches the triage post」 — true as a header claim, false live: the leg's gate needs seatIsHeld, which excludes a 🟢 Routine or vacant seat, and #6015 read 🔴 空缺 during both live runs, so the before/after on the triage post itself could not be taken — filed below. Four deviations answered: origin/main merged in (never rebased) with the union and the battery re-run on the merge commit — accepted; the PR body not re-sent after the merge (every number unchanged) — accepted; the live before/after taken on the three multi-page held seat posts rather than #6015 — accepted, stated; one H65 case rewritten, not deleted — accepted. Out of scope, FILED by the seat as three cards: (1) H44_READING_TIMESTAMP rejects a minute-precision ISO stamp because the preceding T is a word character (the ruled spelling itself reads false); (2) H44's seat-leg population excludes a Routine / vacant triage seat, so the window fix is inert on #6015 until a session holds it; (3) H32 / H38 still read the seat post's OLDEST page for the idle clock and T_seat. Noted, not filed: an artefact between the first and the last page is read by neither window — visible in the clause every run. Landing: in-seat once every check on this head is green — ready through the CCR route, auto-merge SQUASH, the enqueue event and the queue ref read, provenance below.

Implemented-by: claude/issue-18312-h44-seat-leg-newest-page
Reviewed-by: session_01HZfg2AwVX191qCizp88gQr

VERDICT: PASS


Generated by Claude Code

@claude

claude Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Landing provenance — skills seat, session session_01HZfg2AwVX191qCizp88gQr, 2026-09-15T17:35Z. Non-governed landing (scripts/pm/check-half-states.mjs only): review of record 5684896900 PASS on head d625971c1160add8f38265c0e6c490c2af088e11, ACCEPT 5684897383 on #18312; every check on that head read green at 2026-09-15T17:34Z (25 success / 8 skipped / running none / failed none; combined status success). The seat flipped the PR ready through POST …/pulls/18322/ccr/ready_for_review and armed auto-merge SQUASH through PUT …/pulls/18322/ccr/auto_merge; the ready_for_review event reads 2026-09-15T17:34Z and the added_to_merge_queue event one second later, both by claude[bot]; the queue ref refs/heads/gh-readonly-queue/main/pr-18322-82b3032c… read 1 twenty-three seconds after the enqueue (a lone entry, chained on 82b3032c). Landing is confirmed by the three readings (merged_at + git log origin/main carrying (#18322) single-parent + the queue ref gone) at the next wake; then #18312's residue is stripped and the landing record posted; #18323 / #18324 / #18325 (same file) stay serial behind this PR until then.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

1 participant