Skip to content

Speed up the test suite - #209

Merged
julia-script merged 12 commits into
mainfrom
julia/test-suite-perf-ff6c61
Aug 16, 2026
Merged

Speed up the test suite#209
julia-script merged 12 commits into
mainfrom
julia/test-suite-perf-ff6c61

Conversation

@julia-script

Copy link
Copy Markdown
Owner

Summary

Implements the archived openspec change speed-up-test-suite (spikes → proposal → apply, measured end to end).

  • Compiler suite test CPU 1,673s → 1,174s (−30%), wall 184s → 134s, same machine and contention; solo files: LexerPressure 143→39s, StackVmPressure 82→30s, SynchronousEffectCost 41→10s
  • Fresh-process determinism consolidated into 3 canary gates (Scanner, ConditionalConformance, StoredCallable); 19 per-feature determinism files deleted, protected by 8 new committed-golden pins and verified with two mutation checks
  • ~150 exit-parity native legs removed across 48 files; 19 representative programs folded into the DriverNativeAcceptance differential corpus (now UTF-8, includes non-42 exits and traps)
  • Pressure failure-ordinal sweeps run native at boundary ordinals only; evaluator+wasm carry every ordinal
  • SILK_NATIVE_CACHE_DIR is now actually consumed by the default artifact cache (clang version added to the key); CI persists .turbo and the native cache; .claude/worktrees/* share the main checkout's turbo cache
  • AGENTS.md gains a "Keep tests cheap" section so AI-written tests stop regrowing the waste
  • Spec deltas synced to main specs for bootstrap-compiler-driver (17 requirements), bootstrap-language-pressure-programs, bootstrap-native-toolchain

Full numbers and follow-ups: openspec/changes/archive/2026-08-15-speed-up-test-suite/results.md.

Notes

  • The one failing test on this branch (WasmShadowStackHeapCollision host-stack control) fails identically on main and is tracked separately.
  • Mutation spot-checks recorded in the archived change: a Mir.encode perturbation fails the new golden pins; a hash-mixing perturbation fails the retained iteration-order digests.

CI persists .turbo and the native artifact cache across runs; worktrees
under .claude/worktrees share the main checkout's turbo cache; AGENTS.md
gains the Keep-tests-cheap rules. Plans and baseline for the
speed-up-test-suite change included.
…ache

The env var was set by vitest config and consumed by nothing. The default
cache now returns the durable disk cache when it is set, and the cache key
includes the probed clang version so a toolchain upgrade at the same path
cannot serve stale artifacts.
SynchronousEffectCost runs its fixture once — fresh-process determinism is
the canary gates' job — and OccurrencePerformance's wall-clock speedup
ratio leaves the correctness suite.
The evaluator and Wasm carry every failure ordinal; native release
pipelines run at first-failure, mid-growth, and completion only.
LexerPressure 143s -> 39s, StackVmPressure 82s -> 30s.
Six cases whose claims are already proven by DeclarationIndex,
Analysis, and IntrinsicCatalog tests; also the Driver nested-program
differential that duplicates the corpus gate.
Committed goldens are cross-process determinism evidence by construction.
Eight pins cover the encoding classes whose only byte-level evidence lived
in per-feature determinism files.
Delete 19 per-feature determinism files and their fixtures. Fresh-process
byte-identity is proven by ScannerDeterminism (stdlib, both release
backends), ConditionalConformanceDeterminism (generics, conformance memo),
and StoredCallableDeterminism (callable environments, native execution);
per-feature evidence stays as committed-golden comparisons in-process.
HashedCollectionDeterminism keeps its seeded iteration-order digests (the
repo's only hash-order golden). Mutation checks: a Mir.encode perturbation
fails the new golden pins, a hash-mixing perturbation fails the digests.
Exit-parity native legs leave 29 feature files; representative programs
join the differential corpus (14 entries incl. non-42 exits and a trap),
which with DriverNativeAcceptance is the single native-agreement gate.
Corpus consumers now encode UTF-8 so non-ASCII programs survive.
Only four full-message literals existed; interpolated-provenance message
assertions stay. documentation:check verified to fail on wording drift.
Exit-parity native legs leave 19 more feature files; suspension keeps its
bounded-stack and IR-protocol native tests. Five representative programs
join the differential corpus, including non-42 failure exits.
@cursor

cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@julia-script
julia-script merged commit 2744937 into main Aug 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant