Owner-only lock after #1748 — verification and owner action packet
Measured: 2026-10-16, 15:40Z–16:10Z, read-only, from a cloud session whose GitHub token is repository-scoped (org settings, the Actions-permissions path and detailed branch protection answer 403 or 404). Every value below is a command's output; nothing was changed.
Verdict: repository code now routes every change to owner review, and
nothing on GitHub enforces it yet. The ruleset main-required-checks is still
evaluate; no ruleset carries a pull-request rule; branch protection reads
"Branch not protected". Enforcement cannot be certified until the owner applies
the settings in §3 and a fresh read shows them active.
1. What #1748 landed (true of main)
| Claim in the status report | Measured |
|---|---|
#1748 merged 11:25 a.m. EDT, 3e55cf5b |
merged_at 2026-10-16T15:25:00Z, merged_by mediaintelligence, merge commit 3e55cf5b0f3fc9f5dba7426ce2b8594b5a0a4955, 11 files, +245/−68 |
| All-path review routing | .github/scripts/protected_path_gate.sh sets PROTECTED_REGEX='.': every changed path is a hit, so every auto-merge lane run refuses the merge and routes to review |
| Owner-only CODEOWNERS | every rule in .github/CODEOWNERS resolves to @mediaintelligence |
| Parity fix | mcp/mizoki-skills-mcp/github_core.py, mcp/registrations/github.json, connectors/github/register_github_connector.sh and tests/skills/test_github_skillpack_mcp.py carry the all-path policy |
| Required checks green at merge | on the PR head b2f7eab12df34cc29820dfd9bc2b42f5696703ab, the required contexts that reported (Lint, Test, and Validate; LII cell suites 33–36; Measurement rails; Governance gates; Orphaned suites) all success before 15:25Z |
2. What is NOT enforced (true of GitHub, measured)
gh api repos/MIZOKI-3-5/MIZOKICloudRun/rulesets
21326475 main-block-force-push active rules: non_fast_forward bypass_actors: []
23473620 main-required-checks evaluate rules: deletion, required_status_checks
strict=false, do_not_enforce_on_create=true, bypass_actors: []
13 contexts == .github/required-status-checks.json (set equality: true)
gh api repos/MIZOKI-3-5/MIZOKICloudRun/branches/main/protection
404 Branch not protected
- No ruleset has a
pull_requestrule, so required approvals and required CODEOWNER review do not exist as a setting. CODEOWNERS is routing only, as its own header says. evaluateenforces nothing. A red PR, or a PR with no review, merges by the button exactly as before (rule 07, "The bot gate does not cover a HUMAN merging a red PR").- Reviews on #1748 after the merge, from the REST reviews listing:
cursor[bot]APPROVED at 15:25:59Z (59 s after the merge) with the text "No applicable approval policy required human review";copilot-pull-request-reviewer[bot]COMMENTED "Changes recommended" at 15:30:03Z with two open findings (homepage release initiation flow; GitHub guidance parity). Neither review could have gated the merge, and neither would satisfy a CODEOWNER-review rule once one exists. Cursor's automation text should be aligned so it does not announce that human review is not required.
3. Owner-only actions, in order (none is a session action)
- Plan. On the Mac runner run
scripts/runner_jobs/020_v4_17_activate.shwithoutAPPLY. It prints the seven preconditions (variable, secret, token-split lane wiring onmain, context set equality, no lane branch on pre-fix-B YAML, bot-commit path, no main-writer run in flight). The secretAUTO_MERGE_PR_TOKENand the variableAUTO_MERGE_VIAwere last measured absent (runbook §6.2, 2026-09-23); the job refuses activation without them. - Token and variable per
docs/runbooks/AUTH_AND_DISPATCH_RUNBOOK_2026-09-16.md§6.2 steps 2–3: a fine-grained PAT (resource ownerMIZOKI-3-5, this repo only, Pull requests read/write, Contents read, Metadata read), set withgh secret set AUTO_MERGE_PR_TOKEN(hidden input, never in chat or a file), thengh variable set AUTO_MERGE_VIA --body pr. Watch one lane landing (step 4). - Activate 23473620 via job 020
APPLY=1after the typed gate, in-session: enforcementactive, strict on, the 13 contexts unchanged,bypass_actorsempty, enforce on create. - Identity split and audit FIRST (merged doc
docs/governance/OWNER_RULE_APPROVAL_2026-10-16.md"Required platform activation" items 1–2): the cloud sessions' proxy token identifies as the owner user (runbook §1, measured 2026-09-21), so every PR a session opens is owner-authored, and GitHub forbids an author approving their own PR. A code-owner-review rule activated before a distinct agent identity exists would leave every session PR unapprovable (Copilot on #1750). Create the agent identity (GitHub App or machine user with the lanes' token scope), then audit org owners, repo admins, installed Apps, PATs, deploy keys and workflow permissions; require strong owner authentication. - Add the pull-request rule, after step 4 (a new ruleset on
~DEFAULT_BRANCH, or a rule on 23473620): required approving reviews 1, require review from code owners, dismiss stale approvals on push, require conversation resolution, no bypass actors. This is the half #1748 could not supply; without it CODEOWNERS remains routing. - Bot review policy. Set Cursor Bugbot's automation to never approve on this repository, or require human review in its policy. Keep Copilot and Bugbot as commenters.
- Deployment protections (merged doc items 6–7): environment approval and
deployment-branch restrictions for the dispatch-only deploys, the homepage
included. Copilot's open finding on #1748 stands: once all-path review is
enforced, the homepage release needs a compatible initiation path, because
today it is an owner dispatch from
mainwith a typed token and a canon check, and the lanes cannot open the review PR for a blocked branch (can_approve_pull_request_reviews=false, rule 02).
4. Consequence already in force on every lane
Because the gate regex is ., every push to claude/**, cursor/**,
gemini/**, codex/** and copilot/** now ends in an [Auto-Merge Blocked]
issue and no merge. Landings go through a human-opened PR that the owner
merges. The sweeper will re-dispatch cancelled lane runs, which re-block. This
is the intended posture; the blocked-issue count will climb until lanes move
to the reviewed-PR path (merged doc item 7).
5. Re-measure after activation
gh api repos/MIZOKI-3-5/MIZOKICloudRun/rulesets -q '.[]|[.id,.name,.enforcement]|@tsv'
gh api repos/MIZOKI-3-5/MIZOKICloudRun/rulesets/23473620 \
-q '{enforcement,bypass_actors,rules:[.rules[]|{type,strict:.parameters.strict_required_status_checks_policy}]}'
gh api repos/MIZOKI-3-5/MIZOKICloudRun/rulesets -q '.[].id' | xargs -I{} gh api repos/MIZOKI-3-5/MIZOKICloudRun/rulesets/{} -q '[.name, ([.rules[].type]|join(","))]|@tsv'
Done means: 23473620 active with strict on; a ruleset whose rules include
pull_request with code-owner review required; both with empty
bypass_actors; then the verification protocol in the merged doc, run with an
unprivileged agent identity in a test repository, with the outputs retained.
6. Pre-approved implementation (owner message 2026-10-16, ~16:00Z)
The owner pre-approved "all the necessary next steps". This section records what a session could build under that approval, what it built, and what it could not build and why. Built, on this PR (deploys 0 services):
| Step | What landed | Pinned by |
|---|---|---|
| Lanes open the owner-review PR (merged doc item 7, rule 07 residue) | .github/scripts/open_review_pr.sh: gh pr create on AUTO_MERGE_PR_TOKEN, every other call on the repository token, red unless an open PR exists afterwards; all four lanes call it. Superseded 2026-10-17 (§7): the lanes no longer call it; open-review-prs.yml does, from main |
tests/governance/test_open_review_pr.py (9 tests; the four pre-change lanes fail its pins) |
| Agent guidance says all-path sole-owner review (Copilot finding 2 on #1748) | skills/github-virtuoso/SKILL.md items 3, Skill 3 and Skill 4, references/connector_setup.md, references/boss_agent_skillpack_github.md, byte-identical copies under .claude/skills/ and .agents/skills/; rule 02 and rule 07 wording |
tests/skills/test_github_skillpack_mcp.py (parity), github_skills_parity_check |
| Homepage release prerequisite (Copilot finding 1) | docs/governance/OWNER_RULE_APPROVAL_2026-10-16.md item 6 names the flow that must exist before environment approval is enforced on the homepage |
review |
| Register | docs/OPEN_ITEMS.md V4-17 carries the 2026-10-16 measurement and the two blocked settings |
tests/governance/test_open_items_one_row_per_id.py |
Not built, each for a measured reason:
- The PR token secret. The owner creates it; no session sees it (runbook §6.2 step 2). Until it exists the new step is red on every lane run and names the secret.
- Ruleset 23473620 to
active. Job 020 refuses without the secret and variable, by design (fix E), and a direct API flip would reject the three bot-commit workflows' push-mode landings after their deploys succeed. The flip follows the secret, in the runbook's order. - The code-owner-review
pull_requestrule. Every PR a cloud session opens is authored by the owner's login (the proxy token identifies asmediaintelligence, runbook §1), and GitHub forbids an author approving their own PR. Activated before the identity split (merged doc item 1), the rule would leave no PR from any session approvable, this one included. Order: distinct agent identity first, then the rule. - Cursor's approval policy, the identity audit, environment protections. Org and app settings; the session's token answers 403 on every one.
Cost of the posture already in force: every AI-lane push is now refused and
routed; with the secret absent, each such run ends red at the PR-open step and
files an [Auto-Merge Blocked] issue. Setting the secret turns each of those
into an open PR for the owner, with no further code change. (Since §7 the red
and the issue come from the Open Review PRs workflow, not the lane.)
7. 2026-10-17 follow-up: the PR token leaves the lanes
Owner approval 2026-10-17 ("resolve all, make the decisions, integrate")
closed the one design question §6 left open: Cursor's second security
finding on #1750. The finding stood. A push runs the lane's workflow file at
the pushed commit (rule 07), so the branch under review could read the secret
the PR-open step carried — by rewriting the step, or by poisoning PATH in an
earlier step so that bash, git or gh in the PR-open step was its own
binary. Running main's blob of the script (#1750 round 1) closed the
script-swap route only. The token's narrow scope (Pull requests read/write,
Contents read, this repository) was the sole mitigation for the rest.
Decision taken: the secret never enters a lane. Built, on this PR (deploys 0 services):
| Piece | What it does | Pinned by |
|---|---|---|
.github/workflows/open-review-prs.yml |
workflow_run of the four lanes (accelerator) + */30 cron (guarantee) + workflow_dispatch with an optional branch; explicit main checkout; permissions contents: read, pull-requests: write, issues: write, actions: read; its own concurrency group; never reads the event payload |
TestOpenReviewPrsWorkflow |
.github/scripts/open_review_prs_plan.py |
Re-reads the API: every completed lane run in 14 days, newest run per branch; plans a PR for each branch that exists, is not on main, has no open PR, was not merged after that run (a squash leaves the tip ahead) and was not closed unmerged after it (a human decision; a new push re-routes); carries the compare's changed-file list as the PR body; refuses unsafe names and reports runs dispatched at main as unattributable |
TestPlanner (14 decisions) |
.github/scripts/open_review_prs_run.sh |
Runs main's open_review_pr.sh per planned branch (the PR token on gh pr create only, as before), files one [Auto-Merge Blocked] <branch> requires owner review issue per branch it could not route, exits 1 if any branch has no PR |
TestRunner |
.github/scripts/route_to_owner_review.sh |
The lanes' whole step now: read-only on the repository token, reports an already-open PR by number, names the workflow that opens it otherwise, exit 0 on a refusal, exit 1 if AUTO_MERGE_PR_TOKEN is in its environment (the wiring cannot quietly return) |
TestRouteToOwnerReview |
| The four lanes | Step renamed "Route to owner review instead of merging (protected paths)"; env carries GH_TOKEN, the branch and the hits, no secret; handlers and Summaries name the workflow that opens the PR and never claim an opening the lane did not measure (REVIEW_PR_NUMBER from the read-only lookup) |
TestLanesCarryNoPrToken, TestRefusedRunsAreNotConflicts |
| Repo-wide ratchet | Every workflow step that names secrets.AUTO_MERGE_PR_TOKEN is enumerated: the lanes' pr-mode merge steps (skipped on every run while the gate matches every path), the three bot landings (main's own code, rule 07 fix C) and the one step of open-review-prs.yml |
test_repo_wide_the_secret_is_named_only_where_main_runs_or_the_gate_skips |
What a branch can gain by reaching the new workflow: nothing. The PR carries no approval and no merge; it is routing to the owner, and the only question the workflow asks the untrusted world is "which branches exist", which the API answers.
Behaviour while the secret is absent: the Open Review PRs run is red on every
pass that has a branch to route, with open_review_pr.sh's ::error:: line
naming the secret, and each stranded branch has one open [Auto-Merge Blocked]
issue. Setting the secret (runbook §6.2 step 2) turns the next pass green and
opens every waiting PR; the planner's 14-day window is what makes that true for
branches that arrived before the secret did.
Residue, stated so nobody reads this as "the lanes are hardened":
- The lanes' pr-mode merge step still names the secret (fix B). The all-path gate skips it on every run, and a skipped step's environment is never materialised; retiring it means retiring V4-17's pr path, a separate owner decision.
- The gate script (
protected_path_gate.sh) and the memory-governance step still run from the pushed tree in the AI lane and auto-sync. That is the standing rule-07 residue — a workflow-side gate can be edited by the branch it gates — and only the active ruleset closes it. Nothing in this PR changes it; this PR removes what that residue could have been used to steal. - A lane run dispatched by a human at
mainwith abranchinput is not attributable from the API (inputs are not exposed). The planner reports it; the workflow's ownbranchinput routes it by hand. - Nothing here has run on GitHub until this PR merges; the first lane push
after the merge is the first live evidence, and with the secret absent it
will show as one red
Open Review PRsrun plus one issue per branch.
Owner-only, unchanged from §3: the secret (step 2), the ruleset flip (step 3), the identity split (step 4), the code-owner-review rule after it (step 5), Cursor's approval policy (step 6) and the environment protections (step 7).