Repository navigation
docs(st3): design for compiling data-DSL missions into programs (program engine M3) - #6308
Draft
schickling-assistant wants to merge 3 commits into
Draft
schickling-assistant wants to merge 3 commits into
schickling-assistant wants to merge 3 commits into
Conversation
…ram engine M3) Orchestrated missions: the native steps as the data DSL renders them plus one generated program step that releases them; construct mapping, release protocol, published-mission cutover and state classes, parity tiers, latency, slices, risks and open questions. Section 9 of the program engine design points to it.
- the orchestrator is not normal work for frontiers, exhaustion and the outcome - in-body constructs keep their nodes (settled-by, program gates), so dependents, frontiers and onFailure guards never dangle and parity names each difference - explicit released set: top-level declared nodes only; after-run, nested and round steps, the orchestrator and finally steps are admitted natively - capability advertised only with admission and release; compiler based on 2b - native agentless handoff figures; reserved orchestrator ID; tier-2 scenarios for frontier+finally, --after, nested, settled steps and program gates
…runs settled dependents
- settled-by and gate { program } are refused (loader and apply) on final,
nested and round steps, loop until and mission gates
- revising a native run onto the compiled revision restarts each settled step
and its transitive dependents; tier-2 scenario states the expected trace
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
Decision D6 of the program engine says the data DSL compiles into programs, so there is one execution model (R12). Milestone M3 ships that, with byte and behaviour parity for existing data-DSL missions. Before any code, the compilation, its parity proof and its slicing need a design the owner can accept. The first sketch in §9 (worker steps as child-run worker turns, gates read through the host contract) breaks
${ST_MISSION_RUN}interpolation in products and gates, splits run-scoped agents per step, and needs a graph-read and wait API the host contract does not have.Goal
A timeless design,
docs/st3/program-engine-data-dsl.md, that specifies:programsteporchestrator(a reserved ID), andorchestrated-by "orchestrator". The program releases native steps; the reconciler keeps the step lifecycle, the normal-phase transition, mission products and gates, the completion frontier, the final phase and the outcome;finallysteps, the synthetic--afterstep and nested or round steps are admitted natively), therelease/resolvedhost messages,HostContextV1.release,step:PATHjournal keys, and the admission rules (the guard, the orchestrator excluded from frontiers, exhaustion and the outcome, no carry-forward of the orchestrator, settling unreleased nodes);Effect.all),failed/terminaldependencies, gates, human gates,onFailure/finally, worker steps,uses-mission, inputs and products as Schemas, retries and timeouts, loops, declarations,--afterruns;settled-by "program"+settle), program gates over typed products (gate { program }+evaluate), approval checkpoints as asks, values into steps;§9 of the engine design now summarises this and links to it, the M3 build-plan row links to it, and
docs/st3/README.mdindexes it.Decisions
depends-onstays declared as a guard: the daemon refuses a release whose step dependencies do not hold.all-steps-exhaustedignore it, the end of the normal phase settles it (completed, or cancelled after a failure), and a cancelled orchestrator never fails a run. Only its own defect fails the run. A released step's final failure ends the normal phase as for any step, sowork retryand revision reopen runs exactly as for the native rendering.finallyandonFailurekeep their native final-phase lowering: compensation also runs on cancel, which a program cannot outlive.depends-on,timeoutand place, so dependents, frontiers andonFailureguards never dangle and keep their definition hashes. Only local,restart "never",exit_code-gated execs are settled, and only in missions that declareauthority, so the compile never changes who writes.settled-byandgate { program }exist only on released nodes; the loader andapplyrefuse them on final, nested and round steps, loopuntiland mission gates, where no orchestrator attempt can answer. Revising a native run onto the compiled revision restarts each settled step and its transitive dependents (native revision rule); the tier-2 revision scenario states that trace.orchestrated-byon every member, and the compiler (3b) is based on 2b.finally,--after, nested missions, loops, settled steps, program gates, kills and revision. A rendering-parity test checks that the compiled KDL is the native KDL plus two nodes, with each settled step's body as the one named difference.Verification
Documentation only. The construct semantics were checked against the code they cite:
StepSchema/MissionSchema/GateSchemainpackages/fractal/src/mod.ts;step_dependencies_hold,mission_completion_selectedand the normal-phase transition incrates/fractal-reconcile/src/reconcile.rs; the defaultcompletionincrates/fractal-missions-base/src/mission.rs; themission_program=1capability refusal in M1.1a (#6264);program.ts(step,ask,run,Worker) from #6266; and the loader in #6304. No build or test was run. Hosted CI at the exact head is the proof for the release note and the docs.Complexity
One new 448-line document, a 24-line rewrite of §9 and the build-plan row, a two-line index entry and a release note. The planned implementation is ten stacked slices of about 150–350 lines each (see "Slices" in the document).
Concerns
uses-mission,finally). Merge it only with the owner's answer to Q1.failed/terminaldependencies under the first-failure rule, frontiers,--after, nested missions, loops, reopen). The tier-2 lane validates the oracle, and a mismatch blocks the cutover.fractalpackage upgrade revises every compiled mission once (Q4).Friction & bottlenecks
afterhandles,onFailure,Fractal.sequence) is not yet inpackages/fractal, which hasdependsOnwithcompleted/failed/terminalandfinally. The mapping covers both forms.reconcile.rs. The oracle in slice 3a is the place to write them down once.Follow-ups
References
docs/st3/program-engine.md(docs: accepted program engine design and build plan #6253); stack: Mission run authority: parse, render and store the authority block #6260, Program engine M1.1a: declare program steps and carry their bundles through apply #6264, Program engine M1.1b: run program steps on a supervised Bun host #6265, Program engine M1.2: linked child runs and person asks for program steps #6277, Mission run authority: bind run credentials to mission-run/RUN #6263, Mission run authority: decide every write by a run, audited by default #6272, Mission run authority: enforce by default #6273, Program engine: attempts act as their run (credential in effects, journal as the run) #6283, Show program step journals in missions show and waiting-on #6261, Show program step journals and faults in the run view #6262, Raise program/stalled and program/host faults on program steps #6297; program API fractal: program missions on effect/workflow (fractal/effect) #6266; loader fractal: bundle and render program missions in the tree loader #6304.docs/st3/mission-graph-runtime.md(runtime sequence, gates, dependencies, reopen and revision rules).