Skip to content

docs(os-dev): a run past the foreground limit is declared NOT MEASURED, not sent to the background - #38684

Merged
os-zhuang merged 2 commits into
mainfrom
claude/issue-38668-no-background-gate
Nov 30, 2026
Merged

os-zhuang merged 2 commits into
mainfrom
claude/issue-38668-no-background-gate

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread

Fixes #38668

Clause-②: no
Metadata-protocol: none
Rule-change: yes

维护者速读

  • 用户能看到什么变化:用户无感;派出去的开发 agent 遇到十分钟内跑不完的本地检查,不再把它转到后台去跑,而是如实记成「本地没测」并交给 CI。
  • 为什么做:属于车队规则维护;原规则教的后台跑法正是权限审查会拒绝的做法,照做的 agent 白丢一次检查,还要事后解释。
  • 出错会怎样:带破坏性改动的 PR 原本在本地跑的全量实景回归,今后多半只能等合并队列第一次报红;撤回本 PR 即恢复原文。
  • 要你做什么:这是一次规则变更,请审阅后亲手合并。

What changes

Two sentences of .claude/agents/os-dev.md and one reading line of .claude/skills/pm-dispatch/references/readings-ci.md. No script, no test, no ceiling row.

  1. os-dev.md, 资源纪律 item 1, the background-run bullet. It prescribed nohup … & plus tail --pid for anything past the foreground limit, the form the dev sessions' permission classifier refused. It now reads: a run that cannot finish inside the foreground limit is never moved to the background, in any spelling; it is declared in the --ran record as NOT-MEASURED COMMAND :: REASON (the file spells the two placeholders in its own notation) and CI carries it.
  2. os-dev.md, 干净收尾 item 4. The line told a dev to read a still-running gate's log (the redirect target) at report time, which only makes sense beside a detached run. It now reads: a report holds no gate that is still running; one that did not finish in the foreground is recorded NOT MEASURED with the measured reason, and CI carries it.
  3. readings-ci.md, the check:pm-dispatch-gates reading. It carried the same prescription (detach plus tail --pid) beside a reading of 1216 to 1246 s. It now carries the reading taken for this PR, 404 s in the foreground for the fast tier, and says to run it in the foreground.

Nothing here looks for another way to get a background run past the permission check. The change removes the request to run in the background.

Byte arithmetic (wc -c, ceilings from scripts/pm/check-skill-line-ratchet.mjs, not edited)

File Before Out In After Ceiling Net
.claude/agents/os-dev.md 33491 113 + 119 129 + 103 33491 33491 0
.claude/skills/pm-dispatch/references/readings-ci.md 4896 119 114 4891 4900 -5

No ceiling moves. pnpm check:pm-skill-ratchet exits 0 at b469dcec.

Read first

  1. .claude/agents/os-dev.md line 90: the rule itself. The risk is the phrase 「任何拼法」: it is meant to rule out a renamed background run, not a dev server.
  2. .claude/agents/os-dev.md line 293: the report-side half of the same rule.
  3. .claude/skills/pm-dispatch/references/readings-ci.md line 48: a reading replaced by a newer one. See the first acceptance note for why this file is in the diff.

Tests

No test changed and none is owed: the diff is rule text and one reading. git grep over the tree at b469dcec finds the two replaced sentences nowhere else, so no test or gate pins them. No ablation: no tested behaviour changed.

Measurements taken for the rule (the card asked which gates actually pass the foreground limit today):

check:pm-dispatch-gates in the foreground: 404 s, exit 0 (limit 600 s)

Tree 0124851b (the branch point; the diff does not touch the instrument), 4 cores, load average 0.42 at the start and 1.03 at the end, no lock, stdin from /dev/null, exit captured before any pipe.

exit 0 wall 404s head 0124851b
dispatch-gates self-test tiers: fast 2686 case(s) in 402.9s · slow tier deferred (9 section(s)) — run without --fast for both.
✓ dispatch-gates self-test (fast tier): 2686 cases pass; 9 slow section(s) deferred.
check:pm-dispatch-gates: the battery (the fast tier) took 403.1s on this box.

It fits with about 196 s to spare on a quiet box. On a busy box it may not; the rule then applies as written (killed at the limit, declared NOT MEASURED, CI runs it in lint-pm-dispatch-gates).

Full dogfood: NOT MEASURED locally; the CI reading says it cannot fit

Not run locally: a run known to pass the limit would hold the shared lock for ten minutes and reach no verdict. Read instead from CI on main 39064f62, the step Boot example apps and exercise real user flows of the three Dogfood Regression Gate (k/3) jobs: 1063 s (1/3), 778 s (2/3), 698 s (3/3). Each third alone is past 600 s, so the unsharded command the agent file prescribes cannot finish in one foreground call.

The record spelling the new bullet names, probed against the instrument

On copies of this PR's own run record at b469dcec (the real record is untouched):

# one family replaced by a NOT-MEASURED line with a reason
Run reconciliation — 26 derived, 25 run, 1 NOT-MEASURED, 0 UNRUN.
✓ dispatch-gates --ran: 26 derived famil(ies) accounted for — 25 run, 1 NOT-MEASURED (0 DERIVED from a recorded exit 3, 1 claimed).        exit 0

# the same family recorded with a bare kill code and no declaration
Run reconciliation — 26 derived, 25 run, 0 NOT-MEASURED, 1 UNRUN.
✗ dispatch-gates --ran: 1 of 26 derived famil(ies) UNRUN.        exit 1

So the declared path already exists in scripts/pm/dispatch-gates.mjs (parseRunRecord, runReconciliation): a kill code alone is UNRUN, and the declaration with a reason is what makes it NOT-MEASURED. The instrument prints the spelling itself when it meets a bare kill code.

Acceptance notes

  • readings-ci.md is in the diff — seat ruled A (keep it); claim amendment 7268968229 names it. The claim allows "the pm-dispatch reference that states the declared-narrowing path for --ran records if its text must name the new case". No pm-dispatch reference mentions --ran at all; the only pm-dispatch text on a gate past the limit is this one line, and it prescribed the refused form. I took it to be the reference meant. It is its own commit (b469dcec), so dropping it is one revert if the seat reads the fence differently.
  • The instruments still prescribe the detached form, and this PR does not touch them — follow-up pm dispatch-gates scripts still print a nohup background remedy that os-dev.md forbids after #38684 #38689 (Blocked-by this PR) (outside the claim; dispatch-gates.mjs is a Tier H instrument). scripts/pm/check-dispatch-gates.mjs has a header section telling an agent container to run detached, and its kill branch prints nohup pnpm check:pm-dispatch-gates > pm-dispatch-gates.log 2>&1 & as the remedy to a dev whose foreground run was just killed; scripts/pm/dispatch-gates.mjs carries the same header section. After this PR the agent file and the instrument's printed remedy disagree.
  • Full dogfood has no local route left — follow-up os-dev full-dogfood definition of done has no route once a gate past the foreground limit may not run in the background #38688 (maintainer decision; not this PR). The definition-of-done lines of os-dev.md still order one full dogfood run under the lock on a PR whose title carries ! or whose clause line carries the narrowing arm, with no shard and never skipped. By the CI reading above that run cannot finish in the foreground, and PR runs do not carry the dogfood shards (queue runs do). Those lines are outside this claim; the question is in the report.
  • .claude/skills/scenario-eval/SKILL.md and packages/qa/scenarios/README.md prescribe nohup plus tail --pid for scenario and gallery runs. Those are another seat's runs and no refusal is recorded for them; noted, not edited.
  • readings-shell.md holds a reading that a refused compound command is retried as bare actions before reporting blocked. It is a general reading about command shape, not about background runs, and is untouched; a reader may still put it beside the new bullet.

Verification

Two minutes: git diff origin/main...HEAD --stat shows 2 files, 3 insertions, 3 deletions; then git grep -n -E 'nohup|tail --pid' -- .claude/agents .claude/skills/pm-dispatch at the head shows one hit, the readings-shell.md line that warns against nohup inside a background tool call, and none that prescribes it.

Local gate union at b469dce: 26 derived, 26 run, exit 0

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack (no paths) derived 26 commands from 2 changed paths against merge base 0124851b. Each ran in the foreground with stdin from /dev/null, the exit captured before any pipe, and was recorded as COMMAND :: exit N; the whole loop took 325 s in one foreground call.

Run reconciliation — 26 derived, 26 run, 0 NOT-MEASURED, 0 UNRUN.
✓ dispatch-gates --ran: 26 derived famil(ies) accounted for — 26 run, 0 NOT-MEASURED (a DERIVED zero — all 26 recorded an exit code and none of them is 3).

The first pass recorded pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 3 (PREREQUISITE NOT MET: @objectstack/formula and @objectstack/lint were not built). I built the two under the shared lock (VERDICT command-exit 0, held 80 s) and ran the whole list again; the record above is that second pass, with no line edited.

Longest single gate: node scripts/check-comment-mask-corpus.mjs, 188 s. Local-only family also run: pnpm check:skill-frame-freshness, exit 0.

node scripts/pm/overlap-check.mjs --branch=HEAD at b469dcec: VERDICT clean exit 0 against origin/main and against the one open PR that shares os-dev.md (#38683, other sections).


Generated by Claude Code

…D, never sent to the background

The resource-discipline bullet prescribed `nohup … &` plus `tail --pid` for
anything past the foreground limit. Dev sessions' permission classifier
refuses that form, so a dev following the agent file lost the run. The bullet
now says: no background run in any spelling; the run is declared in the
`--ran` record as `NOT-MEASURED <command> :: <reason>` and CI carries it.
The clean-finish line that told a dev to read a still-running gate's log at
report time now says a report holds no gate that is still running.

Byte-neutral: 113 + 119 bytes out, 129 + 103 bytes in; the file stays at
33491 bytes, its ceiling.

Claude-Session: https://claude.ai/code/session_01ADHkmRJUY9Ncce14hVHd25
Co-authored-by: Claude <noreply@anthropic.com>
… not a detached one

The CI readings file carried the same refused prescription for
`check:pm-dispatch-gates` (detach plus `tail --pid`) beside a reading of
1216-1246 s. Re-measured at 0124851 on a quiet 4-core box: the fast tier,
which is what a dev box runs with no flag, finished in 404 s in the
foreground with exit 0, inside the 600 s foreground limit. The line now
carries that reading and no detach.

119 bytes out, 114 bytes in; the file goes 4896 -> 4891 bytes under its
4900 ceiling, which is not moved.

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-steve · session_01ADHkmRJUY9Ncce14hVHd25

Final green head for review: b469dcec15a9683a9e4cf34b5659724aef9bd6a7 (read 2026-11-30T04:44Z: 25 check-runs success, 31 skipped, 0 failed or pending; mergeable clean). Card #38668, claim 7267876981 + amendment 7268968229, dev report 7268878229 on the card. check-governed-merges --pr 38684: Tier H (.claude/** ×2, Rule-change: yes declared), 6 changed lines ≤ 3000. Follow-ups: #38688 (full-dogfood route, maintainer), #38689 (instruments' nohup remedy). Owed: L1 (L1-a) and the contract review of the governed rules text; the PR stays draft and lands through the owner seat.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z

Contract-review-claim: session_01ADHkmSAjFEZHRpRq3WCj6z · head b469dce · 2026-11-30T04:44Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-steve · session_01ADHkmQm8PTU4AkVU5kdwEv
L1-a, the seat's L1 thread · 2026-11-30T04:46Z · first review

席位核对

ACCEPT @ b469dcec15a9683a9e4cf34b5659724aef9bd6a7 (card #38668, Fixes, zone o3-F, claim 7267876981 + amendment 7268968229). This is rule text on the governed face (.claude/agents/os-dev.md, references/readings-ci.md), declared Rule-change: yes. So it is Tier H, and the maintainer reviews and lands it. No contract-review L2 is owed beyond the seat's governed-text review.

Read at head:

  • The three changed lines.
    • os-dev.md:90: "前台上限内跑不完者 ⛔ 不转后台(任何拼法):--ran 记 NOT-MEASURED <command> :: <实测原因>,归 CI". It replaces the nohup … & + tail --pid prescription.
    • os-dev.md:293: the report-side half. No gate in a report is still running.
    • readings-ci.md:48: the reading becomes "快档前台 404 秒 … 前台跑".
      Each is what the card asks, and none restates another rule.
  • The record spelling is real. The body's probe on copies of the run record shows dispatch-gates --ran counting a declared NOT-MEASURED … :: reason as NOT-MEASURED (exit 0), and a bare kill code as UNRUN (exit 1). So the new bullet names a spelling the instrument already reads (parseRunRecord, runReconciliation).
  • The 404 s reading is at 0124851b with its conditions stated (4 cores, load, no lock, stdin closed, exit captured before any pipe). The replaced 1216–1246 s reading was of the detached run.
  • Bytes. os-dev.md 33491 → 33491 and readings-ci.md 4896 → 4891, each at or under its ceiling. The ratchet is not edited.
  • skip-changeset. The PR touches .claude/** only.
  • Checks. 25 success, 31 expected skip, 0 failed. mergeable_state is clean.

For the seat and the maintainer, this decides when to land: once this lands, the rules disagree about a narrowing PR's dogfood battery until #38688 is ruled.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: b469dcec15a9683a9e4cf34b5659724aef9bd6a7
Local-runs: none
Scope: .claude/agents/os-dev.md, .claude/skills/pm-dispatch/references/readings-ci.md + none
Security-touching: yes
Rule-change-verified: yes

Face: rules. Inputs read: card #38668 (body, all six comments, dev report 7268878229, claim 7267876981, amendment 7268968229), PR #38684 (body, file list, net diff against main: 2 files, 3 insertions, 3 deletions), and the check-runs on the head (25 success, 31 skipped, none failed or pending; Governed Surface Queue Guard, Lint · PM dispatch-gates, Lint · repo & tooling gates, Check Changeset all success). Code outside the diff was read, not reviewed: scripts/pm/dispatch-gates.mjs (parseRunRecord, RUN_RECORD_UNMEASURED_MARKER), scripts/pm/check-dispatch-gates.mjs (header, tier table, kill branch), scripts/pm/check-skill-line-ratchet.mjs (ceilings), and the neighbouring lines of both hits files.

Security-touching: yes is the conservative reading: the hunk at os-dev.md:90 exists because a permission classifier refused a run, and its 「任何拼法」 tells an agent not to re-spell a refused background run. Neither hits path is under skills/** or ui/skills/**, so the brief's label clause is not triggered by path; the PR is Tier H either way.

① Derived judgments

  • No accept-set changes. The diff adds no grammar: the spelling the new bullet names, NOT-MEASURED COMMAND :: REASON, is the one parseRunRecord already accepts (marker NOT-MEASURED, a reason required after the :: separator; a marked line with no reason stays UNRUN). The bullet's 「实测原因」 matches that requirement. Right.
  • No public surface changes: .claude/** is fleet rule text, nothing published. Right.
  • Ratchet ceilings: untouched and not exceeded. Read at the head with wc -c: os-dev.md 33491 at the merge base and 33491 at the head (net 0, ceiling 33491); readings-ci.md 4896 to 4891 (net -5, ceiling 4900). The claim's "net bytes ≤ 0 per file" holds on both files. main has since moved to 5ac1ee0b (docs(pm): new code in a large source file goes in a new module; the os-dev report records classifier refusals #38683 landed); the merge is clean and the merged os-dev.md is 33475 bytes, under the ceiling.
  • The PR body's byte table agrees with the tree.

② Semver level

Clause-②: no — correct. Nothing in the diff is published; skip-changeset is the right carrier and Check Changeset is success on the head.

③ Boundary flags

④ Design judgment

.claude/agents/os-dev.md, line 90. Holds.

.claude/agents/os-dev.md, line 293. Holds. The old line (read a still-running gate's log at report time) only made sense beside a detached run. The new line is the report-side half of line 90 and agrees with item 4's two legal exits above it. NOT MEASURED (report prose) and NOT-MEASURED (the --ran marker) are two surfaces already spelled differently at line 108; no conflict.

.claude/skills/pm-dispatch/references/readings-ci.md, line 48. Holds.

  • (b) The reading names its tree (0124851b, the merge base) and its conditions (quiet box, 4 cores). The PR body carries the measurement at that tree: exit 0, wall 404 s, fast tier 2686 cases in 402.9 s, load 0.42 to 1.03. The diff does not touch the instrument, so the reading stands for the head. 「快档」 is right: check-dispatch-gates.mjs runs the fast tier on a dev box with no flag. The figure is the dev's own single run and was not re-run here; the head's Lint · PM dispatch-gates job (fast tier, about 11 minutes including setup, success) does not contradict it.
  • nit — one sample with about 196 s of margin, on a box the line itself calls quiet. A dev container usually runs several agents; a contended run will be killed at the limit, and line 90 then applies. The line's 「闲盒」 and 「超时非读数」 say as much, so nothing is wrong, but the guidance 「前台跑」 is only as good as the margin.
  • nit — the replaced 1216-1246 s reading is dropped without a successor for the two-tier (--slow) run, which is not measured here; the dev report says so.

Rule change, hunk by hunk.

  • os-dev.md:90: alters what a dev runs and what is left to CI (scope). A rule change.
  • os-dev.md:293: alters what a report may hold at hand-in; the report-side half of the same rule. A rule change.
  • readings-ci.md:48: a reading replaced, with its run prescription turned from detached to foreground. A process step, carried by the rule above.
    The PR body quotes no Ruling-ref:, so ruled is not available. yes, equal to the declared Rule-change: yes: the pull request waits for the maintainer.

No must-fix, no should-fix.

Implemented-by: claude/issue-38668-no-background-gate
Reviewed-by: session_01ADHkmSAjFEZHRpRq3WCj6z

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z

维护者速读

  • 用户能看到什么变化:用户无感;开发 agent 遇到前台跑不完的检查不再转到后台跑(被权限分类器拒的那种写法),而是在报告里记「未测」交给 CI。
  • 为什么做:原规则让开发 agent 用后台命令跑长检查,这个写法会被权限分类器当场拒掉,照规则做反而卡住;这次把规则改成能照着做的样子。
  • 出错会怎样:只影响 agent 的工作规则、不影响产品;代价是少数长检查要等 CI 才有结果,撤回这次合并即恢复原规则。
  • 要你做什么:这是受管规则文本(Rule-change: yes,没有现成裁决可引),需要你审批。契约复审 PASS 在评论 7269104202,Head-sha b469dcec15a9683a9e4cf34b5659724aef9bd6a7;批准后由席位落地。

Seat opinion: land as is. The new line is wider than the card's evidence (the refusal measured was the detached nohup form), but main already orders foreground-only runs elsewhere and the rule asserts nothing about the classifier. Its cost is that a breaking PR's full dogfood has no local route; that is #38688 (options A–D, seat opinion B) and should be ruled soon after this lands. The scripts that still print the old remedy are #38689.

席位核对

ACCEPT at head b469dcec15a9683a9e4cf34b5659724aef9bd6a7 · Tier H (.claude/**, Rule-change: yes) · Fixes #38668

  1. Shape: .claude/agents/os-dev.md (background-run bullet and the report-time line) and one line of .claude/skills/pm-dispatch/references/readings-ci.md.
  2. Premise measured: the classifier refusal of the prescribed detached form, quoted on os-dev.md prescribes a nohup background run for gates past the foreground limit, and dev sessions' permission classifier refuses that form as Undermining Oversight #38668; fast-mode check:pm-dispatch-gates read at 404 s in the foreground on 0124851b.
  3. Gates: check-runs on this head 25 success, 31 expected skips, 0 failed; skip-changeset (no published package).
  4. Accepted deviations: the record's three nits (a wording scope at os-dev.md:90, a single-sample reading, no successor reading for --slow).
  5. Out of scope and where it went: full-dogfood definition of done → os-dev full-dogfood definition of done has no route once a gate past the foreground limit may not run in the background #38688; scripts' nohup remedy → pm dispatch-gates scripts still print a nohup background remedy that os-dev.md forbids after #38684 #38689; readings-ci.md inside the fence by claim amendment 7268968229.
  6. Landing: L1 ACCEPT 7269070742 on this head; L2 contract review PASS 7269104202 on this head, Rule-change-verified: yes. Lands after os-zhuang approves.

ACCEPT → PR #38684 comment 7269070742 · Contract review → comment 7269104202

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z

Blocked-by: #38694

Merge order, on the maintainer's ruling D on #38688 (comment 7269391948, 「云端流水线代跑」, 2026-11-30T05:08Z) relayed by triage (#38600 comment 7269439458): this PR lands only after the landing-door change that reads the new CI lane #38694. Merged earlier, the landing door refuses every breaking PR whose battery is NOT MEASURED. The hand-off 7269114631 is withdrawn until then: the contract review PASS 7269104202 and L1 ACCEPT 7269070742 stand on head b469dcec15a9683a9e4cf34b5659724aef9bd6a7. When the door change has merged, this seat re-reads the head and hands it off again; os-zhuang, please do not enqueue it before that.

@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 Nov 30, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 30, 2026 07:19
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 46372869877 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Dogfood Regression Gate (3/3) — 失败步骤: Boot example apps and exercise real user flows

    @objectstack/dogfood:test:  FAIL   isolated  test/package-move-in.dogfood.test.ts > dogfood: POST /packages/:id/move-in, the move door (#38150) > A3 (#37468) and the set rule: flow, dataset and report
      ↳ 失败原因: @objectstack/dogfood:test: AssertionError: expected 404 to be 200 // Object.is equality
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 5 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

Merged via the queue into main with commit e586cfd Nov 30, 2026
65 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-38668-no-background-gate branch November 30, 2026 08:03
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…n a breaking PR's head (objectstack-ai#38727)

<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi98ZAtPQK4A8ABvN79TALFDE)_
Fixes objectstack-ai#38688
Clause-②: no
Metadata-protocol: none
Rule-change: yes

## 维护者速读

-
用户无感;只改内部合并流程:破坏性改动要排队合并时,合并门不再看开发代理自己填写的「回归已跑」一栏,改看云端流水线在这个改动最新提交上的真实结果;开发代理也不再在本机跑完整的真实应用回归。
- 兑现你在「破坏性改动的完整回归,今后在哪儿跑」上选的「云端流水线代跑」里合并门这一半,替开发代理解决本机跑不完、结果只能靠自报的问题。
-
出错只会往「拦多了」的方向错:没打专用标签、或云端没跑出通过结果的破坏性改动,一律被合并门拦下并提示去打标签、等结果;撤回这一个改动即可恢复原样。它必须排在云端流水线那个改动之后合并,否则所有破坏性改动都会被拦在门外。
- 要你做什么:这改了开发代理的工作规则,合并前需要你批准。

Lands after: objectstack-ai#38694 (PR objectstack-ai#38705)

## What changes

Maintainer ruling 7269391948 on the card (letter D, 「云端流水线代跑」): "the
landing door reads that lane's conclusion on the head and stops reading
the typed `dogfood_battery` field", and `os-dev.md` 216–218, its report
template, `l1-review-checklist.md:53` and `landing-operations.md:61`
point at the lane. This PR is that half. The lane itself is PR objectstack-ai#38705
(card objectstack-ai#38694), not touched here.

**The door (`scripts/pm/label-write.mjs --land`).** For a pull whose
title carries `!` before its colon or whose `Clause-②:` line carries a
`(narrowing)` arm, `landDogfoodGate` now asks two questions of the
platform and nothing of any report:

| Question | Read | Pass | Refusal says |
|:--|:--|:--|:--|
| Does the pull edit the lane? | every page of `GET /pulls/{n}/files`,
by `filename` and `previous_filename`, the count checked against the
pull's `changed_files` | no row is `.github/workflows/dogfood-optin.yml`
| names the file and its status; "a pull may not certify itself with a
lane it edits"; land the lane change on its own |
| Is the battery proven on this head? | `GET
/commits/{head}/check-runs?check_name=Dogfood battery
(opt-in)&filter=all`, paged | ANY completed run of that name by
`github-actions` with conclusion `success` on the head sha | add the
label `needs:dogfood-battery`, wait for the check run to conclude
`success` on the head, land again |

- Seat order 1: the reader asks "is there a success of this name on this
head", never "what does the newest run say". Unrelated label events
publish `skipped` runs of the same name on the same head (three runs,
two skipped and one success, measured on PR objectstack-ai#38705's head `9e8e9b20`). A
success on an older sha is not read at all: only the head's check runs
are requested.
- Seat order 2: the file-list question is asked first, so a pull that
edits the lane is refused before its own run is even looked at. It
applies to MARKED pulls only. An unmarked pull that edits the lane is
not judged (zero gate reads), which is the "lands on its own" pull;
otherwise the lane could never be changed through this door.
- Seat order 3: `scripts/pm/ensure-pm-labels.sh` creates
`needs:dogfood-battery` (colour `006b75`, the description as ordered),
beside its two siblings.
- Fail closed, as before: an unreadable marker, a pull with no full head
sha or no `changed_files`, a file list not read whole, a truncated
check-run listing and every non-success conclusion are exit 2 with zero
writes; a read the platform did not answer is exit 3. An unmarked pull
and a pull in a repository with no battery are not judged, with zero
extra reads.
- Deleted with the typed field: the report readers
(`reportedDogfoodBattery`, `reportedPayloadString`, `reportNamesPull`,
`readBatterySha`), the sibling-pull rule, the fold tie over several
cards and the first-parent walk over merges of the base
(`LAND_COMMENT_PAGE_CAP`, `LAND_MERGE_HOP_CAP`). The lane proves a head,
so a push (a merge of `main` included) owes a new run; with the label
on, the push starts it.

**New module: `scripts/pm/land-dogfood-lane.mjs`** (157 lines).
`label-write.mjs` is over 1,000 lines, so the new concern (the lane's
contract and its two reads) is a sibling module and the door only calls
it: the three literals (`needs:dogfood-battery`, `Dogfood battery
(opt-in)`, `.github/workflows/dogfood-optin.yml`), two pure verdicts and
`readDogfoodLane`. `label-write.mjs` goes from 4,535 to 4,340 lines.

**The L1 face (`scripts/pm/l1-face.mjs`).** The `dogfood` item used to
flag every marked PR "owed, not judged". It now judges a marked PR with
the door's own two verdicts, from readings it already makes (the head's
check runs, the file list): `ok` on a lane success at the head, `flag`
on none (naming the label), `flag` on a PR that edits the lane, `not
measured` while the lane run is in progress.

**Rule text.**
- `.claude/agents/os-dev.md` 216–218: a dev no longer runs the full
dogfood locally; the owning seat labels a marked PR, CI runs the three
shards on its head, the door reads the check, and a marked PR does not
edit the lane's workflow.
- The report template's `dogfood_battery` field is REMOVED, not turned
into a pointer: a field an agent types is the thing the ruling retires,
and no reader is left (`label-write.mjs`, `l1-face.mjs` and the
checklist all read the check run).
- `l1-review-checklist.md:53` and `landing-operations.md:61` name the
lane's check and label.

**Rule-change: yes**, by my own reading of the whole diff. Every
`.claude/**` hunk is one the ruling names, but two choices in them are
mine or the seat's and are not the maintainer's words: the report field
is removed (the ruling says the template "points at the lane"), and
`os-dev.md` says the owning seat hangs the label and a dev does not (the
lane's own header says so; the ruling does not say who). The seat may
read it as `ruled`; I did not.

### Byte arithmetic (the three governed files; `wc -c`, ceilings from
`scripts/pm/check-skill-line-ratchet.mjs`)

| File | Before | After | Delta | Ceiling |
|:--|--:|--:|--:|--:|
| `.claude/agents/os-dev.md` | 33,475 | 33,407 | −68 | 33,491 |
| `.claude/skills/pm-dispatch/references/l1-review-checklist.md` | 6,871
| 6,870 | −1 | 6,875 |
| `.claude/skills/pm-dispatch/references/landing-operations.md` | 10,705
| 10,699 | −6 | 10,705 |

No ceiling row is moved: the ratchet file is outside this card's file
surface, so the three rows keep their values and each file sits at or
under its own.

## Tests

Every reading below is at head `4d864db1`.

<details><summary>label-write.mjs --self-test: 401 cases across 19
batteries, exit 0; the gate's battery re-pinned 70 to 64</summary>

The `--land` dogfood battery was rewritten with the gate. Its floor
moves 70 to 64, with the reason beside the pin: the report,
sibling-pull, tie and commit-walk cases left with the code they drove.
Cases whose verdict flipped carry the flip in their name:

- "FLIPPED by ruling D (was PASSES: a `!` title whose newest report ran
on the head)": the same head-pinned typed report with no lane check now
REFUSES.
- "FLIPPED by ruling D (was REFUSED: a `!` title whose newest report
says `n/a`)": the same `n/a` report over a lane success on the head now
PASSES.
- "FLIPPED by ruling D (was: from the pull and the card thread alone)":
the gate reads the pull, its file list and the head's check runs; no
card thread, no commit.
- "FLIPPED by ruling D (was FAIL CLOSED: NO CARD …)": a marked pull
naming no card lands on the lane's success.
- "FLIPPED by ruling D (was: a fold's tie read on every tied card)": a
fold is judged on its one head.
- "FLIPPED by ruling D (was PASSES: … one merge of main below the
head)": a success one merge below the head now REFUSES.
- "FLIPPED by ruling D (was: the report template carries the typed key
the door reads)": `os-dev.md` carries the typed key nowhere, and no
local dogfood command.

Added, by seat order:

- Order 1: the pure verdict over skipped, skipped, success in every
position; "PASSES: skipped, skipped, then success on ONE sha"; "REFUSED:
a success only on an OLDER sha"; "REFUSED: only `skipped` runs on the
head"; a failed, a cancelled, an in-progress run and a failure beside a
skip each refuse; a failed attempt beside a success passes; a success on
another sha, under a shard's name, under the required gate's name or by
another app is not counted; a success on the second page of the listing
passes, a truncated listing refuses.
- Order 2: "REFUSED: a marked pull whose file list changes the lane's
workflow, EVEN WITH a success on its head"; refused before the check
runs are read; renamed away, added and removed are changes too; the
workflow on the second page of a long file list is still seen; another
workflow is not self-certifying; "NOT JUDGED: an UNMARKED pull that
edits the lane".
- Order 3: the label a refusal names is one `ensure-pm-labels.sh`
creates.
- Fail closed: fourteen boards, each carrying a success on its head,
each refusing for its own reason (exit 2 judged, exit 3 for a read the
platform did not answer).
- Kept: the title marker, the markers, the battery repositories, the
cloud not-judged cases, the long-title quote cap, the gate before
`judgeBody`.

The fake board gained `GET /pulls/{n}/files` and `GET
/commits/{sha}/check-runs` (paged, filtered by `check_name`) and lost
`GET /compare`, which nothing reads now.

</details>

<details><summary>l1-face.mjs --self-test: 57 cases across 7 batteries,
exit 0; the gate-evidence battery pinned 7 to 13</summary>

- Flipped, named: "FLIPPED by ruling D (was: `!` before the title's
colon owes the dogfood battery — flagged, not judged)".
- Added: a marked PR with the lane's success beside two skipped runs
reads `ok`; only skipped runs, or a failure, flag with their tally; a
run in progress is `not measured`; a success under a shard's name flags;
a marked PR that edits the lane flags even with a success; an unmarked
PR is not owed whatever it edits.
- Extended: "unreadable check-runs leave both check items not measured,
and a marked PR's dogfood item with them".
- The two rule-text phrases the face is built from were updated with the
checklist line they pin.

</details>

<details><summary>Ablation: three mutations of land-dogfood-lane.mjs,
each landed on disk, each red, each restored byte-identical</summary>

Through `scripts/ablation-replace.mjs` (anchor hit once, blob
`f3a15b5127fa` before and after each restore), running `node
scripts/pm/label-write.mjs --self-test`:

1. "any success" replaced by "the first row only" (newest-only): exit 1,
4 cases red, among them the skipped-then-success pair and the
second-page success.
2. The self-certification refusal disabled: exit 1, 4 cases red (the
refusal, its order before the check-run read, the three statuses, the
second page of files).
3. The head-sha match removed from the check verdict: exit 1, 1 case red
(a success on another sha is not the head's).

</details>

<details><summary>Derived gates: 74 derived, 72 run with exit 0, 2 read
as NOT-MEASURED from a first exit 3 that passed on re-run</summary>

`node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack
--ran FILE` printed: `✓ dispatch-gates --ran: 74 derived famil(ies)
accounted for — 72 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit
3).`

The two are `pnpm --filter @objectstack/lint run
check:doc-formula-expressions` and `pnpm check:i18n-coverage`. Each
first exited 3, stating its own unmet prerequisite (a workspace package
not built in this worktree; this diff touches no package). After the
builds the gates named, each re-ran exit 0 on the same head. The record
keeps every line, and the tool reads a command recorded with two codes
as the first one; I did not edit the record. Among the 72:
`check:pm-label-write`, `check:pm-dispatch-gates` (423 s),
`check:pm-skill-ratchet`, `check:pm-skill-id-lint`,
`check:pm-label-desc-cap`, `check:pm-governed-prose`,
`check:pm-governed-merges`, `check:doc-authoring`, `check:nul-bytes`,
`check:required-contexts`, `check:pm-expected-skips`.

Also on this head: `eslint --no-inline-config` over the three scripts,
exit 0; `node scripts/check-platform-checklist.mjs --changed-from
origin/main`, "0 anchored files in the change set — nothing judged" (two
exported constants are deleted, neither is a checklist anchor); `node
scripts/pm/overlap-check.mjs --branch=HEAD`, "VERDICT clean exit 0"
against `origin/main` and PR objectstack-ai#38684.

</details>

## Seat rulings 2026-11-30T08:17Z

Seat `repo:objectstack#3` on the dev's four open questions (report
7272639732), each as the dev recommended:

1. `Rule-change: yes`, not `ruled`. Removing the `dogfood_battery` field
and having the owning seat put the label on are the seat's reading of
ruling D, not the maintainer's words.
2. Only a `Dogfood battery (opt-in)` check run from app `github-actions`
counts.
3. The door refuses an edit of `.github/workflows/dogfood-optin.yml`
only on a marked pull (`!` or `(narrowing)`), since the door judges only
those.
4. Head SHA only: after a merge of `main`, the lane runs again on the
new head.

Out of scope, carried by the seat: the `AGENTS.md` §10 sentence → objectstack-ai#38735
(lands after this PR; replacement proposed in the report), and a pin of
this module's three literals to the workflow, joined to the `ci.yml` vs
`dogfood-optin.yml` drift card.

## Acceptance notes

- **Order of landing.** After PR objectstack-ai#38705 (the lane). PR objectstack-ai#38684 (no
background runs) was planned to land after this one, but the maintainer
merged it first (2026-11-30T08:03Z, `e586cfd3`); until this PR lands, a
breaking PR has no route through the door. Landed before the lane exists
on `main`, this door refuses every breaking PR in objectstack, because
no head can carry the check.
- **Not in this PR, by the card's file surface:** the `AGENTS.md`
sentence "dogfood once, on the final head" (Multi-agent discipline, item
10) still describes a local run, and moves under objectstack-ai#38735; `os-dev.md`
line 90 is PR objectstack-ai#38684's, now merged; it no longer names the full dogfood.
- **One seam nothing pins.** The three literals in
`land-dogfood-lane.mjs` are copied from the lane's header. The workflow
file is not on `main` yet, so no self-test here can read it; a rename of
the job in the workflow would make every breaking PR refuse, loudly,
until the constant follows.
- **The app filter is mine.** The door counts only check runs whose
`app.slug` is `github-actions` (measured on the lane's first labelled
run). The seat's order says "a check run named …"; the filter narrows
what passes and never widens it.
- **`filter=latest` against `filter=all`.** `l1-face.mjs` judges from
`pr-state.mjs`' check-run reading, which asks `filter=latest`; the door
asks `filter=all`. A success that a later red re-run of the same
workflow run superseded reads `flag` on the face and passes the door.
The face's header says so.
- **A `(narrowing)` or `!` PR that must edit the lane** has no route
through the door by design: it splits, and the lane change lands first.
- Reports written before this change still carry a `dogfood_battery`
key; nothing reads it, and nothing refuses it.

## Verification

Files to read first, by risk:
1. `scripts/pm/land-dogfood-lane.mjs`, `dogfoodLaneCheckVerdict` and
`readDogfoodLane`: the only place a pass is decided (which rows count,
and when the listing stops).
2. `scripts/pm/label-write.mjs`, `landDogfoodGate` and
`landDogfoodRefusal` (about line 1,770): what is still read before the
lane, and the unread-versus-refused split.
3. `.claude/agents/os-dev.md` 216–218 and the report template: the rule
a dev follows from now on.

Two-minute check: `node scripts/pm/label-write.mjs --self-test`,
expecting `401 cases pass across 19 batteries`; the cases named "Seat
order" above are in the battery that opens with "the --land dogfood
gate".

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

https://claude.ai/code/session_01ADHkmRJUY9Ncce14hVHd25

<!-- signed: repo:objectstack#3 · os-steve ·
session_01ADHkmRJUY9Ncce14hVHd25 -->

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

documentation Improvements or additions to documentation size/xs skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

3 participants