Repository navigation
Program engine: attempts act as their run (credential in effects, journal as the run) - #6283
Draft
schickling-assistant wants to merge 29 commits into
Conversation
…gine-authority' into schickling/2026-11-10-program-engine-run-credential
…gine-authority' into schickling/2026-11-10-program-engine-run-credential
… person stays bound
…gine-run-credential' into schickling/2026-11-10-program-engine-run-identity
…gine-authority' into schickling/2026-11-10-program-engine-run-credential # Conflicts: # docs/st3/large-value-sites.json
…gine-run-credential' into schickling/2026-11-10-program-engine-run-identity
…gine-run-credential' into schickling/2026-11-10-program-engine-run-identity
…s that hold a bound caller to itself
…gine-host' into schickling/2026-11-10-program-engine-run-identity
…gine-run-credential' into schickling/2026-11-10-program-engine-run-identity
…gine-run-credential' into schickling/2026-11-10-program-engine-run-identity
…gine-run-credential' into schickling/2026-11-10-program-engine-run-identity
…gine-authority' into schickling/2026-11-10-program-engine-run-credential
…gine-run-credential' into schickling/2026-11-10-program-engine-run-identity
Contributor
Author
|
Review record: independent reviewer round 1 at |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
#6263 binds a request carrying a live run credential to
mission-run/RUN, but the engine (#6265) mints none. Program effects therefore still run as an unbound local person, and the journal is written with no actor (docs/st3/program-engine.md §3).Goal
The program-specific wiring of M1.4, stacked on the engine branch (#6265):
program.stepjournal claims as the run.Decisions
ProgramEngine::dispatchmintsST_RUN_CREDENTIALat the point it sendsstart, once per start or resume. It goes into the start message's env only, never intoDispatch(which derivesDebug) or the journal.The host spreads the run env last (Program engine M1.1b: run program steps on a supervised Bun host #6265), so an effect's
options.envcannot replace the credential.Lifetime is a 7-day backstop. The credential binds only while its attempt is the step's live attempt.
write_journalsets the actor to the step run's run.The idempotency keys are unchanged.
Review fixes: the credential is minted inside the lock after
ensure_host, only on the Started path (a refused, running or host-down dispatch mints nothing), and has no expiry of its own; it binds only while its attempt is the live attempt. Merged Program engine M1.1b: run program steps on a supervised Bun host #6265's tip 3ba3725.Verification
Run on the Linux build host at f9ce40b (Bun 1.3.13 on PATH), all pass:
fractal-reconciletesta_programs_effects_and_journal_act_as_its_run, with a real Bun host:ST_RUN_CREDENTIAL, which resolves to the run, step run and attempt 1 while the attempt runs;run-credential-ended);Hosted CI at the exact head is the proof; pushed with
ST_EVIDENCE_LOCAL=off.Complexity
High risk by docs/review.md: a trust boundary, since program effects gain a bound identity, and the journal claims' actor changes. Small diff in the engine.
Concerns
Until #6260 and #6263 land on main, this branch merges them, so the diff against #6265's branch includes them.
Friction & bottlenecks
Shared build host, serialized.
Follow-ups
M1.2 swaps its child-run call to
create_program_child_mission_run(#6272).References
docs/st3/program-engine.md §3; #6263, #6265, #6272.