Repository navigation
ci(fleet-patrols): the weekly audit card's readings move into check-governed-merges, each with a self-test row - #33982
Merged
Merged
Conversation
…overned-merges with self-test rows The governed-merges-audit job's two github-script steps now import their readings from scripts/pm/check-governed-merges.mjs (readAuditSweep, readAuditCardRows, ruledAuditRows, composeAuditCard) and keep only the API calls. The review follow-ups of the job's PR are fixed there, each pinned both ways in a new self-test battery: - a governed landing with no PR number reads NOT MEASURED, never clean; - the card body is fitted under the issue-body limit, and the BREACH heading and refresh comment count the rows on the card; - the refresh comment is posted before the body is rewritten, and a carried row names the state this run read it in; - a closed card rules only when an authorized approver closed it by hand (not a seat, a closing keyword or the stale bot), and every such card in the horizon counts, not only the newest; - the section reader skips fenced blocks, stops at the last footer (or its second line), and counts keyed rows outside every known section; - the ruled horizon is its own constant, and the card text states it. The watchdog header now says five jobs. Claude-Session: https://claude.ai/code/session_01ADHkmQ9yJPqAUnGqQvBK47 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmQ9yJPqAUnGqQvBK47 Co-authored-by: Claude <noreply@anthropic.com>
10 of 12 tasks
- an approver's account closing the card through a GitHub App is a seat session and rules nothing; the job passes the close event's performed_via_github_app through; - 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, and the quoted stderr defuses tilde fences too; - BREACH rows that do not fit the card are named in the refresh comment, and a dropped carried row is no longer said to be in the run log. Claude-Session: https://claude.ai/code/session_01ADHkmQ9yJPqAUnGqQvBK47 Co-authored-by: Claude <noreply@anthropic.com>
…n test it is The close event's performed_via_github_app is read by presence (absent: unreadable, rules nothing; an object, named or not: rules nothing; null: the login test decides) and passed through as served. The platform serves it null on every close event today, so the header, the docstring and the card text now say what decides: the actor login is in GOVERNED_APPROVERS and the event names no commit, with the seat-on-an-approver's-account residual named. A row that did not fit is no longer announced as new to the card, and the dropped-key list is capped with a count. Claude-Session: https://claude.ai/code/session_01ADHkmQ9yJPqAUnGqQvBK47 Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:skills#1 · os-steve · session_01ADHkmPd7uRqHauEehGPr19 维护者速读
席位意见:建议批准。一个残余请您知悉:GitHub 在关卡事件上不提供「经哪个 App 签发」(2026-11-15 实测,events 与 timeline 两个端点都是 null),所以审计卡只能按账号判断。席位会话若用审批人账号关卡,会被读成该审批人的裁决,与队列守卫的账号判定同一水平。本卡 N1/N7 未完( 席位核对 · ACCEPT · head
|
os-zhuang
marked this pull request as ready for review
November 15, 2026 16:33
os-zhuang
enabled auto-merge
November 15, 2026 16:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Steve · project thread
Part of #33814
domain:skills#1 · os-steve · session_01ADHkmQ9yJPqAUnGqQvBK47
Clause-②: no
Metadata-protocol: none
维护者速读
governed-merges-audit)开卡/刷新卡的读法,从工作流里的内联脚本搬进scripts/pm/check-governed-merges.mjs,并修掉评审留下的读法缺陷;工作流只保留 API 调用。.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。What changes
The weekly governed-merges audit job's two
github-scriptsteps now import their readings fromscripts/pm/check-governed-merges.mjsand 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 #33766, triaged per item:
closedevent is in the queue guard'sGOVERNED_APPROVERSand 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.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.GOVERNED_APPROVERSand 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'sperformed_via_github_appis 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.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 review follow-ups of PR #33762 #33765) and the clone step to fetch them before a re-sweep; outside this card's surface. The job header now documents the gap.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
⭐ the weekly audit card: every reading the job files on, both ways (#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.yaml); bothgithub-scriptbodies were run end to end against a fakegithubclient (create and refresh scenarios), offline.Acceptance notes
stale.ymldoes not exempt thegoverned-merges-auditlabel (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/objectstackon 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