Repository navigation
Mission run authority: decide every write by a run, audited by default - #6272
schickling-assistant merged 15 commits into
Conversation
…gine-run-credential' into schickling/2026-11-10-program-engine-authority-gate
…gine-run-credential' into schickling/2026-11-10-program-engine-authority-gate
…gine-run-credential' into schickling/2026-11-10-program-engine-authority-gate
…gine-run-credential' into schickling/2026-11-10-program-engine-authority-gate
… pick start or revise by predecessor; read only the authority member
…gine-run-credential' into schickling/2026-11-10-program-engine-authority-gate
…gine-run-credential' into schickling/2026-11-10-program-engine-authority-gate
…gine-run-credential' into schickling/2026-11-10-program-engine-authority-gate
…gine-run-credential' into schickling/2026-11-10-program-engine-authority-gate
…gine-run-credential' into schickling/2026-11-10-program-engine-authority-gate
|
Review record: independent reviewer round 1 at |
…-program-engine-authority-gate
|
Delta review record for head
|
Problem
A program step's effects act as
mission-run/RUN(#6263), but nothing holds that actor to the authority the mission declares (#6260). docs/st3/program-engine.md §3 (D2): the run holds its revision'sauthorityintersected with its starter's, "and nothing else".Goal
Third PR of the M1.4 run-authority stack (stacked on #6263): one decision at the store's write admission for every claim a run writes, audited by default. The next PR (stacked here) makes enforce the default.
Decisions
Chokepoint:
run_authority::admit_txruns inappend_admitted_claim_tx, beside the other actor gates. Writers that are notmission-run/*pass untouched.What a claim needs:
mission.publishedonmission/ID:publish ID.mission-run.createdand its initialrun-generation.created:start ID.revise ID.write SUBJECT.program.stepon its own step runs.Effective authority, read at write time and never copied, so a starter that loses authority takes it from its runs:
authorityof the run's current generation's revision.mission-run.created.rule.setin enforce mode) also decide each of the run's writes.Program-started children:
ChildMissionContext.started_bypluscreate_program_child_mission_runwrite the child's creation asmission-run/PARENT; the requester stays the human. The engine's child-run call (M1.2) switches to it.Mode: the daemon setting
[programs] authority = "audit" | "enforce", defaultaudithere, read at start.rule.auditedonrule/run-authority, readable withfractal rules audit run-authority. No new claim kind, no schema change.run-authority-denied.Cancel: setting another run's outcome (cancelling it) already takes a person or agent actor, so a run cannot cancel one; the docs say so instead of implying a grant.
Review fixes:
legacy_reasonreturnsrun-sender), where the gate applies.Runtime::admit_writer_txhook that the smallclaims document write calls.predecessorfield, not its free-text reason.reviseon that run's mission, notwrite, and those errors stay typed (run-authority-denied).json_extract(body,'$.authority').cancelis documented as reserved.Verification
Run on the Linux build host at the stack head 5494372 (contains this PR), all pass:
Run on the Linux build host,
cargo test -p fractal-store --lib -- run_authority run_credential declares_andcargo test -p fractal --lib -- a_program_effect_acts_as_its_run: see above.covering_and_intersection_are_exact_for_namespacesa_run_writes_only_within_its_authority_intersected_with_its_starters:custom/*is narrowed to the parent'scustom/factory/*;startfor;rule/run-authority, and an in-authority write leaves no record.writers_other_than_runs_are_untouchedHosted CI at the exact head is the proof; pushed with
ST_EVIDENCE_LOCAL=off.Complexity
High risk by docs/review.md: the first enforced declared authority (a permission change) and a new config key. Lowered by shipping audit first, and because nothing writes as a run until the engine dispatches with credentials.
Concerns
rule.auditedactor = starter) when that rule is in audit mode.Friction & bottlenecks
The shared build host is serialized across slices.
Follow-ups
create_program_child_mission_run.References
docs/st3/program-engine.md §3; #6260, #6263.