Repository navigation
ci: label-gated lane runs the three dogfood shards on a breaking PR's head - #38705
Conversation
… head A new opt-in workflow, gated on the `needs:dogfood-battery` label, runs ci.yml's three dogfood shards on a pull request's merge preview and publishes one aggregate check, `Dogfood battery (opt-in)`, on the head SHA. It is not a required context, reads no secret, and has no paths filter and no labeler entry. Claude-Session: https://claude.ai/code/session_01ADHkmRJUY9Ncce14hVHd25 Co-authored-by: Claude <noreply@anthropic.com>
The stall-guard headroom tool keys a guarded site on its step name, and its self-test holds those names unique across every workflow. Claude-Session: https://claude.ai/code/session_01ADHkmRJUY9Ncce14hVHd25 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-steve · session_01ADHkmRJUY9Ncce14hVHd25 Final green head for review: |
|
repo:objectstack#3 · os-steve · session_01ADHkmQm8PTU4AkVU5kdwEv 席位核对ACCEPT @ 9e8e9b2 (card #38694, ruling D on #38688; one new file, What I read against
Non-blocking
Checks at this head (read before writing): 30 success, 22 skipped, 0 failure, 0 pending; mergeable |
|
repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z One verification run of the new opt-in lane before landing: |
|
repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z Contract-review-claim: session_01ADHkmSAjFEZHRpRq3WCj6z · head 9e8e9b2 · 2026-11-30T06:21Z |
|
repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z Contract reviewServed-tier: Face: rules ( ① Derived judgments
② Semver levelNothing is published: one workflow file, no changeset, label ③ Boundary flags
④ Design judgment
Against
Attempts to break it:
No must-fix, no should-fix. Nits (no effect on this file's correctness; a fix here moves the head, so they are left as accepted deviations or carried):
Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z Verification run done: run 46365583981 on head |
|
repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z 维护者速读
Seat opinion: land as is. One new file, the shape of the two opt-in precedents; the verification run 46365583981 on this head passed all three shards and the verdict job. 席位核对ACCEPT at head
ACCEPT → PR #38705 comment 7270529850 · Contract review → comment 7270873623 |
…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>
Requested by Steve · project thread
Fixes #38694
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
One new file,
.github/workflows/dogfood-optin.yml(the name follows the two precedents,pack-smoke-optin.ymlandupgrade-harness-optin.yml). Nothing else is touched: notci.yml, not.github/labeler.yml, notscripts/pm/**.needs:dogfood-battery(does not exist yet; it follows theneeds:pack-smoke/needs:upgrade-harnessfamily; creating it is the seat's)Dogfood battery (opt-in)successon the head SHA. Anything else (failure, cancelled, skipped, absent) is not a proofDogfood battery shard (1/3, opt-in),(2/3, opt-in),(3/3, opt-in)pull_request(neverpull_request_target) onmain,types: [opened, synchronize, reopened, labeled], the precedents' shape. Every job carries the two-limb label guard: the PR carriesneeds:dogfood-batterynow, and on alabeledevent the label just added is ours. An unlabelled PR's jobs skip, so it runs no battery and bills nothing.ci.yml'sdogfoodjob: the closure build (turbo run build --filter=@objectstack/dogfood), the test run with the slice inOS_TEST_SHARD=k/3(no--passthrough), the vitest worker cap, the stall guard on both steps, the completeness guard, the stall-report upload, and a restore-only turbo cache from the queue'smainseeds.fail-fast: false: nobody waits behind this run, so every red shard is named in one run.timeout-minutes: 30, the queue's own budget.check-shard-attestation.mjs --emitplus an upload with noif:, so a credential exists only when every step before it passed. Thebatteryjob passes only when the matrix result issuccessand all three credentials of this run are present. It does not treat a cancelled or skipped matrix as a pass, unlikeDogfood Regression Gate: that gate has to publish a context on every PR, while this one is a proof.merge_group:trigger, nopaths:filter, no labeler entry. The new names are not inREQUIRED_CONTEXTS(scripts/check-required-contexts.mjs), and neither name is or starts withDogfood Regression Gate. The header lists what it must never grow (the 2026-09-01 opt-in ruling as quoted inpack-smoke-optin.yml, restated by ruling D).github.tokenbeyond the default read-onlycontents: read.ci.yml's turbo remote-cache lines are left out on purpose, because apull_requestrun gets no remote credentials there either. A fork PR runs it the same way an internal one does, with nothing to hold back.ref:, so it builds the merge preview like both precedents (the treemainwill hold, the nearest thing to what the queue builds). The check suite of apull_requestrun sits onpull_request.head.sha, so the verdict is still readable by head SHA.Runner-minute estimate
Measured on the 30 most recent green merge-queue runs of
ci.yml(2026-11-29T16:58Z to 2026-11-30T04:16Z, 90Dogfood Regression Gate (k/3)jobs):upgrade-harness-optin.ymlruns (same closure, same restore-only seed), in line with the queue's build step, so the 30-minute budget keeps the queue's headroom.Drift risk: two copies of one battery
ci.ymlhas no callable unit for this (noworkflow_call, and no composite action for the dogfood steps), andci.ymlis outside this card's fence, so the shard steps are a copy. Nothing holds the two copies equal. If someone edits the queue's dogfood steps (a new env var, a different slice carrier, a new guard) and does not repeat the edit here, this lane goes on proving a different battery from the one the queue runs, and it stays green while it does. The header says so. A pin test, or aworkflow_callextraction, is a follow-up the seat can choose (listed in the report, not built here).Tests
A workflow has no unit test of its own. Every repo gate that reads it was run on the final head 9e8e9b2:
dispatch-gates --commands: 36 derived, 36 run, 36 exit 0
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran FILEgave✓ dispatch-gates --ran: 36 derived famil(ies) accounted for — 36 run, 0 NOT-MEASURED. Among them:check:required-contexts,check:pm-expected-skips,check:shard-attestation,check:stall-guard-budget,check:stall-guard-headroom,check:workflow-status-functions(also runs the context-availability check),check:workflow-step-name-quoting,check:aggregator-roster,check:pm-governed-merges,check:nul-bytes,check:pm-dispatch-gates(fast tier, 2686 cases, 409 s).The first head (ff2fb61) went red on
check:stall-guard-headroom: its self-test needs every guarded step name in the tree to be unique, and the copied step names matchedci.yml's. The second commit renamed the two guarded steps, and the gate is green.Roster and tier readings
node scripts/pm/check-expected-skips.mjs --rosterderives both new names, with nothing refused:Dogfood battery shard (${{ matrix.shard }}/3, opt-in)andDogfood battery (opt-in), bothgate: job-gate label opt-in needs:dogfood-battery; derived. So the skipped check runs on unlabelled PRs read as expected skips.node scripts/pm/check-governed-merges.mjs --branch claude/issue-38694-dogfood-optin-lane:⚖️ landing tier: H(人合), workflow splitTier H by content — a new workflow file: every trigger, job and permission in it is new; size +274 / −0.No workflow linter (actionlint or similar) is installed in this repository. The YAML parses, and the workflow gates above are the repo's own lint for workflows.
Acceptance notes
dogfood-verify(Dogfood Verify CLI) is not included. The card names the three shards, and the queue does not run that leg either (it runs only in the full battery).Dogfood battery (opt-in)check runs: everypull_requestevent starts a run, and one whose guard says no (an unrelated label added later) publishes it asskipped. The door must ask whether there is asuccessof that name on the head, and must not just read the newest one. The header says this.pull_requestruns from the PR's own merge commit, so this PR is already running the lane, unlabelled (its jobs should readskipped). Labelling this PR once, after the label exists, would exercise a real run before landing. That is the seat's call. This PR does not add the label anywhere.Verification
Files to read first, by risk:
.github/workflows/dogfood-optin.yml, thebatteryjob's verify step: the only place a pass is decided.if:guards and the threeconcurrencygroups (workflow, shard, battery): they decide what runs, and what a newer run cancels.ci.yml'sdogfoodjob (around line 2966): the copy.Two-minute check: open this PR's Checks tab.
Dogfood battery shard (${{ matrix.shard }}/3, opt-in)andDogfood battery (opt-in)should show as skipped, because the PR carries noneeds:dogfood-batterylabel.🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmRJUY9Ncce14hVHd25