refactor(workflow): stop assuming a human decides

An approval, ask or park can be resolved by an operator, a rule, a
classifier or automatically, so the vocabulary stops naming a person:

- step type human.approve -> workflow.approve
- park class needs_human -> needs_decision (ParkNeedsDecision)
- event kinds human_* -> operator_*
- alert kind task.needs_human -> task.needs_decision
- status grouping "needs you" -> "needs attention"

0061 rewrites the stored values, including the approval step type in the
workflow-definitions resource and each task's pinned definition, with the
digest recomputed so resumed tasks still match.
This commit is contained in:
sam committed 2026-10-25 17:31:16 +11:00
1 parent fc609171ca
commit f2b8681611
76 files changed
+373 -329

No files matched your search

+1 -2
View File
@@ -18,8 +18,7 @@ Archie Core uses the GitHub API to:
2. Update issue labels as tasks transition (`archie:working`, `archie:pr`,
`archie:parked`).
3. Post status comments and emoji reactions.
4. Create branches, commit code changes, and open Pull Requests for human
review.
4. Create branches, commit code changes, and open Pull Requests for review.
---
+1 -1
View File
@@ -55,7 +55,7 @@ Save. The binding starts in **draft** -- nothing fires yet.
## 5. Approve it
A **draft** or freshly-**edited** binding needs an explicit human approval
A **draft** or freshly-**edited** binding needs explicit approval
before it can ever match a live event -- this is deliberate, not a missing step:
an operator authoring a binding is a considered act, an event arriving is not,
and nothing should self-arm. Click **Approve**. Status becomes **armed**.
+2 -2
View File
@@ -158,7 +158,7 @@ phase differ.
- **Authorisation.** Opening a session is the `update` action on the secret,
decided by the dashboard's authorizer before the route runs
(`internal/webui/authorize.go`). The dashboard then dials the daemon with the
harness service token. The daemon does not re-authorise a human; it trusts the
harness service token. The daemon does not re-authorise an operator; it trusts the
asserted `{org, profile}` exactly as the task-action RPC trusts an asserted
actor. Because that authority is a shell in a container holding an org's
credential, the harness listener requires `HARNESS_TOKEN` even on loopback,
@@ -223,7 +223,7 @@ phase differ.
gate it, and that authority is not wired for it: the harness listener has no
approval step; `ToolSetOptions.Approval` in `internal/agentexec/modelloop`
is never set by a caller, so task runs never build approval-required tools;
approvals reach a human only on the chat paths (dashboard ask, Telegram,
approvals reach an operator only on the chat paths (dashboard ask, Telegram,
Gateway). Takeover would also need an audit record naming the actor, task,
attempt and open/close times, and revocation tied to task end (the exec is
closed with the container). Those follow the setup session's shape
+1 -1
View File
@@ -81,7 +81,7 @@ accounts by unverified email, or create an administrator.
| Incoming webhooks: `forge/webhook`, `captureintake`, access delivery engine | Verify HMAC before parsing; derive source/org from stored source; evaluate source delivery policies and egress rules. No browser-user credential is inferred. | Webhook/capture tests, `TestAuthorizeDelivery` |
| Control-plane configuration, secrets, harness and extensions | Browser policy and instance-only restrictions where registered; service contracts carry principal/org; task grants cannot invoke administrative RPCs. | HTTP deny matrix, `TestAdministrationRoutes`, `TestChannelReloadRoute`, `TestConfineHarnessOrg` |
| Live HTTP/SSE and diagnostics | Authenticated policy gate applies before stream creation; org-scoped event reads; instance logs require administrative visibility. | HTTP deny matrix, instance-only tests, `TestServiceLogsRequireInstanceCredential` |
| Background schedules, dispatch, curation | Service/agent authority, not an implicit browser user. Task-scoped grants and org scopes remain distinct from initiating human attribution. | Existing dispatch, grant, memory and org-scope tests |
| Background schedules, dispatch, curation | Service/agent authority, not an implicit browser user. Task-scoped grants and org scopes remain distinct from initiating operator attribution. | Existing dispatch, grant, memory and org-scope tests |
The policy HTTP matrix enumerates each registered protected route. It checks
both anonymous refusal and refusal by an explicit Cedar forbid, using the real