Skip to content

fix(pm): label-write --land reads the dogfood report on every card a fold's equal Fixes lines deliver - #35753

Merged
os-zhuang merged 3 commits into
mainfrom
claude/project-thread-fatvim
Nov 20, 2026
Merged

os-zhuang merged 3 commits into
mainfrom
claude/project-thread-fatvim

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread
Fixes #35651
Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户无感:这是车队内部的落地工具;改动后,合并成一个拉取请求的多张卡,每张都写"修复"也能走自动落地,不必再把其中一张手工降级。
  • 为什么做:落实"共享同一文件或机制的卡默认合并成一个拉取请求"这条常设指令,去掉每次合并都要手工关卡的那一步。
  • 出错会怎样:只影响席位落地带破坏性标记的合并拉取请求时的那道冒烟测试检查;出错时它照旧拒绝、不写任何东西,直接撤回本拉取请求即可恢复原行为。
  • 要你做什么:无。

What changes

label-write.mjs --land runs a dogfood-battery gate on a breaking or narrowing pull. It asked deliveredCardNumber for the ONE card thread holding the os-dev-report; a folded pull carries one Fixes line per card at equal strength, deliveredCardNumber reports that tie (card: null) instead of breaking it, and the gate refused with "no card". The workaround was demoting a line to Part of and closing that card by hand.

This takes the seat's Route B and leaves the record pairing alone:

  • scripts/pm/record-recognisers.mjs: a new exported sibling, deliveredCardsAtStrongest(pr), returns every delivered card at the strongest grade, in body order, with that grade. It and deliveredCardNumber both answer from one private enumeration (strongestDeliveredRows), which asks deliveryEvidence exactly as before, so there is no second parser. deliveredCardNumber's answers are unchanged, the tie included, so the queue guard's and check-owed-reviews.mjs's pairing behaves byte-identically. Its docblock rule ("AMBIGUITY IS NOT RESOLVED, it is REPORTED") still holds: nothing picks a card by number order.
  • scripts/pm/label-write.mjs landDogfoodGate: on a tie it reads EVERY tied card's thread in full, with the same page cap, the same trusted-author filter and the same sibling-pull rule as the single-card path. It lands when the head, or one shared first-parent walk from it, reaches ANY tied card's battery sha. The verdict cannot depend on reading order. A tie refusal names every tied card read and why each failed (landDogfoodRefusal prints reports: card #A …; card #B …). A tied thread that does not read is still exit 3 (unread: true), and one that cannot be read whole still refuses, whatever the other cards carry. A body naming no card still refuses as before. The single-card path keeps its reads and messages: all 50 pre-existing cases in that battery pass unchanged.
  • The --land pass line on a tie adds · a tie of N cards (#A, #B), every thread read, cleared by card #A comment X.

Not touched: .claude/** (no tie-break line was added, so the card's third Done-when bullet, execution-duties.md's fold text, does not apply), check-governed-queue-guard.mjs, check-owed-reviews.mjs.

Branch note for the Duplicate Fix Guard: claude/project-thread-fatvim is the platform-fixed branch of this card thread, the only branch this container can push. It is not issue-numbered, and the card is #35651.

Read first (by risk)

  1. scripts/pm/label-write.mjs landDogfoodGate: the readCard / outcomes / pass / walkRefuse hunk. Risk: the single-card path must stay unchanged in reads and in text.
  2. scripts/pm/record-recognisers.mjs strongestDeliveredRows / deliveredCardNumber: the refactor must leave deliveredCardNumber's answers exactly as they were.
  3. scripts/pm/label-write.mjs landDogfoodRefusal and the ② dogfood gate ✓ line: the printed shape on a tie.

Two-minute verification

node scripts/pm/label-write.mjs --self-test: expect ✓ label-write self-test: 334 cases pass across 18 batteries, with the case ⭐ PASSES: a ! fold whose body carries TWO Fixes lines and a dogfood report on the chain-head card among them.

Tests

Final head c398e4802.

  • label-write.mjs --self-test: the dogfood-gate battery floor goes from 50 to 65, with 15 new cases. Passing cases: two Fixes with the report on the chain-head card; the same with the lines swapped (order-independence, threads read in body order [WIP] Create a new release version #9 then Convert to monorepo with scoped packages #8); the report on the second-named card; a Part of tie; a tied card's battery one merge of main below the head, over an n/a on the other card; the sibling-pull rule applied per card. Refusing cases: no tied card carries a report (it names both cards and why each failed); n/a on one card and a non-merge walk on the other; a shared walk refused on a non-base merge; the walk naming each distinct battery sha once; an untrusted report on a tied card. NOT MEASURED cases (exit 3): an unread tied thread, even with the other card clearing, and an unread walk commit on a tie. One case for a tied thread answering no list. One structural pin: the gate reads a tie only through deliveredCardsAtStrongest(pull.json), enumerates nothing itself, and ranks nothing (sort, Math.min/Math.max absent).
  • record-recognisers.mjs --self-test: one new battery (8 cases), and the roster floor goes from 19 to 20. Its cases: a two-keyword tie in body order and never sorted; deliveredCardNumber still card: null on that body; a Part of tie; a stronger grade leaves one card; a branch adds nothing once the body speaks; no card gives an empty result; a control that one card in the tie equals deliveredCardNumber's card on every fixture, and none equals its null; a structural pin that both relations call strongestDeliveredRows(pr) and neither calls deliveryEvidence( directly.
  • check-governed-queue-guard.mjs --self-test passes unedited. Its existing case ⛔ and-a-pull-request-delivering-TWO-cards-at-equal-strength-picks-NEITHER already pins the pairing unchanged on a tie: it refuses and reads only the PR thread.
Self-test readings (final head)
node scripts/pm/label-write.mjs --self-test                 EXIT=0  ✓ label-write self-test: 334 cases pass across 18 batteries
node scripts/pm/record-recognisers.mjs --self-test          EXIT=0  ✓ record-recognisers self-test: 459 cases pass
node scripts/pm/check-governed-queue-guard.mjs --self-test  EXIT=0  ✓ check-governed-queue-guard self-test: 581 cases pass
node scripts/pm/check-owed-reviews.mjs --self-test          EXIT=0  ✓ check-owed-reviews self-test: 94 cases pass in 10 batteries
Ablation: the gate hunk reverted to origin/main, with the fix committed

Done with scripts/ablation-replace.mjs. The anchor was the new gate body, from const delivered = deliveredCardNumber(pull.json); to the end of the function, and the replacement was the same region at 598a34d04. Then node scripts/pm/label-write.mjs --self-test ran.

ablation-replace:   anchor hits 1 time(s), as declared
ablation-replace: ok mutation landed: anchor 1 -> 0, blob eabe0e5d1a57 -> 550b388c54c3
  ✗ ⭐ PASSES: a `!` fold whose body carries TWO `Fixes` lines and a dogfood report on the chain-head card — exit 0, ready and armed, both threads read — … why: no card: it delivers 2 cards at the same strength (#8, #9, via a closing keyword) …
  ✗ …the verdict does not follow number or body order: …
  ✗ …and a report on the SECOND-named card clears it the same way — …
✗ label-write self-test: 15 of 334 case(s) failed.
ablation-replace: ok restored: blob == HEAD (eabe0e5d1a57) and `git diff HEAD` is empty

All 15 new cases went red on the old gate: every fold refuses with "no card". The 319 earlier cases stayed green. The restore was proven by blob hash equal to HEAD and an empty git diff HEAD.

Acceptance notes

Verification

Local subset at c398e4802, with each exit code captured before any pipe: the 64 families node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derives for this diff (2 paths).

  • 63 exit 0. This includes pnpm check:pm-dispatch-gates (✓ dispatch-gates self-test (fast tier): 2249 cases pass), pnpm check:pm-label-write, pnpm check:pm-record-recognisers, node scripts/pm/check-governed-queue-guard.mjs --self-test, pnpm check:nul-bytes and pnpm check:issue-citations.
  • 1 NOT MEASURED: pnpm check:i18n-coverage exit 3, PREREQUISITE NOT MET. It needs the built workspace closure (dist/), this diff touches no package, and it is left to CI.
  • node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran ran.list: ✓ dispatch-gates --ran: 64 derived famil(ies) accounted for — 63 run, 1 NOT-MEASURED.
  • node scripts/pm/overlap-check.mjs --branch=claude/project-thread-fatvim: VERDICT clean exit 0 before each push.
  • No changeset: scripts/pm/** publishes nothing, so this PR carries skip-changeset. No ! in the title and no (narrowing) arm, so the dogfood battery is n/a.
  • Every other family (lint, typecheck, Test Core, the governed queue guard) is CI's, read from this PR's check-runs.

🤖 Generated with Claude Code


Generated by Claude Code

…e pairing that still refuses one

deliveredCardsAtStrongest returns the delivered cards at the strongest
grade, in body order, from the same enumeration deliveredCardNumber
answers from. deliveredCardNumber is unchanged: it still yields no card
on a tie, so the queue guard's record pairing does not move.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgVv6gTt6GofcDEN2Bd
…fold's equal Fixes lines deliver

A folded pull carries one closing keyword per card, and deliveredCardNumber
reports that tie rather than break it, so the gate refused with no card.
The gate now reads every tied card's thread whole, under the same author
filter and sibling-pull rule, and lands when some tied card's battery is
reached from the head by the same first-parent walk. A refusal names every
tied card and why each failed; a body naming no card still refuses.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgVv6gTt6GofcDEN2Bd
…line the census pins

The header names deliveredCardsAtStrongest on deliveredCardNumber's own
line, so the dispatch-gates declaration census still reads line 77.

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgVv6gTt6GofcDEN2Bd

Final head for L1: c398e48023dcc3c0b7c022ff68e5db5cd8b07504 — green: 26 check-runs success, 23 skipped, 0 other, read 2026-11-20T05:42Z. mergeable_state: clean. check-governed-merges.mjs --pr 35753: not governed, 296 changed lines. Dev report: comment 7031265944 on #35651 (dogfood_battery: n/a, no ! and no (narrowing) arm). L1 goes to thread L1-a.


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgTcFanGhTvqS1V2Q4U

维护者速读

  • 用户能看到什么变化:用户无感,这是车队内部的落地工具。以前把几张卡合成一个拉取请求、每张都写"修复"时,带破坏性标记的自动落地会被冒烟测试那道检查以"找不到卡"拒掉,只好把其中一张手工降级再手工关卡。现在这道检查会把每张卡都读一遍,只要其中一张卡上有覆盖当前代码的冒烟测试报告就放行;全都没有就拒绝,并逐张说明原因。
  • 出错会怎样:只影响这一道落地前检查。任何一张卡读不到,照旧按"没测到"拒绝,不写任何东西;撤回本拉取请求即恢复原样。
  • 要你做什么:现在不需要。但要注意顺序:如果 chore(governance): the guard scripts join the governed register, .claude/** lands by declared rule-change, a declared narrowing waits for the maintainer #35610(把守门工具列入你亲批名单)先合并,本拉取请求改到的 record-recognisers.mjs 就会变成需要你亲自批准才能合并的文件。

席位核对 — ACCEPT (L1-a) · repo:objectstack#1 · head c398e48023dcc3c0b7c022ff68e5db5cd8b07504 · 2026-11-20T05:45Z

  • Shape — draft, base main, 3 commits (1e996b08, 397e174d, c398e480), 2 files (scripts/pm/label-write.mjs, scripts/pm/record-recognisers.mjs), +227/−69. Merge-base 598a34d0. No main merge. Fixes #35651, Clause-②: no, Metadata-protocol: none, skip-changeset (nothing under scripts/pm/** publishes). NOT governed at this head. The contract face is TIER_DEFAULT: no schema and no governed path.
  • Ordering with chore(governance): the guard scripts join the governed register, .claude/** lands by declared rule-change, a declared narrowing waits for the maintainer #35610. chore(governance): the guard scripts join the governed register, .claude/** lands by declared rule-change, a declared narrowing waits for the maintainer #35610 (open, waiting on the approver) adds scripts/pm/record-recognisers.mjs to the register as Tier H. If it merges first, this PR's next queue read is Tier H and needs an authorized APPROVED review or the approver's own enqueue. This ACCEPT does not stand in for that. overlap-check reports the two as merging cleanly, and the new roster row and floor bump sit outside chore(governance): the guard scripts join the governed register, .claude/** lands by declared rule-change, a declared narrowing waits for the maintainer #35610's hunks.
  • record-recognisers.mjs, read in full
    1. A new private strongestDeliveredRows(pr) is the one enumeration over the closing-keyword, Part of and branch-name candidates. It asks deliveryEvidence and DELIVERY_EVIDENCE_PRECEDENCE exactly as before.
    2. deliveredCardNumber now answers from it, and its answers are unchanged: still card: null with the reason on a tie. So the queue guard's and check-owed-reviews.mjs's record pairing stays refusing on a tie. The queue guard's existing …TWO-cards-at-equal-strength-picks-NEITHER case passes unedited.
    3. The new export deliveredCardsAtStrongest(pr) returns { cards, evidence } in body order and never sorted. The new battery has 8 cases, among them a control that ties the two relations together on every fixture and a structural pin that neither calls deliveryEvidence( directly. The roster floor goes 19 → 20.
  • label-write.mjs landDogfoodGate, read in full
    1. Entry. A tie is entered only when deliveredCardNumber is null and the sibling returns ≥2 cards. A body naming no card still refuses with no card: …. The single-card path keeps its reads, its report/battery assignment before every refusal, and its wording. All 50 earlier cases in that battery pass unchanged.
    2. Each tied thread is read whole first, with the same page cap, the same recordAuthorTrusted filter and the same sibling-pull rule (readCard). A thread that does not read returns unread (exit 3), and one that cannot be read whole refuses. Both apply whatever the other card carries, so the gate fails closed and lands nothing it has not read.
    3. Verdict. It lands when the head, or the one shared first-parent walk over merges of the base, reaches ANY judgeable card's battery sha. The verdict does not depend on order: pass() filters every judgeable card at each step, and nothing ranks cards (the structural pin asserts no .sort(, Math.min or Math.max in the gate).
    4. The looser rule stays bound to the head. "Any tied card's report" is not a loosening the platform can exploit. Each report still has to carry a battery sha that the head, or a merges-of-base walk from it, reaches, and a non-merge step stops the walk. So a stale report from an earlier pull of a tied card cannot clear this head.
    5. Refusal wording. A tie refusal names every card read and why each failed. Walk failures carry the walk's reason on each judged card. landDogfoodRefusal prints reports: card #A …; card #B …, and the pass line adds a tie of N cards …, cleared by card #X comment Y.
  • Re-measured here at this head, in a scratch worktree, with no node_modules:
    • label-write.mjs --self-test: exit 0, 334 cases, 18 batteries.
    • record-recognisers.mjs --self-test: exit 0, 459 cases.
    • check-governed-queue-guard.mjs --self-test: exit 0, 581 cases.
    • One-time ablation, restored afterwards: the tie loop narrowed to cards.slice(0, 1), so only the first-named card is read. The fold pins went red: the pass on the chain-head card (it fails the both-threads-read check), the swapped order, the second-named card, the refusal naming both cards, the mixed n/a/walk case, the one-merge pass, the shared-walk refusal and the every-battery walk wording. The gate cannot quietly fall back to reading one card.
  • Nits (nothing owed)
    • On a tie, a thread that cannot be read whole (truncated, or no list) refuses even when another tied card would clear. That fails closed and is documented in the TSDoc. It is the right call, but it means a very long card thread blocks the whole fold.
    • The card is p2 under the standing p1-only order. It was dispatched before that order or under its exception list, so the order is the dispatcher's to check and is outside this review.
  • Gates — at this head: 26 success, 23 skipped, 0 failure. Mergeable clean.
  • Landing terms — not governed today, and no contract face is touched, so this L1 ACCEPT is the review of record and no L2 is owed. The card thread lands this head with every check green. If chore(governance): the guard scripts join the governed register, .claude/** lands by declared rule-change, a declared narrowing waits for the maintainer #35610 merges first, it lands only on an authorized approval (Tier H). A new push needs a fresh L1 unless it is a clean main merge.

Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgVv6gTt6GofcDEN2Bd

Landing (area b1-P) — head c398e48023dcc3c0b7c022ff68e5db5cd8b07504, read 2026-11-20T05:47Z.

Probe Reading
L1 ACCEPT (L1-a), comment 7031619244, on this head
L2 not owed: no Clause-②: yes, no narrowing, no published schema, no governed path (contract-review.md four faces)
check-governed-merges.mjs --pr 35753 NOT governed, 296 changed lines (≤ 3000); PR #35610 still open, so record-recognisers.mjs is not yet a register row
landing-k.mjs --pr 35753 OK, K = 1
check-runs 26 success, 23 skipped, 0 other; mergeable_state: clean

State change: ready + auto-merge now; on MERGED, #35651 closes by Fixes and its pm:dispatched comes off in the close-out.


Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 20, 2026 05:47
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 20, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Tier change · 2026-11-20T05:58Z · #35610 merged at 509289c and added scripts/pm/record-recognisers.mjs to the governed register. This PR edits that file, so check-governed-merges --pr 35753 on current main now reads GOVERNED, Tier H (296 changed lines, under 3000). The queue guard refused the group that held it (run 44683495267: no authorized APPROVED review, enqueued by the relay account). The head c398e480 is unchanged, L1-a ACCEPT 7031619244 covers it, and all checks on the head are green. The seat enqueues nothing more until approval.

@os-zhuang, could you review and approve c398e480? The change makes the --land dogfood gate read every card a fold PR ties (Fixes and Part of), so a fold PR with two Fixes lines no longer gets refused (#35651). Once you approve, the seat lands it. If you'd rather enqueue it yourself, that works too.

@os-zhuang
os-zhuang added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 0e2de25 Nov 20, 2026
50 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-fatvim branch November 20, 2026 06:18
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

Development

Successfully merging this pull request may close these issues.

pm scripts: a folded PR with two Fixes lines cannot pass label-write --land's dogfood gate, because deliveredCardNumber finds no single card

3 participants