Repository navigation
ci(fleet-patrols): weekly governed-merges audit job - #33766
Conversation
A fifth job in Fleet Patrols runs the post-merge governed audit (check-governed-merges.mjs, sweep mode) over the past week's main every Sunday 23:31 UTC. A clean week writes nothing; a low-risk skills arm BREACH or an unread week opens or refreshes one maintainer card (identity label governed-merges-audit, pm:awaiting-maintainer with a Maintainer-action line). The sweep reads a fresh shallow clone of main through GITHUB_TOKEN; a pull_request run sweeps 24h and writes nothing. Claude-Session: https://claude.ai/code/session_01FEkQ5mSZZN2eYXjy9RHmAu Co-Authored-By: Claude <noreply@anthropic.com>
|
domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb Contract reviewServed-tier: Read for this record: card #33717 body and its four comments (triage 6891276252, ruling 6891841310, claim 6892108396, dev report 6892535519); PR #33766 body, file list (one file, +402 / -18) and the net diff against ① Derived judgments
② Semver levelClause-②: no
③ Boundary flags
④ Design judgment
What holds, tried and not broken:
Findings:
S1 and S2 each earn a delta review of their fix. Neither lets a BREACH or an unread week end green with no card, so neither is a must-fix. Implemented-by: VERDICT: PASS Adopted by the seat 2026-11-15T09:54Z · isolated sub-agent at CONTRACT_REVIEW_TIER (served model verified by the seat) · Ruling-ref: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb, option A, tapped 2026-11-14T15:37Z |
…resh A refresh of the open audit card now keeps every BREACH row already on it that the current run did not read again, marked as carried, and posts one comment naming the run, the rows new to the card and the counts, so a later bad week neither drops an unhandled row nor edits the body silently. The Maintainer-action line now closes a BREACH row by the maintainer's ruling recorded on the card; a clean manual re-run answers only NOT MEASURED rows, since the arm keeps reading a breach until it leaves the window. The sweep step gets a 12-minute timeout (a timed-out sweep reads NOT MEASURED, files the card on main and goes red), and the paths comment says sibling patrols' paths also run the 24h sweep. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5mSZZN2eYXjy9RHmAu
|
domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb Contract reviewServed-tier: Delta review, ① Derived judgments
② Semver levelClause-②: no Unchanged: one workflow file, nothing published, ③ Boundary flags
④ Design judgment
Prior findings:
New findings:
S1 and S2 are closed, N2 and N3 hold as claimed, and nothing in the delta moved the permissions, the write guard, the concurrency group or the watchdog pin. S3 is owed a follow-up card; none of the new findings lets a BREACH or an unread week end green with no card. Implemented-by: VERDICT: PASS Adopted by the seat 2026-11-15T10:24Z · isolated sub-agent at CONTRACT_REVIEW_TIER (served model verified by the seat) · Ruling-ref: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb, option A, tapped 2026-11-14T15:37Z |
Closing the audit card is the maintainer's word that every BREACH row on it is ruled, so the card step now reads the keys on the newest closed card (its BREACH and already-ruled sections) as ruled. A later run that reads one again inside the window lists it under "Already ruled on card #N" instead of as a new BREACH, and a run whose every BREACH row is ruled and that reads nothing unread files nothing. A duplicate close is not a ruling. The refresh comment also counts the lines under the BREACH heading that carry no row key, so a hand-edited row the carry-forward cannot see is visible. Deleting a row by hand is no longer offered as a way to retire it, since a row still inside the window is read again and returns. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5mSZZN2eYXjy9RHmAu
|
domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb Contract reviewServed-tier: Delta review, ① Derived judgments
② Semver levelClause-②: no Unchanged: one workflow file, nothing published, ③ Boundary flags
④ Design judgment
Prior findings:
Fail-open hunt on the ruled set (can a new BREACH be swallowed as ruled):
New findings:
Nothing in the delta moved the permissions, the Implemented-by: VERDICT: PASS Adopted by the seat 2026-11-15T10:53Z · isolated sub-agent at CONTRACT_REVIEW_TIER (served model verified by the seat) · Ruling-ref: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb, option A, tapped 2026-11-14T15:37Z |
The card body's section reader stopped at the first blank line after a row, so a BREACH row the maintainer set apart with a blank line, and every row after it, was neither carried nor counted. It now reads to the next heading or to the footer's first line, and counts only non-blank, non-footer lines as unkeyed. A closed card now counts as a ruling only when it was closed within the audit's history days, so an old card cannot hide a reused key. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5mSZZN2eYXjy9RHmAu
|
domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb Contract reviewServed-tier: Delta review, ① Derived judgments
② Semver levelClause-②: no Unchanged: one workflow file, nothing published. ③ Boundary flags
④ Design judgment
Prior findings:
Break attempts on the reader:
New findings:
Nothing in the delta moved the permissions, the Implemented-by: VERDICT: PASS Adopted by the seat 2026-11-15T11:18Z · isolated sub-agent at CONTRACT_REVIEW_TIER (served model verified by the seat) · Ruling-ref: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb, option A, tapped 2026-11-14T15:37Z |
|
domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb 维护者速读
席位核对Verdict: ACCEPT, held for the maintainer · head
|
…s low-risk arm rows (objectstack-ai#33948) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi94Bm1UetTUkAru2JFLUkZvZ)_ Fixes objectstack-ai#33704 Clause-②: no Metadata-protocol: none Ruling-ref: 6891850019 ## 维护者速读 - 改了什么:删掉 `.github/CODEOWNERS` 里 `/skills/` 和 `/ui/skills/` 两行;队列守卫的 CODEOWNERS 镜像检查改为从登记表读「低风险技能臂」,带这个臂的行不再要求有 CODEOWNERS 行,反而有行就报红;同时改写 AGENTS.md 第 14 条里 CODEOWNERS 那句(改为「every Tier H surface but the low-risk catalogs」,中继逐个 PR 请审),并修正 check-governed-merges.mjs 两处注释。 - 为什么改:按你的裁决 6891850019「删除这两行(排在审计之后)」。审计工作流已上线(objectstack-ai#33766),技能 PR 请谁审改由中继逐个 PR 判断,不再每个技能 PR 都自动请你和 os-zhuang。 - 风险与回滚:只影响 GitHub 自动请审;落地门槛(Tier H 仍需批准)、审计、中继请审都不变。回滚 = revert 本 PR。 - 先看:`scripts/pm/check-governed-queue-guard.mjs` 的 `codeownersMirrorVerdict`(约 L792–L849);`AGENTS.md` L306–L307(第 14 条里「CODEOWNERS 路由每个 Tier H 面」改为低风险技能目录除外);再看 `.github/CODEOWNERS` 的删行与注释。 - 两分钟验证:`node scripts/pm/check-governed-queue-guard.mjs --self-test`,预期 `534 cases pass`。 - 需要你做的:批准并合并本 PR ## What changes - `.github/CODEOWNERS`: the `/skills/` and `/ui/skills/` lines are removed. The header paragraph that describes what the mirror check enforces and the two group comments above the removed lines say why those rows have no line. - `scripts/pm/check-governed-queue-guard.mjs`, `codeownersMirrorVerdict` (L792–L849 after the change; docblock and body only): a Tier H row that carries the register's low-risk arm in the repository under test (`lowRisk.repos`, read off each `GOVERNED_SURFACES` row; no pattern list is kept here) owes no CODEOWNERS line, and a line at its pattern is a problem naming the row. Rows without the arm are judged exactly as before. The verdict gains `armPatterns`; `tierHPatterns` now lists the Tier H patterns the file must carry. - The arm is scoped per repository by the register, so a sibling copy the arm does not reach (objectui) still owes the `/skills/` line. A pin holds that. - `AGENTS.md` L306–L307 (Prime Directive 14, the "Behind it" sentence): it said CODEOWNERS routes every Tier H surface to the approvers, which this PR makes false. It now reads "CODEOWNERS routes every Tier H surface but the low-risk catalogs to the approvers, the relay asks per pull on drafts (no barrier)". The two lines are rewrapped in place so AGENTS.md stays at its 1050-line ceiling (`check:pm-skill-ratchet`); to fit, "(a summons, no barrier)" became "(no barrier)" and the audit script is named by file, since its full path is given earlier in the same directive. Added by claim amendment 6896355134. - `scripts/pm/check-governed-merges.mjs`, comment text only (L479–L481, the low-risk arm docblock, and L6189, a self-test comment): both listed the CODEOWNERS mirror among the path-only readers that "answer as before". They now say the mirror reads the arm and keeps both catalog rows out of the file. No code changes. Added by claim amendment 6896370431. - Self-test (CODEOWNERS mirror battery, L5914–L5947): no other battery is touched. Line ranges are given because `check-governed-queue-guard.mjs` is shared with objectstack-ai#33539's low-risk arm reader region; this diff stays inside `codeownersMirrorVerdict` and its battery. ### Forced pin edits (named) - `the-patterns-are-the-register-rows-root-anchored-prefix-or-exact`: the expected list loses `/skills/` and `/ui/skills/`. - `every-Tier-H-row-that-governs-this-repository-is-a-pattern-the-file-carries` → `…-or-an-arm-row-it-leaves-out`: the count is `tierHPatterns + armPatterns`, and the arm patterns must be absent from the file. - `⛔ a-Tier-H-row-with-no-line-is-a-problem-naming-the-row` → `⛔ a-Tier-H-row-with-no-arm-and-no-line-is-a-problem-naming-the-row`: re-pointed from `/skills/` (now an arm row) to `/AGENTS.md` (`agents-md`, no arm). - `the-ui-patterns-are-root-anchored-under-ui-the-ui-claude-tree-included`: the expected `/ui/` list loses `/ui/skills/`; `uiRows.length === 6` stays (a register fact) and `uiRouted.length === 5` is added. - `⛔ without-its-ui-lines-the-file-on-disk-is-short-one-line-per-ui-row` → `…-without-an-arm`: the count is the five ui rows without the arm, and `ui-skills-catalog` must not be named. ### New pins - `⭐ the-arm-patterns-are-the-register-rows-carrying-the-low-risk-arm-here`: `/skills/,/ui/skills/`, and equal to the register rows filtered on `lowRisk.repos`. - `⭐ a-per-pull-arm-row-with-no-line-passes`. - `⛔ a-line-routing-an-arm-row-is-a-problem-naming-the-row-even-with-every-owner`. - `⛔ the-arm-is-per-repository-a-sibling-copy-it-does-not-reach-still-owes-the-skills-line`. ## Tests `node scripts/pm/check-governed-queue-guard.mjs --self-test` at eb771b5: `✓ check-governed-queue-guard self-test: 534 cases pass` (main at 895783a: 530; +4 new pins). The CODEOWNERS battery floor (12) and the roster floor (31) are unchanged. <details><summary>Ablations at 3aaac4f (one-off, ablation-replace.mjs, restored to the HEAD blob each time; the guard file is byte-identical at eb771b5)</summary> - A. Restore the removed line-check (`armedIn` forced false, so arm rows owe a line again): mutation landed (blob f65808d → 809e2a20), self-test `10 of 534 case(s) failed`, including the file on disk (`skills-catalog` / `ui-skills-catalog` have no line), the arm-pattern pin, `a-per-pull-arm-row-with-no-line-passes` and the sibling pin. Restored: blob == HEAD, `git diff HEAD` empty. - B. Drop the arm-line problem (the `problems.push` under `if (arm)` disabled): mutation landed (blob f65808d → 1d3a69a0), self-test `1 of 534 case(s) failed`: `⛔ a-line-routing-an-arm-row-is-a-problem-naming-the-row-even-with-every-owner`. Restored: blob == HEAD, `git diff HEAD` empty. </details> ## Acceptance notes - Precondition of the ruling: objectstack-ai#33717 is closed and the weekly governed-merges audit job is on main (PR objectstack-ai#33766, `.github/workflows/fleet-patrols.yml`). - The arm-row line is refused, not merely tolerated, for the same reason a Tier S row's line is refused: a static line summons both approvers on every catalog pull, which is what the ruling removes. A reviewer who prefers "optional" deletes the `if (arm)` branch and pin B's assertion. - Out of scope, untouched: the `/.github/workflows/` row (its `split` arm has the same mismatch; it has its own card). The predicate reads `lowRisk` only, so the workflows line stays required until that card extends it. - Tier H on four paths: `.github/CODEOWNERS` and `AGENTS.md` are governed register rows; the two `scripts/pm/` files are the enforcement chain CODEOWNERS routes to the approvers. - `ui/scripts/__tests__/check-governed-queue-guard.test.ts` tests the `ui/` copy of the guard, not this file; nothing in `packages/**` or `ui/**` imports this script. ## Verification Head eb771b5. `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` at eb771b5 derived 45 commands (38 at 3aaac4f, plus the AGENTS.md and check-governed-merges.mjs families: `check:pm-governed-merges`, `check:pm-governed-prose`, `check:pm-skill-id-lint`, `check:pm-skill-ratchet`, `check:docs-audit-scope`, `check-skills-token-ratchet` and its self-test). All 45 ran with exit 0 captured before any pipe, and `--ran` reconciles: `45 derived, 45 run, 0 NOT-MEASURED, 0 UNRUN` (a derived zero). `check:pm-skill-ratchet`: `AGENTS.md is 1050 lines (ceiling 1050; headroom 0)`. `pnpm check:pm-dispatch-gates` (fast tier): `2205 cases pass`. <!-- signed: domain:skills#2 · os-steve · session_01ADHkmPFUAMcPYPfnirkUSn --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…overned-merges, each with a self-test row (objectstack-ai#33982) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9JLcUHV5gm4BLjjD38Giz8P)_ Part of objectstack-ai#33814 domain:skills#1 · os-steve · session_01ADHkmQ9yJPqAUnGqQvBK47 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:每周治理合并审计(Fleet Patrols 的 `governed-merges-audit`)开卡/刷新卡的读法,从工作流里的内联脚本搬进 `scripts/pm/check-governed-merges.mjs`,并修掉评审留下的读法缺陷;工作流只保留 API 调用。 - 为什么改:这些读法以前没有自测,评审挑出的十几处(没有 PR 号的治理提交被读成干净、卡片正文可能超长被拒、非审批人账号(中继机器人、stale 机器人)或合并时的关闭关键字关卡被当成你的裁决等;仍有一个已写明的残余:席位用审批人账号关卡,会被读成该审批人的裁决)都只能靠人看;现在每处都有正反两向的自测行。 - 风险与回滚:只影响审计卡怎么写,不改排程、不改卡的标签和标题、不改审计的范围;方向都是宁可多报一行。回滚就是 revert 本 PR。 - 先看:① `.github/workflows/fleet-patrols.yml` 的「File or refresh the audit card」一步(先发评论再改正文、读关卡事件);② `scripts/pm/check-governed-merges.mjs` 新增的 `ruledAuditRows` / `auditCloseRuling`(谁关卡才算裁决,按账号判断);③ 同文件 `composeAuditCard` 的正文长度限制。 - 两分钟验证:`node scripts/pm/check-governed-merges.mjs --self-test`,应看到 `✓ check-governed-merges --self-test: 799 assertions`,结尾提到 weekly audit card。 - 需要你做的:审一下这个 draft PR,同意后批准(工作流文件是受管面,需要 GOVERNED_APPROVERS 批准后由席位落地)。 ## What changes The weekly governed-merges audit job's two `github-script` steps now import their readings from `scripts/pm/check-governed-merges.mjs` and keep only the I/O: `readAuditSweep` (sweep JSON → findings), `readAuditCardRows` (card body → keyed rows), `ruledAuditRows` / `auditCloseRuling` (closed cards → the rows they rule), `composeAuditCard` (findings + open card → next body and comment). The job's schedule, card identity (label, marker, title), state label and what it audits are unchanged. Review follow-ups of PR objectstack-ai#33766, triaged per item: - [x] **N4** a governed landing whose subject names no PR now reads NOT MEASURED (it read clean: the sweep lists it but reads no merge, review or record for it). - [x] **N5** the watchdog header says five jobs on five clocks. - [x] **N8** the body is fitted under 60,000 characters (GitHub refuses over 65,536): the quoted stderr, then NOT MEASURED rows, then BREACH rows from the tail; one row's text is cut at 1,000 characters. The BREACH heading and the refresh comment count the rows ON the card and name the overflow apart. - [x] **N9** the refresh comment is posted BEFORE the body is rewritten (a failed comment now leaves the old body, so the rows are announced again rather than never); a carried row the run read in another state says which state. - [x] **N10** a closed card rules only when the actor login of its last `closed` event is in the queue guard's `GOVERNED_APPROVERS` and the event names no commit: any other account's close (the relay bot, the stale bot), a closing keyword (the event names a commit) or an unreadable event rules nothing.⚠️ It is a login test: a seat session on an approver's account reads as that approver's close (see S1). - [x] **N12** every ruling card within the horizon counts, not only the newest closed card. - [x] **N13** keyed rows outside every section the audit reads (a reworded heading, a row moved above the first heading) are counted and named in the refresh comment. - [x] **N14/N16/N17** the section reader skips fenced blocks, stops at the LAST footer (or its second line alone), and the comment says when no footer was found. - [x] **N15** the ruled horizon is its own constant (`AUDIT_CARD.ruledHorizonDays`, 10, pinned ≥ 7 d + the 1 h skew budget); `AUDIT_HISTORY_DAYS`'s comment says it is the clone depth only, and the overstated "a reused key is never hidden" is gone. - [x] **N18** the card body states the day bound and who rules. - [x] **S1** (review 6896878561, delta 6897204057) worded as the login test it is: the header, the docstring, the card text and this body say a close rules only when its actor login is in `GOVERNED_APPROVERS` and it names no commit, and name the residual (a seat session on an approver's account reads as that approver's close). The close event's `performed_via_github_app` is passed through as served and read best-effort, by presence: absent ⇒ unreadable, rules nothing; an object (named or not) ⇒ rules nothing; null ⇒ the login test decides. The platform serves it null on every close event today (measured 2026-11-15 on the issue-events and timeline endpoints), so the object branch does not fire today. - [x] **S2** a fence on the card closes only on its own marker (same character, at least as long, nothing after it); a fence left open is reported in the refresh comment; the quoted stderr defuses tilde fences as well as backticks. - [x] **S3** BREACH rows that do not fit the card are named by key in the refresh comment, split into this run's (in its run log and artifact) and carried ones (held by no run's reading, so the comment is their last record); the body no longer claims the run log holds carried rows. The dropped-key list is capped (500 per group, then a count), and a row that did not fit is no longer announced as new to the card. - [ ] **N1** left open: the record-carry leg diffs the reviewed head against the landed head (`lowRiskRecordVerdict`), and the job's single-branch mirror holds no pull-request head commits. A fix needs the arm leg to name the commits it lacked (the arm region of this script, held by objectstack-ai#33765) and the clone step to fetch them before a re-sweep; outside this card's surface. The job header now documents the gap. - [ ] **N7** left open: a row the runner can never read is answered only by leaving the window. A fix is either N1's fetch or a card that accepts a seat's local re-read as the answer, which changes the card's `Maintainer-action:` contract (the maintainer's ruling); the header documents the gap and the PR-less row's own text says a re-run reads it the same way. N4 widens this class by design (a PR-less governed landing can never be read by a re-run), so it stays under N7 on the card. ## Tests - New battery `⭐ the weekly audit card: every reading the job files on, both ways (objectstack-ai#33814)`: 54 cases, floor pinned at 54; roster floor 38 → 39. Each fixed reading is pinned with its control (the neighbouring input that must still read as before); the card step's write order and the export names the job calls are read off the workflow file itself. - `node scripts/pm/check-governed-merges.mjs --self-test` → exit 0, `799 assertions`. - `node scripts/check-platform-checklist-watchdog.mjs --self-test` → exit 0 (53 assertions); the gate itself → exit 0. - Workflow YAML parses (`yaml`); both `github-script` bodies were run end to end against a fake `github` client (create and refresh scenarios), offline. - No forced test edits. ## Acceptance notes - `stale.yml` does not exempt the `governed-merges-audit` label (`exempt-issue-labels: 'pinned,security,roadmap,tracking'`), so an open audit card idle for 74 days is closed as not planned. After this PR such a close rules nothing (its rows are announced again while in the window), but its carried rows outside the window are lost. The fix is a one-word edit to another workflow file, outside this card's surface. carrier: domain:skills seat. ## Verification Gates: `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` on the final head, each command run, reconciled with `--ran` (head 77b6b46: 56 derived, 56 run, all exit 0; `--ran`: "56 derived famil(ies) accounted for — 56 run, 0 NOT-MEASURED". CI-run families are read from this PR's check-runs, not re-run locally). --- _Generated by [Claude Code](https://claude.ai/code/session_01ADHkmQ9yJPqAUnGqQvBK47)_ <!-- signed: domain:skills#1 · os-steve · session_01ADHkmPd7uRqHauEehGPr19 --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Leehom · project thread
Fixes #33717
domain:skills#1 · os-project-manager · session_01FEkQ5mSZZN2eYXjy9RHmAu
Clause-②: no
Metadata-protocol: none
维护者速读
fleet-patrols.yml加第五个任务governed-merges-audit,每周日 23:31 UTC(周一 07:31 北京时间)对过去一周的main跑合并后受管面审计(check-governed-merges.mjs,不改脚本)。干净的一周什么都不写;出现低风险技能臂的 ⛔ BREACH,或这一周有读不到的部分(NOT MEASURED),就开或更新同一张给你的卡。governed-merges-audit身份标签加pm:awaiting-maintainer,正文带Maintainer-action:行,席位不会派发它。卡开着时,之后的坏周会把卡上尚未处理的 BREACH 行原样带进新正文,并在卡上留一条评论通知;BREACH 行靠你在卡上记下的裁定了结(重跑永远读不成干净),只有 NOT MEASURED 行靠手动重跑读干净了结;全部了结后由你关卡。关卡即视为卡上各行已裁定:之后窗口内再读到同一行,只列在「Already ruled on card #N」下,不再当新违规报给你;若只剩已裁定的行且没有读不到的部分,就不开卡。回滚即 revert 本 PR。.github/workflows/fleet-patrols.yml文件末尾新任务的头注释与File or refresh the audit card一步(写卡的唯一一步,PR 运行与非 main 分支都不写);其次on.schedule里新加的 cron。Weekly governed-merges audit检查:它在 PR 上只扫 24 小时、不写卡,摘要里应写verdict clean并列出条目数。patrol = governed-merges-audit读首个整周结果;首个定时运行转绿前,skills 席位照旧每周手跑。What changes
One file,
.github/workflows/fleet-patrols.yml: a fifth job,governed-merges-audit, beside the four daily patrols, plus the shared parts a fifth job needs (header table, theschedule:cron, theworkflow_dispatchpatroloption, the count words "four clocks" / "all four").31 23 * * 0(Sunday 23:31 UTC), twinned in the job'sif:and inPATROL_SCHEDULE. Hour 23 UTC carries no other scheduled workflow in this repository (inventory of everycron:under.github/workflows/at bd96ec9); board-snapshot spends the sharedGITHUB_TOKENbudget at 2/8/14/20 andstale.ymlruns at 01:00.node scripts/pm/check-governed-merges.mjs --since 7d --repos objectstack --repo-root objectstack=$RUNNER_TEMP/audit-main --json, over a fresh--shallow-sinceclone (10 days) ofmain, not the job's own checkout: apull_requestcheckout is a merge ref, and the sweep refuses a window its history does not cover. The script itself runs from the job's checkout, so a PR runs the version it carries.--repos objectstackbecause the runner holds no sibling checkout (an absent checkout reads UNAUDITED by design).GITHUB_TOKENis the script's env channel; nopnpm install(the sweep and the queue-guard readers load on builtins and repo-local modules only).mainmoves between the clone and the script's ownls-remoteprobe, the sweep refuses the mirror as stale (exit 1,[stale-mirror], before any API read). The step re-fetches and re-runs, at most twice. Every other refusal stands.breach(an entry whosearm.stateisbreach),unread(an UNAUDITED repo, a WINDOW EDGE, an attribution error, an armnot-measured, exit 1, no or unparseable JSON, or exit andcompletedisagreeing),breach-and-unread, orclean. It writes the run summary on every trigger.schedule/workflow_dispatch, only onrefs/heads/main(the card step'sif:carries thepull_requestguard the watchdog pin requires). Identity and de-dup copy the platform-checklist watchdog: identity labelgoverned-merges-audit, plain-text markeros-governed-merges-audit, stable titlegoverned-merges audit: a BREACH or an unread week on main. An open card is refreshed in place (body only, labels untouched); a closed one is not reopened, and a new card names it. Labels on create:governed-merges-audit,pm:awaiting-maintainer; the body'sMaintainer-action: … — done when …line is the one that state owes (H55).PR #Norcommit SHA12) already on the open card that this run did not read again is carried into the new body, marked as carried; a row leaves only when the card is closed (deleting a row by hand does not retire it: a row still inside the window is read again and returns, and the body says so). NOT MEASURED rows are one run's reading and are not carried. Each refresh also posts one comment: the run link, the BREACH rows new to the card, the counts read again, carried and already ruled, the NOT MEASURED count, and how many lines under the BREACH heading carry no row key (a hand-edited row the carry-forward cannot see). A section is read from its heading to the next heading or the footer's first line, blank lines included, so a row set apart by a blank line is still carried; blank and footer lines are never counted.issues.createCommentsits in the same guarded step.AUDIT_HISTORY_DAYS, 10, and not as a duplicate; both its BREACH and its already-ruled sections) are read as ruled. The day bound means an old ruling can never hide a reused key. A later run that reads one again inside the 7-day window (a dispatch withpatrol=all, or the scheduled run's skew overlap) lists it under "Already ruled on card #N", not as a new BREACH; a run whose every BREACH row is ruled and that reads nothing unread files nothing.Maintainer-action:line: rule on each BREACH row (kept, or rolled back) and record the ruling as a comment on the card; re-run the job by hand for any NOT MEASURED row; done when every BREACH row has the ruling recorded on the card and a manual run reads no NOT MEASURED row, then close the card. A BREACH never reads clean on a re-run (the arm reads only evidence that existed before the landing, so the entry reads breach until it leaves the 7-day window), so a clean re-run is asked only of NOT MEASURED rows.main, and the run goes red.governed-merges-audit(30 days), so the card's run link carries the whole reading.pull_requestrun.AUDIT_SINCEis24hon a pull request: it proves the clone, the token's reads, the JSON contract and the rendering at a few dozen API reads, and writes nothing.Why
Ruling-ref: Leehom, option 0 「每周定时工作流」 on #33717 (record comment 6891841310), consequence line 「#33711 合并后加一个每周任务,只在发现违规或读不到时开一张卡给你。工作流 PR 是 Tier H,由你合并。」. PR #33711 (card #33603) gave the sweep its low-risk arm leg (
pass/breach/cleared/tier-h/not-measured); this job is its standing caller.Acceptance notes
needs-user-decisionowes a four-facet analysis on the card face (check-half-statesH62), which a machine cannot write, and its inbox counts rulings owed;pm:awaiting-maintaineris "decided, one act of the maintainer's remains" and owes aMaintainer-action:line (H55), which this card carries. AGENTS.md Prime Directive 14 already decides a seat landing without its record ("a seat violation, filed and rolled back. No seat judges this"), so the act is the maintainer's. Withoutpm:queuethe card is outside H74's population. If the maintainer prefers another route, it is one env value (ANCHOR_STATE_LABEL).pull_requestpaths filter not widened. The job names no path beyond this workflow file, the same posture as the watchdog:check-governed-merges.mjsand the queue-guard readers change several times a week,check:pm-governed-mergesalready runs their self-test per PR, and a live sweep on each would spend the shared token budget. Widening it would also be an edit to the frozenPR_TRIGGER_ALLOWED_PATHSpin, outside this card's surface. Because apull_requestrun exercises every job, a PR that matches a sibling patrol's path (scripts/pm/check-half-states.mjsamong them) also runs this job's 24h sweep, writing nothing; the paths comment says so. Consequence: a PR that changes the sweep's--jsonshape does not run this job; the verdict step reads a shape it does not recognise as NOT MEASURED (a card and a red run), never as clean.--since 7don a weekly clock overlaps consecutive runs by the script's 1 h skew budget; a run that does not fire leaves its week unread and nothing here sees it (the Actions run list does). A missed week is re-read by hand with a wider--since.GITHUB_TOKEN's per-repository hourly budget. Whether a repository-wide budget leaves room at 23:31 UTC on a Sunday is read by the first full run, and a shortfall surfaces as attribution errors, i.e. NOT MEASURED, never as clean..claude/**, the workflows split) are listed as governed merges without a record verdict. This job reports what the script reads and does not change it.Verification
Head
0f23dcd2(review fixesa41dcd29,86d72352and0f23dcd2on top offdffef2a), base bd96ec9.Live sweep, same flags the job runs (container, 2026-11-15)
--since 7d --repos objectstack --jsonon a 10-day shallow checkout: exit 0,complete: true, 191 entries, arm states{none: 120, pass: 16, tier-h: 27, cleared: 28}, 222 s.--since 24h --repos objectstack --repo-root objectstack=PATH --jsonon a freshgit clone --no-checkout --single-branch --shallow-since=DATE(DATE nine days back) of main (187 MB, 31 s): exit 0, complete, 43 entries, horizon "shallow, oldest visible 2026-11-06 (predates the window)".check-governed-queue-guard.mjs(withloadRecordRecognisers) load from a tree with nonode_modules.The two github-script bodies, run offline against fixtures
A harness (scratch, not committed) parsed this workflow, ran the verdict step and the card step with stub
core/context/github:clean, no write;breach(subject carrying a less-than fragment and an at-sign) and onenot-measured, exit 2: verdictbreach-and-unread, onecreatewith labelsgoverned-merges-audit,pm:awaiting-maintainer, the subject's angle brackets replaced and the at-sign defused,Maintainer-action:line present, next deadline computed weekly;unread, oneupdateof that card, stderr fenced in the body;unread, onecreatenaming the prior card;Maintainer-action:line withdone whenand no HTML comment;closed_at, is not a ruling, so the row files as BREACH. All 27 assertions pass.Governed verdict and tier
node scripts/pm/check-governed-merges.mjs --branch HEAD: exit 3, GOVERNED, landing tier H at0f23dcd2(.github/workflows/**split by content: apermissions:block added, asecrets.*reference atjob:governed-merges-audit/step:sweep, an addedset +eand|| true). The maintainer merges.node scripts/pm/dispatch-gates.mjs --tier: no path-derived model mandate; 578 changed lines (+560 / -18), under the 3000 human-merge line.Derived gates: 42 derived, 42 run, all exit 0
Head
0f23dcd2(re-run after the review round 3 fix; the derived list is unchanged fromfdffef2a):node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 42 commands; all 42 ran, all exit 0.--ran: "42 derived famil(ies) accounted for — 42 run, 0 NOT-MEASURED". No package is touched, so no build closure is owed and no package test runs (skip-changeset: a workflow file publishes nothing).Generated by Claude Code