Cross-cutting concerns
Authority and fire-time authorization
- Who a fire runs as: the trigger’s creator, through the authority recorded at authoring (principal, credential, revision, frozen effect ceiling). Created agents name the creator as their creator. Audit records the trigger executor plus the initiator.
- Every fire re-checks: recorded authority (fail closed), ceiling, the live permission for the action on its target, standing. A denial is a
refusedfire, never a silent drop. - Authoring permissions:
trigger.{list,read,create,update,delete}andwebhook_endpoint.{list,read,create,delete}, seeded likescheduled_event.*(project members can create, list, read; admins all but delete; owners all). Plus the action’s own permission on its target. - Agents see only triggers and endpoints they created and the events those received or fired; edits by agents are not allowed (PATCH). An agent may bind an endpoint only to itself.
- Model decisions never grant authority (System One constraint).
Security passes
The new public ingress and prompt-injection exposure were flagged at triage. ptone’s direction (2026-11-14): no design-stage security gate; the owner decides per PR whether a specialist security pass runs, once, after code review and before the upstream compare link, and only High or Critical findings force rework. Examples so far: the CEL engine PR got a pass (two Medium cache-sizing items deferred to 3b); Stage 1 1b-1 passed; Stage 2 P1a passed; the GitHub normaliser and the queue nudge were judged not to need one. The first P8 (exec) PR is to get a pass.
Prompt-injection defences built into the design: external content is framed in a dedicated external_payload section; skills tell agents it is data; untrusted template variables need explicit opt-in and get a trailer; agent-creating and exec rules require replay-protected sources; GitHub presets default to an owner/member/collaborator sender gate and exclude bots.
Durability and retries
History and audit
Events and fires are kept 7 days and purged by the existing hourly job. scion trigger history, scion trigger event list|get [--payload] (agent-allowed reads), counters on each trigger, content-free audit records (no payload bodies), and Prometheus counters per source kind and outcome (Stage 1 PR 6, Stage 3 G7). Stage 2 adds a project Triggers web page (endpoints, rules with a render preview, events, history) and notify-on-failure (failed, refused, expired by default; a user notice to the creator, 1 h cooldown).
Experiment gating
| Experiment | Gates | Off means |
|---|---|---|
hub.triggers | trigger resources, inbox, drainer, generic webhook route, web page (alpha, default off) | routes 404; nothing paused |
hub.github_triggers (requires hub.triggers) | GitHub content-event routing | GitHub route keeps today’s 200 ignored |
hub.exec_schedules (requires hub.conduit) | exec schedules; needed for trigger exec | exec fires skipped |
hub.system_one | System One dialect use | – |
hub.message_policies | System One M1 message policies | – |
The scheduler’s move onto the shared core is not user-visible and has no flag: it must behave identically with hub.triggers off.
Hosted vs workstation hubs
- Hosted hub: endpoints are reachable from the internet; the primary deployment for Stages 2–3. Ingress only writes, and every replica runs a drainer, so any replica can receive.
- Workstation hub (
scion server start, loopback): generic endpoints work for local callers (CI on the same machine, scripts, other processes). The Stage 1 validation gate is a signedcurlto a workstation hub. - Public ingress for workstation hubs is out of scope (D6, stricter version): no relay is planned, and user-run tunnels are not a documented mode. GitHub routing on a workstation hub is not a goal of any stage.