|
| 1 | +---- MODULE EvalHostPreparation ---- |
| 2 | +\* Source: coding-side.mts preparation loop and verifyHostBuildOutputs file checks. |
| 3 | +\* Sink: the first createHostRuntime launch in the prepared worktree. |
| 4 | +\* Failure: a successful workspace build can leave the extension entry missing. |
| 5 | +\* Invariant: LaunchRequiresBuildOutputs forbids launch with incomplete outputs. |
| 6 | +\* Expect: the old flow and NoCheckOutputs fail. A preflight guard holds. |
| 7 | +\* Stance: the missing bundle command was found before this invariant was written. |
| 8 | +\* Scope: build success and filesystem inspection are oracles, not build implementations. |
| 9 | +\* Inputs name the availability of the extension, webview script, and webview styles. |
| 10 | +\* Property tests: host-build.test.ts and coding-side.test.ts. |
| 11 | +\* Review: 0 covered, 0 added, 0 gap. No review findings received. |
| 12 | +\* Result: the guarded model passes in 17 states. NoCheckOutputs violates the invariant. |
| 13 | +\* Replay: the old CLI fails locally because src/dist/extension.js is missing after pnpm build. |
| 14 | +\* Replay: removing the output guard or restoring the old build command fails the code tests. |
| 15 | +\* Property: all 64 file-kind combinations accept only three nonempty regular outputs. |
| 16 | +\* Property: the CLI rejects incomplete builds and retains fixed readiness diagnostics. |
| 17 | +\* Findings: the model reproduces the known build fault. No additional bug or false alarm was found. |
| 18 | +\* Gate: 423 evaluation tests, the evaluation type check, and applicable lint checks pass. |
| 19 | +\* Live replay: the fixed CLI grades all five fixtures correct in containers, one attempt each. |
| 20 | +\* The local replay evaluates the approved extension commit with the updated runner. |
| 21 | +\* This is not the default 15-attempt CI run or evidence of statistical significance. |
| 22 | +\* Cost: about 16 agent minutes shared with EvalWorkflow, including both live runs. |
| 23 | +\* Run: TLA_JAR=<jar> docs/architecture/tla/check.sh EvalHostPreparation. |
| 24 | +\* A model check covers this model. It does not prove the implementation correct. |
| 25 | +\* Refactor: one ordered preparation loop retains separate bounded child processes. |
| 26 | +\* Expect: LaunchRequiresBuildOutputs and its removed-guard control keep their results. |
| 27 | +\* Command ordering and child environments remain code properties outside this output model. |
| 28 | +\* Refactor result: the base still passes in 17 states. NoCheckOutputs still fails its invariant. |
| 29 | +\* Code tests retain command order, preparation isolation, interruption, and incomplete-build checks. |
| 30 | +\* Replay: skipping output verification in the preparation loop fails the incomplete-build CLI tests. |
| 31 | +\* Findings: no new model defect was found. Cost is shared with the EvalWorkflow refactor. |
| 32 | +EXTENDS Naturals |
| 33 | +CONSTANTS Outputs, CheckOutputs |
| 34 | +VARIABLES outputs, stage |
| 35 | +vars == <<outputs, stage>> |
| 36 | +Complete == outputs.extension /\ outputs.webviewScript /\ outputs.webviewStyles |
| 37 | +Init == /\ outputs \in Outputs |
| 38 | + /\ stage = "built" |
| 39 | +Verify == /\ stage = "built" |
| 40 | + /\ stage' = IF ~CheckOutputs \/ Complete THEN "ready" ELSE "rejected" |
| 41 | + /\ UNCHANGED outputs |
| 42 | +Launch == /\ stage = "ready" |
| 43 | + /\ stage' = "launched" |
| 44 | + /\ UNCHANGED outputs |
| 45 | +Next == Verify \/ Launch |
| 46 | +Spec == Init /\ [][Next]_vars |
| 47 | +LaunchRequiresBuildOutputs == stage = "launched" => Complete |
| 48 | +==== |
0 commit comments