OPER-16A
Widen agent-automerge to include operant-cron/* branches
Body
## Problem `agent-automerge.yml` in Portico (and by extension the same class of workflow in operant-studio if it exists) filters strictly on `head.ref` starting with `agent/POR-`. Any operator-authored or cron-authored PR on an `operant-cron/*` branch is silently skipped by automerge and requires a manual click to land. ## Evidence All six infrastructure PRs shipped tonight required manual `gh pr merge` because their branches were `operant-cron/*` or `operant-cron/OPER-*`: - PR #47 (OPER-6): manual merge - PR #48 (OPER-6.1): manual merge - PR #49 (OPER-7A): manual merge (+ size-override) - PR #50 (OPER-11A): manual merge (+ size-override) - PR #414 (auto-ready IGNORE self, Portico): required `--auto` flag after PR opened — this is the ticket that surfaced it Each adds ~5-15 min click-latency to your day. Multiply by tenor of infra work and the operator becomes the bottleneck. ## Success criteria 1. `agent-automerge.yml` (Portico) queues automerge for PRs whose `head.ref` starts with either `agent/POR-` OR `operant-cron/`. 2. Same widening in any equivalent workflow in `Operant-Health/operant-studio` (search for automerge/auto-merge workflow files). 3. All existing safety gates preserved: - not draft - title does not start with `[BLOCKED]` - size/XL requires `size-override` label - required checks (Lint, Typecheck, Unit Test, E2E) must be green before squash 4. `agent-auto-ready.yml` companion widening — the ready-flip workflow filters on the same `agent/POR-*` prefix. If we widen automerge without widening ready-flip, `operant-cron/*` PRs will merge from ready-state but never get flipped from draft (moot for me since I open non-drafts, but consistency matters). 5. Document the branch-name convention in the workflow file header comment so future contributors know which prefixes trigger automation. ## Suggested implementation Replace the current filter: ``` startsWith(github.event.pull_request.head.ref, 'agent/POR-') ``` with either: ``` (startsWith(head.ref, 'agent/POR-') || startsWith(head.ref, 'operant-cron/')) ``` or introduce a shared regex constant. Prefer the explicit-OR form for grep-ability. Apply the same change in `agent-auto-ready.yml`, the `find eligible agent PRs` jq filter, and any sweeper cron logic. ## Repo(s) - `Operant-Health/portico` (`.github/workflows/agent-automerge.yml`, `agent-auto-ready.yml`, sweeper cron if separate) - `Operant-Health/operant-studio` (any equivalent automerge workflow — check before assuming absence) ## Out of scope - Widening to *any* branch prefix (would let non-operator PRs auto-merge — no) - Changing required-check list (that's OPER-14A / worker-reaper territory) - Adding new labels or approval gates ## Priority 1 (removes recurring 5-15 min of operator click-latency per infra PR; unblocks true 24/7 autonomous pipeline). ## Related - PR #414 (Portico auto-ready IGNORE fix) surfaced this — it needed `gh pr merge --auto` because it fell outside the automerge filter - OPER-11A (branch-ensure at claim-time) mints `justin/<id>-*` branches for dispatched work — those match neither prefix, so this is only for cron/operator-authored infra PRs - Complements 2x-throughput plan Lever 2a and standing rule "pipeline should be moving at all times"
Attachments
Loading attachments…
Comments
Loading comments…