Skip to content

test!: migrate test suites to LSpec (Bool-based, lazy, bounded-parallel) - #702

Open
arthurpaulino wants to merge 1 commit into
jcb/ixccfrom
ap/ixcc-lspec-migration
Open

arthurpaulino wants to merge 1 commit into
jcb/ixccfrom
ap/ixcc-lspec-migration

Conversation

@arthurpaulino

Copy link
Copy Markdown
Member

Port PR #699 (LSpec v3 migration) onto jcb/ixcc (3fee672) and pin LSpec to its merged main commit (b12338b60c87cc2d2dfeeeaa16d859100ec038c8).

Summary of Changes

  1. LSpec v3 dependency & generator migration

    • Pin LSpec in lakefile.lean / lake-manifest.json to main (b12338b6).
    • Configure moreLeanArgs := #["-Dcompiler.extract_closed=false"] on lean_lib Tests in lakefile.lean so pure test expressions inside def ... : LSpec.Spec declarations are not hoisted into module initializers.
    • Migrate Tests/Gen/{Basic,Claim,Ix,Ixon,IxonSyntax}.lean from SlimCheck / SampleableExt to LSpec.Prop (pure SplitMix64 Gen, Sampleable, Shrinkable, FormatValue), preserving jcb/ixcc's CompilePolicy / CompileClaim generators.
    • Update Tests/ProofHelpers.lean (checkOk, checkErr, checkErrAny returning LSpec.Spec).
  2. Lazy Bool-based suites & jcb/ixcc-specific suite migrations

    • Migrate all test modules across Tests/ from TestSeq / individualIO / checkIO / lspecIO to LSpec.Spec (it / itBool / prop / propWith / AssertM / lspecMain), preserving all jcb/ixcc updates (IxCK renames, CompileClaim wire vectors, ClaimPolicy Mode 2 / theorem statements, MultiStarkVerifier admissibility & decoder-parity suites, ResourceModes finding/recursive-type suites, SourceContract v5 mode API).
    • Migrate jcb/ixcc-only suites to LSpec v3:
      • Tests/Ix/CircuitMeta.lean
      • Tests/Ix/Compile/Equations.lean - Tests/Ix/Compile/WordEquations.lean
  3. Bounded-thread parallel runner, thread-safety & CI

    • Add -j N / --threads N support to Tests/Registry.lean using LSpec.runTree's shared bounded WorkerPool.
    • Add Ix.withImportLock in Ix/Common.lean (used by Ix/Meta.lean and Ix/RoleBinding/Compile.lean) to serialize Lean's process-global enableInitializersExecution + importModules / searchPathRef across worker threads.
    • Update .github/workflows/ci.yml to run primary IxTests with -j 16.

Verification

  • lake build --wfail IxTests ixon-primitives ixon-tests IxVMTests IxManualTests ffi-tests source-contract-tests formal-package-tests kernel-source-ingress: passed (zero warnings).
  • IxTests --list: 7.5s startup (zero import-time test execution).
  • IxTests -j 16: 61/61 primary suites passed (149.7s wall).
  • ffi-tests, source-contract-tests (69/69), ixon-primitives, ixon-tests, kernel-source-ingress, Scripts/CheckCiFilters.lean: all passed.
  • formal-package-tests multistark-verifier: 172/172 passed.
  • IxVMTests: ixvm-tagn (783/783) and ixvm-exploits (8/8 + 137/137) passed; ixvm-eval LSpec v3 oracles (23/23) and all 106 claim verdicts passed (pre-existing jcb/ixcc FFT pin drift untouched).

… bounded-parallel)

Port PR #699 (LSpec v3 migration) onto jcb/ixcc (3fee672) and pin LSpec to its
merged main commit (b12338b60c87cc2d2dfeeeaa16d859100ec038c8).

### Summary of Changes

1. **LSpec v3 dependency & generator migration**
   - Pin LSpec in lakefile.lean / lake-manifest.json to main (b12338b6).
   - Configure `moreLeanArgs := #["-Dcompiler.extract_closed=false"]` on `lean_lib Tests`
     in lakefile.lean so pure test expressions inside `def ... : LSpec.Spec` declarations
     are not hoisted into module initializers.
   - Migrate Tests/Gen/{Basic,Claim,Ix,Ixon,IxonSyntax}.lean from SlimCheck / SampleableExt
     to LSpec.Prop (pure SplitMix64 Gen, Sampleable, Shrinkable, FormatValue), preserving
     jcb/ixcc's CompilePolicy / CompileClaim generators.
   - Update Tests/ProofHelpers.lean (checkOk, checkErr, checkErrAny returning LSpec.Spec).

2. **Lazy Bool-based suites & jcb/ixcc-specific suite migrations**
   - Migrate all test modules across Tests/ from TestSeq / individualIO / checkIO / lspecIO
     to LSpec.Spec (it / itBool / prop / propWith / AssertM / lspecMain), preserving all
     jcb/ixcc updates (IxCK renames, CompileClaim wire vectors, ClaimPolicy Mode 2 /
     theorem statements, MultiStarkVerifier admissibility & decoder-parity suites,
     ResourceModes finding/recursive-type suites, SourceContract v5 mode API).
   - Migrate jcb/ixcc-only suites to LSpec v3:
     - Tests/Ix/CircuitMeta.lean
     - Tests/Ix/Compile/Equations.lean
     - Tests/Ix/Compile/WordEquations.lean

3. **Bounded-thread parallel runner, thread-safety & CI**
   - Add -j N / --threads N support to Tests/Registry.lean using LSpec.runTree's shared
     bounded WorkerPool.
   - Add Ix.withImportLock in Ix/Common.lean (used by Ix/Meta.lean and
     Ix/RoleBinding/Compile.lean) to serialize Lean's process-global
     enableInitializersExecution + importModules / searchPathRef across worker threads.
   - Update .github/workflows/ci.yml to run primary IxTests with `-j 16`.

### Verification
- `lake build --wfail IxTests ixon-primitives ixon-tests IxVMTests IxManualTests ffi-tests source-contract-tests formal-package-tests kernel-source-ingress`: passed (zero warnings).
- `IxTests --list`: 7.5s startup (zero import-time test execution).
- `IxTests -j 16`: 61/61 primary suites passed (149.7s wall).
- `ffi-tests`, `source-contract-tests` (69/69), `ixon-primitives`, `ixon-tests`,
  `kernel-source-ingress`, `Scripts/CheckCiFilters.lean`: all passed.
- `formal-package-tests multistark-verifier`: 172/172 passed.
- `IxVMTests`: `ixvm-tagn` (783/783) and `ixvm-exploits` (8/8 + 137/137) passed;
  `ixvm-eval` LSpec v3 oracles (23/23) and all 106 claim verdicts passed (pre-existing
  jcb/ixcc FFT pin drift untouched).
@arthurpaulino
arthurpaulino force-pushed the ap/ixcc-lspec-migration branch from 5a0c846 to 083e751 Compare December 3, 2026 11:07
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