Skip to content

feat(pm): count the 3,000-line human-review line per card in the guards (readers) - #38866

Closed
objectstack-fleet[bot] wants to merge 7 commits into
mainfrom
claude/issue-38296-card-size-readers
Closed

objectstack-fleet[bot] wants to merge 7 commits into
mainfrom
claude/issue-38296-card-size-readers

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread

Part of #38296. This pull is the readers half. The label-write.mjs --handoff half follows as a second pull, opened from main after this one lands. In it, an under-line pull of an over-line card gets its hand-off path, and the card's merged siblings are listed.

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户无感:落地守卫(单 PR 核查、合并队列守卫、队首插队)现在按整张卡合计 3,000 行人审线。同一张卡已开和已合并的 PR 一起算,专题卡和跟踪卡不累计。
  • 替维护者堵住"一张卡拆成几个小 PR、各自都不过线"的口子;这是车队护栏卡(按卡计人审线)的读者部分,交接路径留给第二个 PR。
  • 卡合计读不出来时按越线处理,交你审批或凭你已给的批准落地,不会当作线下;撤回本 PR 即恢复按单个 PR 计。
  • 请确认两处席位自定的读法:专题卡豁免只认这张卡第一个 PR 出现之前就挂上的标签;只引用这张卡(不是"修复"或"属于"这张卡)的 PR 不计入合计。

What changes

Ruling 7303003476 (option B plus row 7239077861) says the 3,000-line human-review line is counted per card:

  • every pull that names the card counts, open or merged;

  • a closed-unmerged pull does not count;

  • epic and tracker cards are exempt.

  • The per-card predicate, in check-governed-merges.mjs (the guard-register row). It lives in the register's own file, so an edit to the exempt labels or the counting lands by the maintainer.

    • crossReferencedPulls reads a card's siblings from its timeline: cross-referenced events in the same repo with pull_request set. Each sibling is then read on its own and kept only if it counts toward the card.
    • cardExemption replays labeled/unlabeled events. A card is exempt only when it carries pm:epic or tracking, and the latest such labeled event is at or before the card's first pull. That label pair is PARENT_LABELS in card-pick.mjs, mirror-checked in the self-test. The first pull is cardFirstPullAt: the earliest of this pull's opening and the card's first same-repo pull cross-reference.
    • readCardSize reads the exemption off the timeline before any sibling. An exempt epic or tracker therefore reads no sibling, and no cap can make it unread. A non-exempt card fails closed: an unread timeline or sibling, or more than CARD_SIBLING_CAP (60) siblings, gives measured: false with a reason. The card timeline is read to CARD_TIMELINE_PAGES (30 pages, 3,000 events).
    • cardTotalVerdict returns the total and which pulls were counted and excluded. On a card read over the line, landedBeforeCrossing holds every merged sibling (PR 2's hand-off lists them). crossedAt is informational only.
    • sizeVerdict takes an optional card reading. exceeds is true when the pull is over the line, when its card is over, or when the card reading did not read. exceedsBy says which limb fired. The lift (an authorised approval or enqueue) applies to either limb.
    • --pr reads the card through pullCardReading. An unread total rides on the verdict and lands as Tier H. --branch and --test print Card total — NOT MEASURED, and the sweep's contract says why it reads no card total.
  • The counted relation, record-recognisers.mjs. The new countedCardNumbers counts a closing keyword, Part of, and the protocol dev branch. It does not count Refs: a citation neither adds its size to a card nor inherits the card's total. The queue guard's recogniser loader exposes it as countedCards. The wider namedCardNumbers is unchanged and still serves the low-risk arm.

  • check-governed-queue-guard.mjs.

    • runSizeGuard takes a readCard (makeCardReader, which uses countedCards and reads the card timeline to 30 pages).
    • An over-line card and an unread card both read as oversized, so the approval lift is consulted. With no lift the group refuses on exit 8, never within.
    • The log names the card limb, including "its CARD's total UNREAD".
  • dispatch-gates.mjs. changedLineLines appends CARD_TOTAL_LINE on every branch. The tool reads the worktree only, so it says the card total is not measured there and names the readers that measure it.

  • fleet-write/ops.mjs + execute.mjs. The pr_enqueue_front size fence reads the card. It holds when both the pull and its card read under the line, or when the pull's authorised approval lifts it. An unread card total holds the fence on the approval alone. execute.mjs's readEnqueueCard pages the card timeline through the stroke's own rest reader.

Why

Until now every reader handed one pull's { additions, deletions } to the size predicate. A card split into two 2,000-line pulls therefore landed as two Tier S pulls. Live on this branch, --pr 36881 reports card #36860 at 4,196 lines: #36881 is 1,309 lines and the merged #36926 is 2,887. The verdict is OVER the line BY THE CARD. Before this change it read 1,309 lines, under the line. It also lists #36926 as merged before the card was found over the line, so the maintainer can take an after-the-fact look.

Tests

Each reader has the split case the card asks for: two 2,000-line pulls on one card are over the line, and Tier H, in both.

  • check-governed-merges.mjs --self-test:
    • "the per-card count" battery, 11 cases. These include an unread card read as over and lifted by an authorised approval.
    • New "the per-card module" battery, 20 cases. It covers the exemption read before any sibling (an epic with 80 cross-references is exempt, with 0 sibling reads), a label after the first cross-referenced pull not exempting, and closed-unmerged and Refs pulls not counting. It also covers every merged sibling being listed (including a pull that opened early and grew later), every fail-closed read, and the mirror against PARENT_LABELS.
    • The battery floor goes from 43 to 45.
  • check-governed-queue-guard.mjs --self-test: "the per-card count at the queue" battery, 10 cases (floor 34 to 35).
    • An unread card total, or no card reader, is oversized (exit 8).
    • An unread total with an authorised approval is lifted and the group clears.
  • record-recognisers.mjs --self-test: two countedCardNumbers pins. It counts a keyword, Part of and the branch but not Refs, and ignores spellings inside code.
  • dispatch-gates.self-test.mjs: every changedLineLines branch carries the card-total line.
  • fleet-write/execute.mjs --self-test, 483 cases:
    • A 46-line pull whose card carries a merged 2,990-line sibling is refused at the size fence. The same sibling closed unmerged lets the jump through.
    • An unread card total jumps only on an authorised approval on the head.

Acceptance notes

  • Round-1 contract review (comment 7304223803, FAIL), each finding:
    • M1: exemption read first, timeline to 30 pages.
    • S1: an unread total goes to the human path and is liftable.
    • S2: Refs dropped from the counted relation.
    • S3: every merged sibling of an over card is listed.
    • S4: the predicate moved onto the register by moving it into check-governed-merges.mjs, which adds no register row and needs no rule-text change.
    • N1 (jsdoc) is fixed. N2 (an edited-out naming) is now stated in the module's blind spots. N3 and N4 are accepted deviations.
  • Seat design choices (not ruled):
    • The exemption reads only an epic/tracker label put on at or before the card's first pull. A pull is placed at its first cross-reference on the card or its opening, whichever is earlier.
    • The counted relation is the option A pair plus the dev branch, without Refs.
  • Still not seen: a sibling whose body never mentions the card (named only by its branch), a cross-repo sibling, and an exempt card whose timeline runs past 3,000 events. The last one is unread, so it lands as Tier H.
  • Follow-ups, not changed here:
    • landing-operations.md says the seat adds the card total, which becomes stale once this lands. That is a governed .claude edit, so it goes in its own pull.
    • --handoff (handoffTierVerdict) is PR 2. Its route size already fires for a card-limb pull through --pr.
  • Overlap: feat(pm): read a decision analysis's Served-tier / Analysed-by pair, judge it at write, and list the decision box by tier #38867 (pm-dispatch: read a decision analysis's Served-tier line by script, and judge it when the analysis is written (#38391 part 3 and the writer gap) #38492) edits record-recognisers.mjs. Whichever lands second merges main.
  • Changeset: none. scripts/pm/** is not published (fast path), so skip-changeset rode on the create.

Read first (by risk):

  1. scripts/pm/check-governed-merges.mjs, readCardSize and sizeVerdict: the exemption read first, and an unread card read as over.
  2. scripts/pm/fleet-write/ops.mjs, the size entry in ENQUEUE_FRONT_FENCES: the write-side gate.
  3. scripts/pm/check-governed-queue-guard.mjs, sizeReading and runSizeGuard: oversized on an unread card, then the lift.

Verification

Two-minute check: run node scripts/pm/check-governed-merges.mjs --pr 36881 with a read token. You should see card #36860: 4196 changed line(s) across 2 pull(s) and OVER the line BY THE CARD.

Self-tests and the dispatch-gates command list

Run at head d0395fd5, merge base 5bd786e4. For these 7 paths (780 changed lines; the pull alone is under the line), node scripts/pm/dispatch-gates.mjs --commands derived 64 commands. All 64 were run locally:

  • 63 passed (exit 0). Among them:
    • check:pm-governed-merges, which includes the per-card module battery;
    • check-governed-queue-guard.mjs --self-test (651 cases) and check:pm-record-recognisers (490 cases);
    • check:pm-dispatch-gates, check:pm-fleet-write-execute (483 cases), check:pm-fleet-write-validate and check:pm-label-write;
    • check-self-test-wired.mjs and check:commit-card-trailers.
  • 1 PREREQUISITE NOT MET (exit 3): check:i18n-coverage needs the CLI built. Nothing was measured, and this diff touches no package source.
  • ESLint on every changed .mjs file: clean.

Round 1, at head a1b8ad6e, ran 76 commands: 71 passed and 5 were build prerequisites (exit 3). The families dispatch-gates cannot place locally (CI-measured, workflow-valued, the type-check lanes and the artifact rosters) are judged by CI on this head.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (Not touched.)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes. (ESLint on every changed file is clean.)
  • 4. One issue, one branch off an up-to-date main, one pull request. (The card is split in two for review size. Both halves are Tier H, and the card total goes to the maintainer either way.)
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. (Nothing publishes.)
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (Not touched.)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WGufziVTGyPT8jQDhRuAu5

`pr_enqueue_front` now reads the pull's card (ruling 7303003476): the open
and merged pulls naming it, epic/tracker cards exempt. A pull under the
line whose card totals more is refused at the size fence unless its
authorised approval lifts it; an unread card total refuses, never reads
as under the line.

Claude-Session: https://claude.ai/code/session_01WGufziVTGyPT8jQDhRuAu5
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Dec 1, 2026
@github-actions github-actions Bot added size/l dependencies Pull requests that update a dependency file labels Dec 1, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufziVTGyPT8jQDhRuAu5

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: a1b8ad6e43352eceb5004f8bf53b6065a6699ea4
Local-runs: none
Scope: scripts/pm/check-governed-merges.mjs, scripts/pm/check-governed-queue-guard.mjs, scripts/pm/dispatch-gates.mjs + scripts/pm/card-size.mjs, scripts/pm/fleet-write/ops.mjs, scripts/pm/fleet-write/execute.mjs

Read: card #38296 (body and all 4 comments, ruling 7303003476 and row 7239077861 included), PR #38866 (body, the 8-file list, the net diff), the check-runs on this head, and the live tree at this head for the code the diff cites (namedCardNumbers in record-recognisers.mjs, makeTimelineReader, sizeGuardVerdict, oncePerPull, the GOVERNED_SURFACES guard rows, runPullMode). package.json, dispatch-gates.self-test.mjs and the self-test hunks are the lane seat's ACCEPT.

Check-runs at the time of reading (2026-12-01): 14 completed success (among them Governed Surface Queue Guard, PR-body guards, Check Changeset, Check PR Size, Type Check · workspace, Type Check · debt ledger, Validate Package Dependencies, Dogfood Regression Gate), none failed, the rest skipped or STILL IN PROGRESS. In progress, so no verdict yet: every Lint · job (Lint · PM dispatch-gates, Lint · scoped · tooling self-tests, Lint · repo & tooling gates, Lint · ESLint among them — these are the jobs that run the changed self-tests), Build Core, Build Docs, Test Core, Test UI, Type Check · source gates, Type Check · consumer gates. The self-test batteries this diff adds are therefore NOT yet answered by CI on this head; the PR body's local run is the dev's account, not a gate verdict. Note also that the queue guard's size leg is merge_group only, so its green on this pull_request event did not exercise the live card read.

① Derived judgments

  • sizeVerdict: exceeds is now the pull's own number OR a measured, non-exempt card total over the line; exceedsBy names the limb; the lift applies to either. Right: this is the ruling's rule (two 2,000-line pulls on one card are over in both).
  • Counted set: open and merged pulls that name the card; closed-unmerged excluded; a pull naming several cards counts toward each. Right against the ruling.
  • "Names": the tree uses namedCardNumbers (closing keyword, Part of, Refs, the protocol dev branch). Wider than the ruled option (the card's option A text: a closing keyword or Part of). Wrong as an unruled widening of an accept-set on a guard — see S2.
  • Exemption: pm:epic / tracking carried now, and labelled at or before the first counted pull opened. Narrower than the ruled "epic and tracker cards do not accumulate"; it is the seat design choice the ruling comment names and the 维护者速读 states. Right as built, pending the maintainer's confirm-or-strike. Wrong in one band: past the sibling or timeline cap the exemption is never reached — see M1.
  • Queue guard sizeReading / runSizeGuard: a new unreadable outcome (exit 9) when the card total was not read, and when no readCard is supplied. Right in direction (never "under"); wrong in that it is not liftable — see S1.
  • pr_enqueue_front size fence: holds only when the card was read and neither limb is over, or the approval lifts. Right in direction; same S1 caveat (c.card?.measured === true gates the lift disjunct too).
  • --pr: reads the card and refuses with EXIT_CANNOT_SWEEP on an unread total. Right in direction; M1 and S1 apply.
  • --branch, --test, the post-merge sweep, dispatch-gates changedLineLines: read no card total and say so, with the reason and the readers that do. Right against the card's "or states why it cannot".
  • landedBeforeCrossing / crossedAt: implements row 7239077861's list. Wrong for a pull that grew after it opened — see S3.
  • New module scripts/pm/card-size.mjs and new exports (pullCardReading, makeCardReader, CARD_TOTAL_LINE, enqueueFrontCardWords, ENQUEUE_FRONT_CARD_TIMELINE_PAGES, the view field on both pull readers): internal tooling surface, nothing published. The module sits outside GOVERNED_SURFACES — see S4.
  • label-write.mjs --handoff: untouched; the card's last "done when" clause is the second PR's. Part of #38296 is the right relation; the card stays open.

② Semver level

No changeset, skip-changeset label present, Check Changeset success. The diff touches scripts/pm/** and one root package.json script line; nothing under a published package. That matches.
Clause-②: no — stands. No published contract is widened or narrowed; Metadata-protocol: none stands.

③ Boundary flags

  • Dev flag, the exemption timing (seat design, not ruled): answered. Built as the ruling comment describes, pinned by six cases, stated in the 维护者速读. The maintainer confirms or strikes at approval.
  • Dev flag, "names" is namedCardNumbers, wider than option A: ESCALATED to the maintainer, and graded S2 below. It is stated in the module header and the PR's acceptance notes, but not in the 维护者速读, which is where the ruling comment says the unruled reading is put for confirmation.
  • Dev flag, card-size.mjs is not on the register: ESCALATED, graded S4.
  • Dev flag, landing-operations.md goes stale on landing: answered as a follow-up; it needs its own card before this lands, since the reference will then contradict the instruments.
  • Dev flag, --handoff left for PR 2: answered; consistent with the claim's split plan, both halves Tier H.
  • Dev flag, overlap with pm-dispatch: read a decision analysis's Served-tier line by script, and judge it when the analysis is written (#38391 part 3 and the writer gap) #38492 on record-recognisers.mjs (import only): answered; no edit to that file here.
  • Unflagged, raised here: the siblings are read from cross-referenced timeline events, so a pull whose body dropped its mention of the card after opening still appears but is excluded as "mentions without naming", and a pull named by branch alone is never seen. The second is stated in the module; the first is not. Left as N2.
  • SQL push-down: not applicable. No query, driver or data-layer code is in this diff; the new reads are GitHub REST reads.

④ Design judgment

M1 (must-fix) — an exempt epic/tracker card past the cap is UNREADABLE, never exempt. readCardSize (scripts/pm/card-size.mjs) refuses when the siblings exceed siblingCap (CARD_SIBLING_CAP, 60 cross-referenced pulls, counted BEFORE the naming filter, so prose mentions count) and on a timeline it cannot read whole (1,000 events in makeTimelineReader and in readEnqueueCard), and only after every sibling GET does cardTotalVerdict consult cardExemption. So the cards the ruling exempts ("epic and tracker cards do not accumulate") are exactly the ones most likely to trip the cap, and for them every pull that names the card (Part of, Refs, a closing keyword) gets measured: false: --pr exits EXIT_CANNOT_SWEEP, the queue guard's size leg exits 9 and refuses the whole merge group, and the pr_enqueue_front fence refuses. That is the opposite of the ruling in that band, on the fleet landing path, and no case in any of the four batteries reads an exempt card through readCardSize at or past the cap. An exempt card under the cap also pays a GET per cross-referenced pull for a total it then discards. The exemption can be settled before the cap: pull numbers ascend with creation, so the first counted pull is found by walking siblings in ascending order and stopping at the first that counts. Fix shape is the dev's; the requirement is that an exempt card is exempt whatever its size, with a case that pins it at the cap.

S1 (should-fix) — an unread card total is a refusal no approval lifts. In sizeReading (check-governed-queue-guard.mjs) an unmeasured card returns unreadable before the lift is consulted (runSizeGuard reads the approval only for oversized); in ENQUEUE_FRONT_FENCES (fleet-write/ops.mjs) c.card?.measured === true is conjoined ahead of c.approval?.lifts === true, and enqueueFrontPreflight does not even read the approval when the card is unread and the pull is under the line; --pr refuses before the verdict. The worst an unread total can be is "over the line", and over the line with an authorised approval is a lifted landing under the 2026-09-27 ruling. As built, a maintainer-approved pull whose card cannot be read (a sibling GET that answered 502, a card over either cap) cannot land through the seat at all, and it takes its merge-group neighbours out with exit 9. A pull that is itself over the line and approved landed before this diff and is refused after it when its card is unread: a regression of the lift. The 维护者速读's own account ("最坏是多拦一次改由人审") is not what the tree does. An unread total should fall to the Tier H path, not past it.

S2 (should-fix) — Refs and the branch name count as naming, which the ruling did not settle. The ruling settles "the card's option B", and option A's text is "names the card with a closing keyword or Part of". namedCardNumbers' own contract in record-recognisers.mjs says it is "NOT a delivery relation" and "WIDER … on purpose, and for ONE reader" (the low-risk arm's label read, where one card too many costs two reads). Here one card too many has a different cost: a pull that only Refs #N both inherits #N's total and adds its own size to it for every later pull, merged pulls count forever, so a commonly cited card accumulates past 3,000 and every pull that cites it becomes Tier H (or, with M1, unreadable). That moves the maintainer's review load by a relation the maintainer was not asked about. Either narrow the relation to the ruled pair, or keep it and get it ruled; as it stands it is an unruled rule-shape choice on a guard instrument, and the place the ruling comment names for such a choice (the 维护者速读) does not carry it.

S3 (should-fix) — landedBeforeCrossing misses a sibling that landed before the card truly crossed, when a later pull grew. cardTotalVerdict places each pull at its OPENING with its size NOW (the jsdoc's own warning). Pull A opens, pull B opens small, A merges on seat review while the card is under the line, B then grows past it: crossedAt is B's opening, which precedes A's merge, so A is "merged after the crossing — it met the line itself" and is not listed. A landed with no maintainer look and row 7239077861 lists exactly that pull. The same reading returns an empty list on the card's own motivating case as the PR body reports it (card #36860: #36881 open at 1,309, #36926 merged at 2,887 — the higher-numbered pull opened later, so the crossing is its own opening and it is not "before" itself). The list is printed by renderCardLines in this PR and is what PR 2's hand-off will consume, so the under-listing ships here. A list that errs toward naming a merged sibling the maintainer has already seen costs a glance; one that omits an unseen landing defeats the row.

S4 (should-fix) — the per-card predicate lives off the register. card-size.mjs now decides the exempt labels, the sibling cap, what counts and what is over the line for three Tier H guard instruments (guard-register, guard-queue, guard-tiers in GOVERNED_SURFACES), which only call it. A later pull that edits card-size.mjs alone (one more label in CARD_EXEMPT_LABELS, a changed counting rule) touches no governed path and lands on seat review, which reopens by another door what this card closes. The clause2-line.mjs precedent the PR cites is a line parser, not a tier predicate. The row belongs in check-governed-merges.mjs, which this PR already edits and the maintainer already approves; the PR leaves it as "the maintainer's call" without putting the question where the maintainer reads.

N1 (nit) — makeCardReader's jsdoc says a sibling queued beside the pull "is read once"; that holds for the pull GET (oncePerPull) but the card timeline is read once per queued pull, twice for two queued pulls of one card.
N2 (nit) — the module's "what this cannot see" list omits a pull whose body named the card when it opened and was edited to drop the naming before it merged: its cross-referenced event stays, the pull is read, and it is excluded as "mentions the card without naming it".
N3 (nit) — --pr hands the card reads a token only on the env-token channel; on the anonymous channel a card with many siblings will meet the unauthenticated rate limit and refuse. It follows the low-risk arm's existing convention at the same call site.
N4 (nit) — fleet-write/execute.mjs's card case is the incremental form read from one side (a 46-line pull beside a merged 2,990-line sibling), not the card's literal "two 2,000-line pulls … in both"; the other three readers carry the literal case.

What holds, checked against the live tree: the card limb in sizeVerdict and both renderers; the closed-unmerged exclusion; the exemption replay (label after the first pull, removed, removed and re-added); fail-closed on a thrown timeline, a thrown or empty sibling read, an unloaded naming relation and a missing readCard; cardPullView taken off the same GET in both pull readers; the card timeline read needs no new workflow scope (the low-risk arm's readOneCardLabels already reads card timelines with the same reader); dispatch-gates and the sweep state why they read no total.

Implemented-by: claude/issue-38296-card-size-readers
Reviewed-by: isolated L2 sub-agent of session_01WGufziVTGyPT8jQDhRuAu5

VERDICT: FAIL

…rst, unread totals to the human path

Round-1 contract review findings on the per-card line (ruling 7303003476):

- M1: the epic/tracker exemption is read off the card timeline before any
  sibling, dated against the card's first pull cross-reference or this
  pull's opening, so an exempt card past the sibling cap is exempt, never
  unread. The card timeline is read to 30 pages.
- S1: an unread card total is read as over the line, so the pull lands on
  its own authorised approval or by the maintainer; --pr no longer refuses,
  the queue guard reads it as oversized (liftable), and the front-of-queue
  fence holds on the approval alone.
- S2: the counted relation is the new countedCardNumbers (closing keyword,
  Part of, dev branch), never Refs.
- S3: a card read over the line lists every merged sibling for the
  after-the-fact look, not a subset by opening order.
- S4: the predicate moves into check-governed-merges.mjs (guard-register);
  card-size.mjs is gone and its battery moves with it.

Claude-Session: https://claude.ai/code/session_01WGufziVTGyPT8jQDhRuAu5
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufziVTGyPT8jQDhRuAu5

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: d0395fd5e756ef52542613b067224bb4a6bf2088
Local-runs: none
Scope: scripts/pm/check-governed-merges.mjs, scripts/pm/check-governed-queue-guard.mjs, scripts/pm/record-recognisers.mjs, scripts/pm/dispatch-gates.mjs + scripts/pm/fleet-write/ops.mjs, scripts/pm/fleet-write/execute.mjs

Delta review of a1b8ad6e43352eceb5004f8bf53b6065a6699ea4..d0395fd5e756ef52542613b067224bb4a6bf2088, against the round-1 record on the earlier head. Read: the delta (7 files; scripts/pm/card-size.mjs deleted, scripts/pm/record-recognisers.mjs newly in the PR), the moved predicate in the live tree at this head (check-governed-merges.mjs, "The per-card count" section through sizeVerdict, runPullMode, pullCardReading), the PR's current file list, and the check-runs on this head. record-recognisers.mjs is a governed path (guard-records), so it joins the hits on this head. package.json and the self-test hunks stay the lane seat's ACCEPT.

Check-runs at the time of reading (2026-12-01): completed success — Governed Surface Queue Guard, PR-body guards, Check PR Size, Type Check · workspace, Type Check · debt ledger, Dogfood Regression Gate, Test UI, Lint · scoped · query-options erasure, Auto Label, filter. None failed. STILL IN PROGRESS, so no verdict yet: Lint · PM dispatch-gates, Lint · scoped · tooling self-tests, Lint · repo & tooling gates, Lint · ESLint, Lint · docs & code guards, Lint · CI, release & engine gates, Lint · scoped · slot lookup & corpus, Type Check · source gates, Type Check · consumer gates, Plan Test Core shards. The jobs that run the changed self-test batteries had not concluded on this head when it was read; this record judges the design and does not stand in for them. As before, the queue guard's size leg runs on merge_group only, so its green here did not exercise the live card read.

① Derived judgments

  • sizeVerdict: a card reading that is present and did not read now makes exceeds true with exceedsBy: 'card', and the lift applies. Right: unread falls to the human path and no lower. A size with no card key (--test, --branch, the sweep) is unchanged.
  • Queue guard sizeReading: the card-specific unreadable branch is gone; an unread card is oversized (exit 8) and runSizeGuard consults the approval and the enqueue reading for it. Right. A pull with no size pair is still unreadable (exit 9), unchanged.
  • pr_enqueue_front size fence: holds when the pull and a READ card are under the line, or on the authorised approval alone; enqueueFrontPreflight reads the approval when the card is unread. Right.
  • --pr: no longer refuses on an unread card; the reading rides on the verdict and lands as over the line. Right.
  • Counted relation: countedCardNumbers (closing keyword, Part of, the protocol dev branch; no Refs), exposed as countedCards, used by all three readers; namedCardNumbers and its one reader are untouched. Right: the ruled pair, plus the branch (still a stated seat reading, and the one by which the pull under test finds its own card).
  • Exemption: read off the timeline before any sibling, dated by cardFirstPullAt (the earliest of this pull's opening and the card's first same-repository pull cross-reference). An exempt card reads no sibling and no cap applies. Right against "epic and tracker cards do not accumulate"; the dating differs slightly from round 1's and is noted as N5.
  • landedBeforeCrossing: every merged sibling, never the pull itself, of a card read over the line; crossedAt kept as information only. Right against row 7239077861, and it errs toward listing.
  • Card timelines read to CARD_TIMELINE_PAGES (30 pages) in --pr, the queue guard and the relay fence; the low-risk arm's own timeline reader keeps its 10. Right.
  • The predicate now lives in check-governed-merges.mjs, the guard-register row. Right.

② Semver level

No changeset, skip-changeset label present. The diff is scripts/pm/** only (the root package.json script line is back to main's text); nothing published. Check Changeset had not reported a non-skipped run on this head when read.
Clause-②: no — stands. Metadata-protocol: none stands.

③ Boundary flags

④ Design judgment

M1: closed
S1: closed
S2: closed
S3: closed
S4: closed

No must-fix, no should-fix.

How each was checked in the tree:

  • M1 — readCardSize computes cardExemption(timeline, cardFirstPullAt(...)) straight after the timeline read and, when exempt, pushes a verdict over [self] and continues; the sibling cap and every sibling GET sit after it. A case pins an epic with 80 cross-references as exempt with zero sibling reads and one API call, beside its controls (a label after the first cross-referenced pull exempts nothing; a non-exempt card over the cap is unread).
  • S1 — cardExceeds = card !== null && (card.measured !== true || card.exceeds === true) in sizeVerdict; the queue guard's early return is deleted and a case pins an unread card with an authorised approval as lifted, exit clear, and without one as oversized; the fence's lift disjunct no longer sits behind measured === true, and over in enqueueFrontPreflight includes card.measured !== true.
  • S2 — countedCardNumbers omits refsTargets; pinned (Refs #3333 counts toward nothing while namedCardNumbers still names it). All three readers call countedCards for both the pull's own cards and the sibling filter.
  • S3 — landedBeforeCrossing is counted.filter(not self, merged) whenever exceeds; no opening-order subset remains.
  • S4 — card-size.mjs is deleted and nothing in the tree references it; the constants, the exemption and the counting are exported from check-governed-merges.mjs, and the mirror pin against card-pick.mjs's PARENT_LABELS moved with them.

Round-1 nits: N1 fixed (the jsdoc now says the timeline is read once per queued pull). N2 fixed (the edited-out naming is in the blind-spot list). N3 and N4 stand as accepted deviations.

N5 (nit) — cardFirstPullAt dates the card's first pull by ANY same-repository pull cross-reference event, a prose mention or a closed-unmerged pull included, where round 1 used the first counted pull. So a tracker that some pull mentioned before it was labelled is never exempt. It errs toward accumulating, which is the human path, and it is what lets the exemption be read without a sibling GET. Conversely a card whose earlier pulls never mentioned it in their bodies has no cross-reference to date it by; that is the branch-only blind spot the header already states. Accepted as built; the header could say that a mention is enough to date the first pull.

Implemented-by: claude/issue-38296-card-size-readers
Reviewed-by: isolated L2 sub-agent of session_01WGufziVTGyPT8jQDhRuAu5

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

L1 review · PR #38866 (#38296 PR 1) · head d0395fd · 2026-12-01T08:08Z

ACCEPT. I read the L2 at this head: round 1 7304223803 FAILed, and delta 7304521055 PASSes with M1 and S1 to S4 closed. Only N3 to N5 remain, accepted as deviations. Tier H goes to the maintainer through the seat.

What I checked:

  • l1-face.mjs --pr 38866: CLEAN, with 26 checks success and 0 failed or pending. mergeable_state is clean.
  • Self-tests, run locally at the head (exit 0 each):
    • check-governed-merges --self-test;
    • check-governed-queue-guard --self-test, 651 cases;
    • record-recognisers --self-test, 490 cases;
    • dispatch-gates.self-test;
    • fleet-write/execute --self-test, 483 cases.
  • Against ruling 7303003476. cardTotalVerdict counts a pull that names the card and is open or merged. It excludes closed-unmerged pulls and pulls that mention the card without naming it. On a card over the line, landedBeforeCrossing lists every merged sibling (row 7239077861), with no block and no revert.
  • Exemption. cardExemption replays labeled/unlabeled and exempts only when a label from pm:epic or tracking was put on at or before the card's first pull. It is read before any sibling, so an epic is never made unread by the 60 cap. The label pair is pinned equal to card-pick.mjs PARENT_LABELS by reading it as text.
  • Fail-closed paths.
    • Each of these gives measured: false: an unread timeline, an unread sibling, a sibling with no additions/deletions pair, or more than 60 siblings.
    • sizeVerdict then reads exceeds with exceedsBy: 'card', and the lift still applies.
    • The pr_enqueue_front size fence holds under the line only when the card is measured and under, and otherwise on an authorised approval alone. No reader treats an unread total as under the line.
  • Seat design choices. The 速读 states both for the maintainer to confirm or strike: the exemption counts only a label that predates the first pull, and Refs does not count. That is what ruling 7303003476 asked for.
  • Scope. All 7 files are inside claim 7303323631 as amended. label-write.mjs is PR 2's file and is not in this diff. Part of #38296 is right, because --handoff follows in PR 2. No changeset is needed, since scripts/pm/** is not published.
  • Serial. feat(pm): read a decision analysis's Served-tier / Analysed-by pair, judge it at write, and list the decision box by tier #38867 also edits record-recognisers.mjs. Whichever PR lands second merges main and re-runs its self-test, as the claim says.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS

席位核对

ACCEPT — PR #38866 @ d0395fd5e756ef52542613b067224bb4a6bf2088 (card #38296, PR 1 of 2, the readers; card thread session_01WGufziVTGyPT8jQDhRuAu5, claim 7303323631 + amendment). Checked 2026-12-01T08:09Z against GitHub, not the reports.

  • Shape: draft, base main, Part of #38296, mergeable_state clean. l1-face.mjs --pr 38866 CLEAN (13 items). Seven files, +738/-42, all under scripts/pm/: check-governed-merges.mjs, check-governed-queue-guard.mjs, dispatch-gates.mjs + self-test, fleet-write/execute.mjs, fleet-write/ops.mjs, record-recognisers.mjs.
  • I read the body and the diff's shape against ruling 7303003476 (option B + row 7239077861):
    • One per-card predicate lives in the register's own file. Siblings come from same-repo cross-referenced pulls, each read and kept only if it counts. Closed-unmerged pulls do not count.
    • Exemption is pm:epic / tracking, but only when its latest labeled event is at or before the card's first pull. This is the seat's anti-dodge reading, stated in the 速读 for the maintainer to confirm.
    • An unread or over-cap card total fails closed, as Tier H / oversized, liftable only by an authorised approval.
    • The queue guard and the pr_enqueue_front fence read the same card total.
    • Refs does not count. This is the second seat reading put to the maintainer in the 速读.
    • Merged siblings are listed (landedBeforeCrossing) for PR 2's hand-off.
    • Live check in the body: --pr 36881 now reads card 元数据列表列改为在 spec 里声明,经 /meta/types 下发(像表单布局一样);第一批补上 hook、flow、job 等类型的关键列 #36860 at 4,196 lines, OVER BY THE CARD.
  • Gates (check-runs on the head): 26 success · 24 expected skip · 0 failed · 0 pending.
  • Reviews on this head: contract review round 1 FAIL 7304223803, then delta PASS 7304521055 at CONTRACT_REVIEW_TIER (M1, S1–S4 closed); L1 ACCEPT 7304932772 (osa-L1-a).
  • Landing: check-governed-merges.mjs --pr 38866 reads Tier H, because record-recognisers.mjs and the guard instruments are always-H. 780 lines ≤ 3000; the card total is under the line too. So: hand-off to the approvers.
  • Serial: feat(pm): read a decision analysis's Served-tier / Analysed-by pair, judge it at write, and list the decision box by tier #38867 (pm-dispatch: read a decision analysis's Served-tier line by script, and judge it when the analysis is written (#38391 part 3 and the writer gap) #38492) also edits record-recognisers.mjs. Whichever lands second merges main and re-runs that self-test.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS

维护者速读

  • 是什么:你在 pm: guards read the 3,000-line human-review line per pull request — make them follow the per-card total (#36914 follow-up) #38296 上点的「点名的都算,专题卡豁免」的第一个 PR(读数部分)。几个落地守卫(单 PR 核查、合并队列守卫、队首插队)改为按整张卡合计 3,000 行人审线:同一张卡已开和已合并的 PR 一起算,关闭未合并的不算,专题卡和跟踪卡不累计。卡合计读不出来时一律按越线处理。
  • 为什么:堵住"一张卡拆成几个小 PR、各自都不过线"的口子。实测例子:卡 元数据列表列改为在 spec 里声明,经 /meta/types 下发(像表单布局一样);第一批补上 hook、flow、job 等类型的关键列 #36860 的两个 PR 合计 4,196 行,以前各按单个 PR 算都在线下。
  • 要你确认的两处席位读法(批准即按此定,想改在 PR 上说一句):
    1. 专题卡豁免只认在这张卡第一个 PR 之前就挂上的专题或跟踪标签,防止事后改标签绕过。
    2. 只「引用」这张卡(Refs)的 PR 不计入合计;「修复」或「属于」这张卡的才算。
  • 风险:只改落地守卫脚本,不碰产品代码,撤回即恢复按单个 PR 计。交接路径(列出已合并的同卡 PR 给你补看)在第二个 PR,等本 PR 合并后开。
  • 要你做什么:批准这个 PR(Tier H,守卫脚本)。契约审核 delta PASS 7304521055;L1 ACCEPT 7304932772。Head-sha: d0395fd5e756ef52542613b067224bb4a6bf2088。

席位意见:同意落地。ACCEPT → PR #38866 comment 7304961484。

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Dec 1, 2026
@objectstack-fleet
objectstack-fleet Bot requested a review from os-zhuang December 1, 2026 08:10
@objectstack-fleet objectstack-fleet Bot closed this Dec 1, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS

Withdrawn · 2026-12-01T08:17Z · the maintainer withdrew this work in this account's fleet project (2026-12-01T08:14Z): 「就这样就可以 3000 行人审线按单个 PR 算」, then 「撤掉」. The guards keep counting the 3,000-line line per single PR. The ruling is recorded on #38296 (7305111979).
So the seat's ACCEPT 7304961484 and hand-off request 7304976971 are void, and nothing here awaits review. pm:awaiting-merge is removed. The branches claude/issue-38296-card-size-readers and claude/issue-38296-card-size-handoff-wip stay pushed.

@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Dec 1, 2026
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…line (objectstack-ai#38878)

<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBAaFqBXVHz1V3gDNV3Gped3)_

Fixes objectstack-ai#38296

Clause-②: no
Metadata-protocol: none
Rule-change: ruled
Ruling-ref: 「开发的技能是否可以不要可以拆开绕过审核」 (the maintainer, project thread,
2026-12-01 08:15Z, recorded on objectstack-ai#38296 in comment 7305111979), and his
card choice "只在开发指令加一行" (2026-12-01 08:55Z, scope note 7305995610)

## 维护者速读

- 用户无感:开发子代理的指令里加一句,不准为了压到 3,000 行人审线以下把一张卡拆成多个 PR,超线就开一个 PR 走人审。
- 是你撤掉"守卫按卡合计"之后要的替代做法:守卫照旧按单个 PR 计,改为在开发侧直接禁止拆卡绕审核。
- 只改一行指令文字,不碰任何脚本;写错了直接撤回这一行即可。
- 无。

## What changes

`.claude/agents/os-dev.md`, under "Definition of done", right after the
draft-PR line, gets one new line:

> - ⛔ 不为压 3,000 行人审线拆卡:超线一个 PR 走人审。

This is the dev side of the rule. The seat side, where a card's PRs are
summed and a split card still goes to the maintainer, already stands in
`references/landing-operations.md` and is unchanged. The guard
instruments keep counting per single PR, per the maintainer's reversal
in comment 7305111979. The per-card guard work in objectstack-ai#38866 is withdrawn
and closed unmerged.

## Tests

Text only. No code changed and no test applies.

## Acceptance notes

- The line was compressed to 70 bytes to fit the file's byte ceiling in
`check:pm-skill-ratchet` (33,477 of 33,491 bytes, headroom 14). The
longer wording first proposed to the maintainer was 85 bytes over that
ceiling. The clause it dropped, "a split still goes to the maintainer",
is already the seat's rule in `landing-operations.md`.
- Changeset: none. `.claude/**` is not published (fast path), so
`skip-changeset` rides on this create.

**Read first:** `.claude/agents/os-dev.md`, the added line under
"Definition of done".

## Verification

**Two-minute check:** run `pnpm check:pm-skill-ratchet`. You should see
`.claude/agents/os-dev.md is 33477 bytes (ceiling 33491; headroom 14)`.

<details><summary>dispatch-gates command list</summary>

`node scripts/pm/dispatch-gates.mjs --commands` for this path derived 25
commands, all run locally:

- 24 passed (exit 0), among them `check:pm-skill-ratchet` after the
compression and `check:commit-card-trailers`.
- 1 PREREQUISITE NOT MET (exit 3): `pnpm --filter @objectstack/lint run
check:doc-formula-expressions` needs the lint and formula packages
built. Nothing was measured, and this diff touches no doc formula.

</details>

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(Not touched.)
- [x] 2. Every name I added uses the casing for its kind. (None added.)
- [x] 3. No formatter ran; `pnpm lint` passes.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset. (Nothing
publishes.)
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (Not touched.)
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English. (Except the quoted
rule line and the 维护者速读, as the fleet rules allow.)
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01WGufziVTGyPT8jQDhRuAu5

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file size/l skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants