Framing: a solo developer's workflow (2026-11). The example CI is Codemagic; the method is CI-agnostic. No tokens, webhook URLs or build IDs appear here.
Situation
- Audience: builds take tens of minutes (especially iOS on a remote Mac), and you don't want agents polling or build-complete webhooks and secrets in repo config.
- When to use: CI is manual-start — no push trigger — so someone has to remember "a build is running".
- When not to use: builds finish in minutes, or your CI's built-in notifications suffice.
Steps
- Document the trigger per pipeline in
docs/CI_PIPELINE.md(docs-as-source-of-truth-handover). Both of this developer's iOS projects are manual-start with no trigger in config. - Keep the monitor read-only: only the CI's read-only API; it never starts or cancels builds. The token lives in the monitor's own secure config; docs, chat and repos carry only the header name.
- Register and notify the moment a build starts: fixed format
App / workflow / branch / build id (or URL). The monitor doesn't poll on a timer; no notice, no watching. - Results follow one loop: monitor → relay coordinator → your coordinator, which writes the result to the build log table and the tracking item. Parallel notices to other roles don't replace it.
- One row per build: date, app, workflow, branch, build id/URL, result (pass/fail, failing step, duration, whether anything was submitted to the store).
- Human gate: moving from a simulator build to a signed/test-distribution build is started by a human; neither monitor nor coordinator triggers it.
Templates
Handoff message and build log table: see the Chinese section's code blocks. In pipeline.yaml this is a code wait stage (input: log row; output: read-only status) with notification target and retry cap; the monitor must have no write permission.
Cost (order of magnitude, estimate)
- Read-only queries cost few tokens; the real cost is CI build minutes (remote-Mac minutes usually dominate) and your waiting time. Log repeat-build counts in the ROI input table.
- Data points: two simulator builds took about 46 and 13 minutes (2026-11-23, different apps) — single observations, not averages.
Failure cases and guards
"Occurred" items are recorded; "guard" items are rules written into the protocol, not incidents.
- Webhook and secrets in the repo (occurred): one repo had a build-complete webhook; it was removed in favor of on-demand read-only queries.
- Assuming a push builds (guard): no trigger → nobody starts or watches it.
- Notifying only a side channel (guard, not an incident): even if the app's dev role is also notified, that does not replace reporting through the relay, or the coordinator's tracking item goes stale.
- Monitor unreachable (occurred): don't improvise; hand off through the relay coordinator.
- Asking the monitor for a token (guard): don't; permission changes are made by a human in the CI console.
China alternatives
china_availability: yes: no foreign model required. CI can be GitHub Actions, Gitee Go, Yunxiao, etc., as long as a read-only status endpoint exists. The monitor can be an on-demand script instead of an agent.- If your CI is hosted abroad, check reachability yourself; no circumvention advice here.
Safety notes
- Monitor credentials must be read-only scope.
- Don't put artifact download links, signing details or account info in the log table.
- Handoff messages carry only app / workflow / branch / build id.
Test notes
- 2026-11-23: one manual
ios-simulatorbuild per app completed through "register → notify → read-only monitor → report → write back" (success; about 46 and 13 minutes). The monitor was confirmed read-only for three apps. No test-distribution build was submitted. - Tool versions: hosted CI (unversioned) and its REST API.
Verification
- Start a build: a log row exists, the relay coordinator received the result, your coordinator wrote it to the tracking item.
rg -i "webhook|x-auth-token|token" .should only hit names.