diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2492efaec1c..04925b3b3e3 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,10 +1,12 @@ -# .github/CODEOWNERS — governance routing: every Tier H governed surface to -# every authorized approver. +# .github/CODEOWNERS — governance routing: every Tier H governed surface but +# the low-risk arm's rows to every authorized approver. # # The ruling this file helps enforce (maintainer, verbatim): # 「adr 只能由维护者自己确认,人工合并,ai 不得擅自合并。」 -# It holds for every ADR change except an add-only note (no removed line, no `Status:` line, nothing under -# `Decision`, no new, renamed or deleted file), which rides the low-risk arm (Ruling-ref Leehom, 「同意 把低风险的 Tier H 放权给座位」). +# It holds for every ADR change except an add-only note in the root tree (no +# removed line, no `Status:` line, nothing under `Decision`, no new, renamed or +# deleted file), which lands under the low-risk arm's conditions (Ruling-ref +# Leehom, 「同意 把低风险的 Tier H 放权给座位」). # # The owner list on EVERY row mirrors `GOVERNED_APPROVERS` in # scripts/pm/check-governed-queue-guard.mjs — the one list of accounts whose @@ -17,8 +19,9 @@ # any line names fewer or other owners than that constant, or when a Tier S row # (`.claude/**`, which lands on a seat's review of record) is routed here. A # Tier H row carrying the register's low-risk arm (`lowRisk`: the two skills -# catalogs and the root ADR tree) has NO line here and reds if one is added: the relay's per-pull -# review plan reads the arm and decides who is asked (ruling record 6891850019). +# catalogs and the root ADR tree) has NO line here and reds if one is added: +# the relay's per-pull review plan reads the arm and decides who is asked +# (ruling record 6891850019). # Change the constant or the register first; this file follows in the same PR. # # What routing buys, and what it does not: GitHub requests a code owner's diff --git a/.github/workflows/fleet-patrols.yml b/.github/workflows/fleet-patrols.yml index 03159a3679b..c4846cb4647 100644 --- a/.github/workflows/fleet-patrols.yml +++ b/.github/workflows/fleet-patrols.yml @@ -1472,10 +1472,11 @@ jobs: # * a CLEAN week — the sweep exits 0 and no low-risk arm landing reads # ⛔ BREACH — writes NOTHING. The run summary and the uploaded JSON are the # record that it ran; the Actions run list is the heartbeat. - # * a BREACH (an arm landing without a same-head at-tier PASS record) or a - # NOT MEASURED week (exit 2: a repo, a window edge, an attribution or an arm - # read the sweep could not make; exit 1 or no JSON: it could not sweep at - # all) opens or refreshes ONE card for the maintainer. + # * a BREACH (an arm landing without a same-head at-tier PASS record, or on + # a record stage reading Tier H) or a NOT MEASURED week (exit 2: a repo, a + # window edge, an attribution or an arm read the sweep could not make; + # exit 1 or no JSON: it could not sweep at all) opens or refreshes ONE + # card for the maintainer. # # The card enters `pm:awaiting-maintainer` with a `Maintainer-action:` line: # AGENTS.md Prime Directive 14 already decides what a seat landing without its diff --git a/.github/workflows/fleet-write.yml b/.github/workflows/fleet-write.yml index a37f7b6fc82..d96f6a8df15 100644 --- a/.github/workflows/fleet-write.yml +++ b/.github/workflows/fleet-write.yml @@ -170,14 +170,18 @@ jobs: # warning by removing the input. ⛔ A refused mint fails this step with zero writes; no step here # ever mints an un-narrowed token instead. permission-repository-advisories: ${{ steps.validate.outputs.permission_repository_advisories }} - # ONE consumer: the `pr_enqueue_front` row — `enqueuePullRequest(jump: true)`, the front of a base's merge - # queue, which reorders every queued pull behind it ("Jump to the front of the queue" is a repository - # permission above write). Minted ONLY for a stroke carrying that op, which travels alone, the same way as - # `permission-actions`: the validator writes `permission_merge_queues=write` for it and an EMPTY value for - # every other stroke, so every other run's token is exactly what it was. The App installation must hold - # `Merge queues: write` (a maintainer's setting); without it this mint fails with zero writes. Whether - # GitHub honours the jump for an App token is NOT MEASURED until the first live stroke, whose read-back - # judges it (`scripts/pm/fleet-write/execute.mjs`, "The front-of-queue enqueue"). + # TWO consumers, one at a time: the `pr_enqueue_front` row — `enqueuePullRequest(jump: true)`, the front + # of a base's merge queue, which reorders every queued pull behind it ("Jump to the front of the queue" is + # a repository permission above write) — and the `pr_dequeue` row — `dequeuePullRequest`, which takes one + # pull out of its base's queue. Each travels alone; the grant is minted ONLY for a stroke carrying one, the + # same way as `permission-actions`: the validator writes `permission_merge_queues=write` for it and an + # EMPTY value for every other stroke, so every other run's token is exactly what it was. The App + # installation must hold `Merge queues: write` (a maintainer's setting); without it this mint fails with + # zero writes. Whether GitHub honours the jump for an App token is NOT MEASURED until the first live + # stroke, whose read-back judges it (`scripts/pm/fleet-write/execute.mjs`, "The front-of-queue enqueue"). + # Whether `dequeuePullRequest` needs this grant at all, or what a token without it answers, is + # NOT MEASURED either: the one live stroke carried the grant (`scripts/pm/fleet-write/ops.mjs`, "The one + # row that takes a pull OUT of the merge queue"). permission-merge-queues: ${{ steps.validate.outputs.permission_merge_queues }} # The sender gate, then the actions in order, then the step summary — diff --git a/AGENTS.md b/AGENTS.md index ff52de928d4..fb2c92aa7c5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -289,18 +289,18 @@ See `ui/AGENTS.md` for the app-id / localStorage / auth gotchas. (人合: every row outside Tier S): those four lift only for an authorized APPROVED review by an account in `GOVERNED_APPROVERS`, on ANY commit and not dismissed; that word is spent once per PR — the OWNING seat then lands it, later pushes included; the click stays the maintainer's. **Tier S** (席内达档 L2 审核落地: `.claude/**`, - objectstack workflow edits (`readWorkflowDiff`), skills-only wording and add-only ADR notes (`lowRiskArmVerdict`; - the seat labels unnamed security teaching) read as S): those four lift once the PR thread or its card carries a - `## Contract review` record for the PR's current head with `Served-tier: CONTRACT_REVIEW_TIER` and a PASS verdict - and every check is green — the owning seat lands it through the queue. A PR whose only governed paths are register - rows the queue leg regenerates byte-exact clears with zero approvals — an uncertified recompute, drift or a - hand-authored sibling keeps it governed. ⛔ **No agent seat submits an approving review on a governed-surface PR, - under any account** — an authorized account is agent-operated too; "CI is green" says nothing about a governance - change. An authorized account's enqueue is a review record too: ⛔ never a seat's. + objectstack workflow edits (`readWorkflowDiff`), skills-only wording and add-only ADR notes (`lowRiskArmVerdict`, on + a `Security-touching: no` record, no named card ever labelled `security`; the seat labels unnamed security teaching) + read as S): those four lift once the PR thread or its card carries a PASS `## Contract review` record for the PR's + current head with `Served-tier: CONTRACT_REVIEW_TIER` and every check is green — the owning seat queues it. A PR + whose only governed paths are register rows the queue leg regenerates byte-exact clears with zero approvals — an + uncertified recompute, drift or a hand-authored sibling keeps it governed. ⛔ **No agent seat submits an approving + review on a governed-surface PR, under any account** — an authorized account is agent-operated too; "CI is green" + says nothing about a governance change. An authorized account's enqueue is a review record too: ⛔ never a seat's. **Already armed or queued when you read this?** Disable auto-merge AND convert it back to **draft**, which disarms - an unqueued PR; no seat act, those two included, is measured to dequeue one (`platform-readings.md`, queue - membership), so ask the maintainer at once to remove a queued PR by hand — then confirm from the remote that it is + an unqueued PR; a queued one's landing seat sends the relay's `pr_dequeue` (measured live, comment 6902190812); any + other seat, or a stroke that does not land, asks the maintainer at once — then confirm from the remote that it is in neither the queue nor `origin/main`. **Draft is no barrier by itself — the barrier is this directive**, and a spent approval or a standing record IS the review record, ⛔ not a relaxation. Behind it: the queue guard refuses a governed diff without its tier's record; CODEOWNERS routes every Tier H surface but the low-risk arm's rows to the