From c6dcc41d165d4f258434a6d81ab10350522662c7 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 02:24:39 +0000 Subject: [PATCH 1/2] pm: PD14 names the relay dequeue door and the arm's security conditions; CODEOWNERS and fleet workflow comments follow - AGENTS.md Prime Directive 14: a queued governed PR leaves by its landing seat's relay `pr_dequeue` (measured live: the seat-asks stroke whose audit comment is 6902190812) and any other seat asks the maintainer to remove it by hand. The low-risk arm reads as Tier S only on a `Security-touching: no` record and no named card ever labelled `security` (#34133). Line count stays 1050; the added words are paid inside PD14. - .github/CODEOWNERS header: the title qualifies "every Tier H governed surface" by the arm's rows; the ADR ruling sentence says "in the root tree" and "under the low-risk arm's conditions" and wraps at the file's width (#33975 review N9, the hunk of 3bc27d49). Comment lines only. - fleet-write.yml: `permission-merge-queues` has two consumers, `pr_enqueue_front` and `pr_dequeue`, each travelling alone; the NOT MEASURED note extends to the dequeue mutation's need for the grant. Comment only. - fleet-patrols.yml: the weekly audit's BREACH also covers an arm landing on a record stage reading Tier H. Comment only. Claude-Session: https://claude.ai/code/session_01ADHkmRoFewgpd9ro12rK2L Co-authored-by: Claude --- .github/CODEOWNERS | 15 +++++++++------ .github/workflows/fleet-patrols.yml | 9 +++++---- .github/workflows/fleet-write.yml | 19 +++++++++++-------- AGENTS.md | 22 +++++++++++----------- 4 files changed, 36 insertions(+), 29 deletions(-) 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..a5b284eb60d 100644 --- a/.github/workflows/fleet-write.yml +++ b/.github/workflows/fleet-write.yml @@ -170,14 +170,17 @@ 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"); + # nor is whether `dequeuePullRequest` needs this grant at all, or what a token without it answers + # (`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..3c8a0e3ae1f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -289,19 +289,19 @@ 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 its + 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 - in neither the queue nor `origin/main`. **Draft is no barrier by itself — the barrier is this directive**, and a + an unqueued PR; for a queued one its landing seat sends the relay's `pr_dequeue` (measured live, comment 6902190812) + and any other seat asks the maintainer to remove it by hand 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 approvers, the relay asks per pull on drafts (no barrier); the post-merge audit (`check-governed-merges.mjs`) lists From 2198eb03af381718f5e295f5d791e8e7557b9794 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 02:59:54 +0000 Subject: [PATCH 2/2] pm: PD14 gives the landing seat a backstop when its dequeue does not land; the dequeue grant note says what the live stroke carried Review round 1 on the contract review of record (S1, N2, N4): - AGENTS.md Prime Directive 14: any other seat, or a dequeue stroke that does not land, asks the maintainer at once; "for the PR's current head". Line count stays 1050. - fleet-write.yml: whether dequeuePullRequest needs the merge-queue grant is NOT MEASURED either, and the one live stroke carried the grant. Comment lines only. Claude-Session: https://claude.ai/code/session_01ADHkmRoFewgpd9ro12rK2L Co-authored-by: Claude --- .github/workflows/fleet-write.yml | 7 ++++--- AGENTS.md | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/fleet-write.yml b/.github/workflows/fleet-write.yml index a5b284eb60d..d96f6a8df15 100644 --- a/.github/workflows/fleet-write.yml +++ b/.github/workflows/fleet-write.yml @@ -178,9 +178,10 @@ jobs: # 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"); - # nor is whether `dequeuePullRequest` needs this grant at all, or what a token without it answers - # (`scripts/pm/fleet-write/ops.mjs`, "The one row that takes a pull OUT of the merge queue"). + # 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 3c8a0e3ae1f..fb2c92aa7c5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -291,7 +291,7 @@ See `ui/AGENTS.md` for the app-id / localStorage / auth gotchas. 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`, 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 its + 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 @@ -299,9 +299,9 @@ See `ui/AGENTS.md` for the app-id / localStorage / auth gotchas. 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; for a queued one its landing seat sends the relay's `pr_dequeue` (measured live, comment 6902190812) - and any other seat asks the maintainer to remove it by hand 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 + 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 approvers, the relay asks per pull on drafts (no barrier); the post-merge audit (`check-governed-merges.mjs`) lists