From ba8a55ac70333d1b1714fc21e6d67cebd7020ca5 Mon Sep 17 00:00:00 2001 From: Alexey Martemyanov Date: Thu, 14 May 2026 14:22:36 +0600 Subject: [PATCH] [2026-05-14] gha-ci-executor: fix Peekaboo/TCC assessment, add task tagging contract, scope guardrails, orchestrator link --- work/plans/gha-ci-executor.md | 57 +++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 3 deletions(-) diff --git a/work/plans/gha-ci-executor.md b/work/plans/gha-ci-executor.md index 331e1879..ac985d50 100644 --- a/work/plans/gha-ci-executor.md +++ b/work/plans/gha-ci-executor.md @@ -9,6 +9,7 @@ - **Asana task: MM Bots**: https://app.asana.com/1/137249556945/project/908478224964033/task/1214799615211686 - **Mattermost Migration Plan**: [[mattermost-migration]] - **Executor Orchestrator Redesign**: [[executor-orchestrator-redesign]] +- **Executor Orchestrator Redesign**: [[executor-orchestrator-redesign]] --- @@ -272,9 +273,21 @@ Sentry webhook --- -## Peekaboo on GHA — Constraint +## Peekaboo on GHA — Revised Assessment -GHA hosted runners run with **SIP enabled** — `tccutil insert` for Screen Recording / Accessibility doesn't work. +Earlier assessment ("SIP blocks TCC") was incorrect. Actual situation: + +- GHA runner user has `sudo` access +- SIP protects system files (`/System`, `/usr`) — NOT user-level `TCC.db` +- `TCC.db` is at `~/Library/Application Support/com.apple.TCC/TCC.db` +- Can be modified via `sqlite3` with sudo → grants Screen Recording + Accessibility +- This is a standard CI pattern for screenshot testing + +Xcode automation already works on GHA (AppleScript/XCUITest) — same TCC layer. + +**Revised conclusion: Peekaboo on GHA hosted runner is likely viable.** Needs validation in Phase 1. + +Fallback if sqlite3 approach fails: ddg-vm via SSH from GHA job (existing infra, confirmed working). **Solution for visual reproduction:** @@ -360,7 +373,45 @@ No Prefect needed — this path is synchronous and triggered by humans. --- -## Phased Implementation +## Task Intake & Scope Control + +### Asana Tagging Contract + +Only tasks explicitly tagged for automation enter the pipeline. The agent never self-selects tasks. + +| Tag | Meaning | +|---|---| +| `executor:ready` | Task approved for autonomous execution — analyst reviews and tags this | +| `executor:analyze` | Analysis Agent runs, generates prompt, but does NOT dispatch GHA — output goes to Asana comment for human review | +| `executor:hold` | Task in queue, blocked (dependency, unclear scope) | + +Workflow: +1. Alex (or designated reviewer) tags task `executor:ready` in Asana +2. Prefect polls Asana for tasks with this tag (every N min, or webhook) +3. Tag is removed / replaced with `executor:in-progress` once dispatched +4. No tag = not touched, ever + +### Scope Guardrails (Eagle auto-approval layer) + +From [[executor-orchestrator-redesign]]: Eagle monitors `#executor` channel using message protocol. +GHA workers use same `[REQUEST:]` / `[ESCALATE:]` protocol — Eagle is the gatekeeper regardless of where the worker runs. + +``` +Asana task tagged executor:ready + → Prefect: run_analysis_agent() + → Prefect: dispatch_gha() + → GHA worker posts [STATUS:] / [REQUEST:] to MM #executor-queue + → Eagle monitoring cron (2 min) reads channel + → Auto-approve safe actions, escalate ambiguous to Alex + → Worker proceeds only after approval +``` + +Auto-approval rules (same as orchestrator redesign): +- `create_worktree`, `run_build`, `run_tests`, `open_draft_pr`, `push_branch` → ✅ silent approve +- `post_asana_comment`, any scope expansion → ⚠️ escalate to Alex +- `merge_pr` → ❌ always escalate + + ### Phase 1: GHA Validation (1-2 days) - [ ] Create `executor-worker.yml` in apple-browsers repo