Skip to content

feat(chapel): per-prover cwd + filenameOverride hooks (closes #158, closes #159)#164

Merged
hyperpolymath merged 1 commit into
mainfrom
wave3/158-159-prover-cwd-filename-hooks
May 30, 2026
Merged

feat(chapel): per-prover cwd + filenameOverride hooks (closes #158, closes #159)#164
hyperpolymath merged 1 commit into
mainfrom
wave3/158-159-prover-cwd-filename-hooks

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

  • ProverInfo gains two optional fields (cwd, filenameOverride) with empty-string defaults; preserves prior contract for the 28 unaffected provers.
  • Agda + Idris2 registry entries set both, paired with a new agda_trivial.agda fixture and a refreshed idris2_trivial.idr (already correctly shaped).
  • tryProver shell-wraps the spawn when cwd is set (sh -c \"cd <cwd> && exec ...\") for coforall-safety; filenameOverride swaps the generic basename when set.
  • Justfile bench-chapel-mrr derives IDRIS2_PREFIX from which idris2 — the recipe is now self-contained, no parent-shell ceremony.

Result

just bench-chapel-mrr (single-run, full table in updated baseline doc):

fixture strategy wallclock winning prover
idris2_trivial sequential 1.970 Idris2
idris2_trivial parallel_bestof 1.037 Idris2
idris2_trivial parallel_speculative 1.032 Idris2
agda_trivial sequential 0.101 Agda
agda_trivial parallel_bestof 0.751 Agda
agda_trivial parallel_speculative 0.450 Agda

Both acceptance criteria (Idris2 success in ≥1 strategy, Agda fixture round-trip) satisfied across all three strategies.

Wave-1 baseline caveats resolved

  • Caveat 1 (Idris2 prelude resolution): closed via cwd hook + IDRIS2_PREFIX derivation
  • Caveat 2 (Agda module-name lexer): closed via filenameOverride + fixture pairing
  • Caveat 3 (sub-second wall-clock jitter): out of scope (chapel: real-corpus speedup bench (10-30s prover invocations) #161 will use 10-30s prover invocations where jitter is negligible)

Test plan

  • just chapel-build — green (only known main()-in-library-mode warning)
  • just chapel-smokeparallel-CAS winner: 3 (expected 3)
  • just bench-chapel-mrr — Idris2 + Agda → true across all 3 strategies
  • 28 non-overriding provers unchanged (default args fill new fields)
  • Commit GPG-signed

ADR: docs/decisions/2026-05-31-chapel-prover-spawn-hooks.md covers mechanism + alternatives considered (env-extra list, regex extraction, function-pointer callback, native Chapel cwd param).

🤖 Generated with Claude Code

…uccess in bench (closes #158, closes #159)

Wave-1 MRR baseline (docs/bench/2026-05-30-chapel-mrr-baseline.md)
caveats 1 + 2: Idris2 and Agda fixtures failed across all three
strategies because tryProver's uniform spawn contract (parent CWD,
generic `goal_<name>_<nodeId>.<ext>` basename) violates each prover's
module-name + source-directory constraints.

ProverInfo gains two optional fields with empty-string defaults that
preserve the prior contract for the 28 unaffected provers:

  - cwd: shell-wrapped `sh -c "cd <cwd> && exec ..."` to be coforall-
    safe (process-global chdir would race against parallel spawn calls).
  - filenameOverride: literal basename for provers that enforce
    module-name = filename.

Registry: Agda gets cwd=/tmp/echidna-chapel + filenameOverride=
"Trivial.agda" (matches new fixture's `module Trivial where`); Idris2
gets cwd + filenameOverride="Trivial.idr" (existing fixture already
declares `module Trivial`). Justfile bench-chapel-mrr derives
IDRIS2_PREFIX from `which idris2` so the recipe is self-contained.

Verified: `just bench-chapel-mrr` shows agda_trivial → true and
idris2_trivial → true across sequential/best-of/speculative
(0.101-1.970s, full results updated in the baseline doc).

ADR: docs/decisions/2026-05-31-chapel-prover-spawn-hooks.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyperpolymath hyperpolymath enabled auto-merge (squash) May 30, 2026 23:11
@hyperpolymath hyperpolymath merged commit a2aeb6a into main May 30, 2026
10 of 40 checks passed
@hyperpolymath hyperpolymath deleted the wave3/158-159-prover-cwd-filename-hooks branch May 30, 2026 23:13
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