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

3. Owner-only actions, in order (none is a session action)

  1. Plan. On the Mac runner run scripts/runner_jobs/020_v4_17_activate.sh without APPLY. It prints the seven preconditions (variable, secret, token-split lane wiring on main, context set equality, no lane branch on pre-fix-B YAML, bot-commit path, no main-writer run in flight). The secret AUTO_MERGE_PR_TOKEN and the variable AUTO_MERGE_VIA were last measured absent (runbook §6.2, 2026-09-23); the job refuses activation without them.
  2. Token and variable per docs/runbooks/AUTH_AND_DISPATCH_RUNBOOK_2026-09-16.md §6.2 steps 2–3: a fine-grained PAT (resource owner MIZOKI-3-5, this repo only, Pull requests read/write, Contents read, Metadata read), set with gh secret set AUTO_MERGE_PR_TOKEN (hidden input, never in chat or a file), then gh variable set AUTO_MERGE_VIA --body pr. Watch one lane landing (step 4).
  3. Activate 23473620 via job 020 APPLY=1 after the typed gate, in-session: enforcement active, strict on, the 13 contexts unchanged, bypass_actors empty, enforce on create.
  4. 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.
  5. 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.
  6. 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.
  7. 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 main with 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:

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":

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).

← All docsView source on GitHub →