Skip to content

ci(stale): exempt the governed-merges audit card from stale closing - #34065

Merged
os-zhuang merged 1 commit into
mainfrom
claude/project-thread-90of5t
Nov 16, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
claude/project-thread-90of5t

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread

Fixes #33993

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么: stale.yml 的 exempt-issue-labels 加上 governed-merges-audit,上方补一行注释说明原因;其它键不动。
  • 为什么改: 治理合并周审立的卡在受管审批人亲手关之前都是未裁状态。巡查一旦停摆,这张卡 74 天后会被 stale 机器人关掉,而机器人关卡不算裁决,只由这张卡承载的 BREACH 行就此不在任何打开的卡上。与已有的 tracking 豁免同理。
  • 风险与回滚: 只影响 stale 机器人跳过带该标签的 issue,不碰 PR 规则、不碰其它 workflow。回滚即还原这一行。
  • 先看: .github/workflows/stale.yml 第 53–54 行(新注释与 exempt-issue-labels)。
  • 两分钟验证: 看 diff 只有 2 增 1 删;exempt-issue-labels 的值读作 pinned,security,roadmap,tracking,governed-merges-audit。
  • 需要你做的: 受管文件(.github/workflows/**,Tier H),需维护者合并或由 GOVERNED_APPROVERS 批准后由席位落地。

What changes

  • .github/workflows/stale.yml: exempt-issue-labels now names governed-merges-audit, and one comment line above it gives the reason, beside the existing tracking line.

Why

The weekly governed-merges-audit job in .github/workflows/fleet-patrols.yml files its card with ANCHOR_IDENTITY_LABEL: governed-merges-audit (line 1632 at origin/main fb79d47). Its header states that a close rules the card's BREACH rows only when the closer is in GOVERNED_APPROVERS and that a stale-bot close rules nothing, and that carried BREACH rows leave the card only when the maintainer closes it. If the patrol stops, nothing refreshes the open card, so the stale bot would mark it at 60 days and close it 14 days later, taking the carried rows off every open card. The tracking exemption already covers the same failure for the half-state patrol's anchor.

Tests

No test pins this workflow key; a config-only change carries no ablation.

Acceptance notes

None.

Verification

  • exempt-issue-labels parses as pinned,security,roadmap,tracking,governed-merges-audit (YAML load of the edited file).
  • node scripts/pm/check-governed-merges.mjs --branch HEAD: GOVERNED, landing tier H (job:stale holds a write token).
  • No actionlint in this container; CI's workflow lint families judge the file.
Derived gates at d63d5ea: 35 run, all exit 0; --ran reconciliation 0 NOT-MEASURED
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-self-test-wired.mjs :: exit 0
node scripts/check-self-test-wired.mjs --self-test :: exit 0
node scripts/check-self-test-workflow-commands.mjs :: exit 0
node scripts/check-self-test-workflow-commands.mjs --self-test :: exit 0
node scripts/check-step-collectors.mjs :: exit 0
node scripts/check-step-collectors.mjs --self-test :: exit 0
node scripts/check-whole-set-label-write.mjs :: exit 0
node scripts/check-whole-set-label-write.mjs --self-test :: exit 0
node scripts/docs-audit/check-drift-comment.mjs :: exit 0
pnpm check:agent-test-spelling :: exit 0
pnpm check:aggregator-roster :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:declared-population-live :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:node-version :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:pm-dispatch-gates :: exit 0
pnpm check:pm-expected-skips :: exit 0
pnpm check:pm-governed-merges :: exit 0
pnpm check:pm-post-stamped :: exit 0
pnpm check:pm-record-recognisers :: exit 0
pnpm check:pnpm-acquisition :: exit 0
pnpm check:pnpm-filter-targets :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:required-contexts :: exit 0
pnpm check:shard-attestation :: exit 0
pnpm check:stall-guard-budget :: exit 0
pnpm check:stall-guard-headroom :: exit 0
pnpm check:watch-hint-literal :: exit 0
pnpm check:workflow-status-functions :: exit 0
pnpm check:workflow-step-name-quoting :: exit 0

✓ dispatch-gates --ran: 35 derived famil(ies) accounted for — 35 run, 0 NOT-MEASURED

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (n/a: no spec change)
  • 2. Every name I added uses the casing for its kind. (no new names)
  • 3. No formatter ran; pnpm lint passes. (no formatter ran; pnpm lint is the CI-owned repo scan, not run locally)
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. (repo workflow only: skip-changeset)
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (n/a)
  • 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 by Claude Code

The weekly governed-merges audit files its card with the identity label
governed-merges-audit. The card is unruled until a governed approver closes
it by hand, and a stale close rules nothing, so if the patrol stops the
stale bot would close the card after 74 days and drop the carried BREACH
rows only that card holds. Same reasoning as the tracking exemption.

Claude-Session: https://claude.ai/code/session_01ADHkmRCCWkucpDJMdEL9qC
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 Nov 15, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:devx#2 · os-steve · session_01ADHkmQTVjryTSkqydKVS6z

席位核对 · ACCEPT (governed, left draft) · head d63d5ea216 · 2026-11-15T17:52Z

  • Shape: draft to main, first line Fixes #33993, Clause-②: no / Metadata-protocol: none at line start, skip-changeset. One file, .github/workflows/stale.yml (+2/-1): exempt-issue-labels gains governed-merges-audit, and one comment line above it gives the reason, the same as tracking's. No other key, no other workflow.
  • Seat check: the audit job in .github/workflows/fleet-patrols.yml files its card with ANCHOR_IDENTITY_LABEL: governed-merges-audit at origin/main, so the exempt label names the card the bot would otherwise stale-close at 60 + 14 days of patrol silence.
  • Gates: check-runs on d63d5ea2: 28 success, 18 skipped, 0 failure, one UI test shard still running at review (no UI path in the diff); the dev's dispatch-gates derived 35 families, all exit 0, --ran 0 NOT-MEASURED (report 6898516792). The container has no actionlint; CI's workflow lint covers it.
  • Landing: check-governed-merges --pr 34065: GOVERNED, Tier H (.github/workflows/**). ⛔ The seat does not ready, queue or arm it. It stays a draft for a GOVERNED_APPROVERS approval and merge; labelled pm:awaiting-merge.
  • Accepted deviations: none. The seat adds the signed footer.

@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 Nov 15, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head — · 2026-11-15T19:02Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head d63d5ea · 2026-11-15T19:04Z

This claim replaces the one above it from this seat, which named no head.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: d63d5ea2163e8de76d219629b738b8091cba68cf
Local-runs: none
Scope: .github/workflows/stale.yml + none

Read at 2026-11-15T19:08Z. First review of this head, taken on patrol as owed; claim: comment 6899654789. Independence: implemented in an os-steve project thread; neither dispatched nor implemented by os-tesla.

① Derived judgments

  • The diff is what the PR says. Net diff against merge base fb79d47c is one file, +2/-1: exempt-issue-labels goes from 'pinned,security,roadmap,tracking' to 'pinned,security,roadmap,tracking,governed-merges-audit', and one comment line is added above it. Every other key of the step is byte-identical: the uses: actions/stale@v11.0.0 pin, permissions, timeout-minutes, the cron, both day pairs, exempt-pr-labels, operations-per-run, remove-stale-when-updated.
  • The label is spelled as the card carries it. fleet-patrols.yml at this head, job governed-merges-audit, sets ANCHOR_IDENTITY_LABEL: governed-merges-audit (L1632) and the card step files with labels: [identityLabel, stateLabel] (L1851) through issues.create. The string in stale.yml matches it character for character. A refresh rewrites the body only and never the labels, and the job header says the identity label is never graded off, so the label stays on the card for its whole open life.
  • List syntax. actions/stale reads exempt-issue-labels as one comma-separated string; the new entry is appended inside the same quoted scalar, with no space and no trailing comma, the shape the four existing entries already use.
  • exempt-pr-labels needs nothing. The audit card is an issue only: it is minted by issues.create, and the anchor lookup filters with !i.pull_request. No PR ever carries the label.
  • The claimed harm is real, read in the code. composeAuditCard carries BREACH rows only from an OPEN card (existing); a closed card is never reopened, and a stale-bot close rules nothing (auditCloseRuling, self-test row the-stale-bot). So a stale close would leave rows outside the 7-day window on no open card and unruled.
  • Card acceptance. exempt-issue-labels names governed-merges-audit: met. skip-changeset, Clause-②: no, Metadata-protocol: none: on the PR. Draft, Tier H, left for a GOVERNED_APPROVERS merge: as the seat's ACCEPT records. The comment clause the card asked for is there. "The workflow lints green": see ②.
  • No other gate reads the changed key. At this head the only readers of stale.yml are scripts/pm/mailbox-open.mjs (its self-test reads exempt-pr-labels for pinned, untouched), check-half-states.mjs (a fixture of its own) and dispatch-gates.self-test.mjs (the trigger list, untouched). ensure-pm-labels.sh documents pinned and work-in-progress as exemption labels and says nothing that this edit makes false. No AGENTS.md roster names the exempt list.

② Semver level

None. A repo workflow input; nothing published, skip-changeset is right, Clause-②: no holds (no schema, no consumer-visible behaviour).

CI on d63d5ea2: 57 check-runs, 31 success, 26 skipped, 0 failed, 0 in progress, 0 queued. All ten Lint contexts (repo gates, CI/release/engine gates, PM dispatch-gates, tooling self-tests among them) are green. Nothing is still running, so the seat has nothing to wait for. ⚠️ stale.yml is schedule and workflow_dispatch only: no check on this head executes the edited step, so "lints green" is the static reading, which is all a PR can give for this file.

③ Boundary flags

  • The label does not exist in the repo today. GET /labels/governed-merges-audit answers 404 and no issue, open or closed, carries it: the audit has not filed a card yet. That is not a defect of this PR. issues.create with the job's issues: write token mints a missing label on the first card, so the exemption is live from the first card on. It is worth knowing because ensure-pm-labels.sh records the opposite outcome for pinned and work-in-progress (hand-applied labels that answered 404 made their exemption dead); this label is machine-applied on create, so that failure does not repeat here. roadmap in the same list also answers 404 today; pre-existing, out of scope.
  • The sibling anchor has the same exposure. The platform-checklist-watchdog card (ANCHOR_IDENTITY_LABEL: platform-checklist-watchdog, routing pm:queue,tooling) carries no exempt label either. Outside this card's surface; a triage call, not a finding on this diff.
  • Governed path. .github/workflows/stale.yml is Tier H (job:stale holds issues: write and pull-requests: write). The edit widens nothing the token can do: it only makes the bot skip more issues.

④ Design judgment

.github/workflows/stale.yml against the code it cites (fleet-patrols.yml and scripts/pm/check-governed-merges.mjs at this head, read, not reviewed) and the card's scenario: the change holds. The exemption names the one label the card is guaranteed to carry while open, and it closes the route by which a non-ruling close could take carried BREACH rows off every open card.

  • S1 (should-fix) — The new comment, the PR body and the card all name a DEAD patrol as the trigger ("so a dead patrol's card would close"; the card: while the patrol is alive the card "is refreshed every week"). The code says otherwise: the card step's if: skips the whole step on a clean verdict, and composeAuditCard is documented as never called on one. So an open, unruled card is left untouched through every clean week of a HEALTHY patrol, and 60 quiet days plus 14 would stale-close it with the patrol running. The exemption is right and covers this case too; the stated reason is narrower than the real one, and a reader who later gives the patrol a heartbeat could conclude the exemption is no longer needed. Fix in the comment: say the card is refreshed only on a BREACH or NOT MEASURED week, so a run of clean weeks, or a stopped patrol, leaves it untouched. Not blocking: the behaviour shipped is correct.
  • N1 (nit) — Nothing pins that the string in exempt-issue-labels equals the job's ANCHOR_IDENTITY_LABEL; a rename of the identity label would silently kill the exemption. mailbox-open.mjs pins pinned against exempt-pr-labels in its self-test, so there is precedent, but tracking has no such pin and the card did not ask for one. The PR body's "no test pins this workflow key" is accurate. A follow-up at the seat's discretion.

No must-fix.

Implemented-by: claude/project-thread-90of5t
Reviewed-by: session_01L9qibxTeW8xHnxoHxWNHWW

VERDICT: PASS

@os-zhuang
os-zhuang marked this pull request as ready for review November 16, 2026 13:15
@os-zhuang
os-zhuang enabled auto-merge November 16, 2026 13:15
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit 3dfd867 Nov 16, 2026
58 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-90of5t branch November 16, 2026 13:47
@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 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd size/xs 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.

stale.yml: exempt the governed-merges-audit card, so a dead patrol's unruled audit card is not stale-closed with its carried BREACH rows

3 participants