Skip to content

Commit c572646

Browse files
committed
fix(evals): build extension before evaluation and share result validation
1 parent fb6eaab commit c572646

22 files changed

Lines changed: 532 additions & 116 deletions

‎.github/workflows/agent-evals.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Coding task evaluations
44
# Trust boundaries: docs/architecture/tla/EvalWorkflow.tla.
55
on:
66
workflow_dispatch:
7-
# Temporary live validation before merge. Remove this trigger before merging.
7+
# Keep until the fixed workflow passes its full 15-attempt CI run.
88
push:
99
branches: [issue/2085]
1010

@@ -17,7 +17,7 @@ concurrency:
1717

1818
jobs:
1919
evaluate:
20-
# Remove the branch exception after the approved validation run.
20+
# Remove the branch exception after CI validation and before merge.
2121
if: (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') || (github.event_name == 'push' && github.ref == 'refs/heads/issue/2085')
2222
runs-on: ubuntu-24.04
2323
timeout-minutes: 120
@@ -67,14 +67,14 @@ jobs:
6767
test "$(git rev-parse HEAD)" = "$CANDIDATE_SHA"
6868
test -z "$(git status --porcelain --untracked-files=all)"
6969
xvfb-run -a -s "-screen 0 1280x720x24 -nolisten tcp" \
70-
pnpm coding-evals:side --reps 3 --trust-file "$TRUST_FILE" --out "$EVAL_OUT"
70+
pnpm coding-evals:side --trust-file "$TRUST_FILE" --out "$EVAL_OUT"
7171
7272
- name: Write candidate summary
7373
if: ${{ !cancelled() && (steps.candidate.outcome == 'success' || steps.candidate.outcome == 'failure') }}
7474
env:
7575
CANDIDATE_SHA: ${{ github.sha }}
7676
EVAL_OUT: ${{ runner.temp }}/agent-evals
77-
run: bash scripts/agent-evals-summary.sh
77+
run: node --import tsx scripts/agent-evals/coding-summary.mts
7878

7979
- name: Upload candidate results and traces
8080
if: ${{ !cancelled() && (steps.candidate.outcome == 'success' || steps.candidate.outcome == 'failure') }}

‎docs/architecture/tla/EvalHostPreparation.NoCheckOutputs.cfg‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎docs/architecture/tla/EvalHostPreparation.cfg‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
====
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---- MODULE EvalHostPreparationMC ----
2+
\* One prepared tree has three required build outputs.
3+
EXTENDS EvalHostPreparation
4+
Enabled == TRUE
5+
Disabled == FALSE
6+
MCOutputs == [extension : BOOLEAN, webviewScript : BOOLEAN, webviewStyles : BOOLEAN]
7+
====

‎docs/architecture/tla/EvalWorkflow.NoApproval.cfg‎

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎docs/architecture/tla/EvalWorkflow.NoCandidate.cfg‎

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎docs/architecture/tla/EvalWorkflow.NoHead.cfg‎

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎docs/architecture/tla/EvalWorkflow.NoInfrastructure.cfg‎

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎docs/architecture/tla/EvalWorkflow.NoReport.cfg‎

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)