fabro/lib/foundation
Brandon McNama 465cc66283
feat(approvals): auto-approve child starts by parent workflow policy
A workflow agent that spawns child runs forces every dispatch through an
operator checkpoint, even for dispatcher workflows whose whole purpose is
unattended fan-out. The only workaround today is out-of-band approval
hooks that poll the runs API and click approve from the host, which needs
a server token inside the worker host and leaves the decision recorded
nowhere near the run it approved.

Give the platform a first-class policy path instead: a child start is
auto-approved only when the server enables
`[server.approvals] allow_child_auto_approval` and the spawning parent's
registered `workflow.toml` opts in with `[run.children] auto_approve`.
Both defaults stay false, so nothing changes for existing workflows.

The decision is read from the parent's persisted spec at start time, so a
config reload affects future starts only, reassigning a run's parent link
cannot change the policy, and `RunIntentArgs.auto_approve` keeps its
existing meaning (the child's own agent-interaction posture) without ever
bypassing the lifecycle checkpoint. A worker start outside its own
parentage fails closed to the operator gate.

Auto-approved children record a distinct `auto_approved` lifecycle
transition and project `approval.state = approved` with a decision
timestamp in one pass, so lifecycle history is auditable and no transient
pending state is ever observed.

Note: this commit depends on lithoscomputer/petri accepting the
platform-only `[run.children]` workflow.toml section; the Cargo.lock bump
to the merged rev lands with that PR.
2026-10-15 15:27:59 -04:00
..
build-support refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-api feat(approvals): auto-approve child starts by parent workflow policy 2026-10-15 15:27:59 -04:00
fabro-auth Scope run model clients with session headers 2026-10-14 12:44:52 -04:00
fabro-client Merge pull request #788 from chunga-ict/fix/schema-mismatch-error-message 2026-10-07 16:33:03 -04:00
fabro-config feat(approvals): auto-approve child starts by parent workflow policy 2026-10-15 15:27:59 -04:00
fabro-db Drop the run_events table and narrow the runs row 2026-09-18 14:37:18 -04:00
fabro-dev Fix the Mintlify docs deployment 2026-09-28 17:26:49 -04:00
fabro-http Depend on lithos-llm and the published twin-openai crate 2026-09-09 17:26:57 -06:00
fabro-macros refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-oauth refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-options-metadata refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-proc Simplify the store-fault handling 2026-10-06 16:07:36 -04:00
fabro-redact Use pebble's sandbox-driver adapter and delete fabro-pebble-sandbox 2026-09-21 17:42:15 -04:00
fabro-static refactor: tidy the in-process sandbox provider wiring 2026-09-25 11:29:29 -04:00
fabro-telemetry refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-template Read workflow graphs through Petri's DOT parser 2026-09-19 12:23:57 -04:00
fabro-test fix: address review of the in-process sandbox providers 2026-09-25 12:31:37 -04:00
fabro-types feat(approvals): auto-approve child starts by parent workflow policy 2026-10-15 15:27:59 -04:00
fabro-util Resume a Petri run whose store failed, as after a crash 2026-10-06 12:29:34 -04:00
fabro-vault refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00