Skip to content

wip perf analysis - #27

Closed
StachuDotNet wants to merge 1 commit into
mainfrom
wip-perf-analysis
Closed

StachuDotNet wants to merge 1 commit into
mainfrom
wip-perf-analysis

Conversation

@StachuDotNet

Copy link
Copy Markdown
Owner

Changelog:

Area of change
- details

alternatively:

No changelog

What is the problem/goal being addressed?

What is the solution to this problem?

What are the changes here? How do they solve the problem and what other product impacts do they cause?

Please include before/after screenshots/gifs if appropriate

How are you sure this works/how was this tested?

What is the reversion plan if this fails after shipping?

Has this information been included in the comments?

StachuDotNet added a commit that referenced this pull request Jul 18, 2026
sampleArgDeep (the differential harness's arg synthesizer) ignored a generic
custom type's type ARGS: it read `Option<'a>`'s definition and sampled `'a` as
the fallback Int64, so a param typed `Option<String>` got `Some(42)` and the
whole call failed to type-check. That's ~a fifth of the known-good set stuck in
`cf` (compiled fine, unprovable) purely because the harness couldn't build a
valid input.

Fix: substituteType binds each custom type's declared params to its actual type
args before descending, so `Option<String>` samples `Some("hello")`. Depth- and
node-budget-bounded (maxSampleDepth/sampleNodeBudget) so wide nested records don't
build an arg that makes the proof crawl.

On a 389-fn sample this collapses `cf` ~77 -> ~22 and pushes proven matches up
accordingly. It also surfaces 2 real miscompiles that were never exercisable
before (task #32: first numeric field of a JSON-serialized record compiles to
garbage float bits) — which is the point: more of the tree becomes provable, and
the bugs it finds were always there.

Not free: fns whose interpreter execution is genuinely slow now hit the per-fn
timeout as harness-drop instead of failing fast at arg-synth. The sweep's per-fn
retry isolates them so they don't hang the run, but a real fix wants interpreter
cancellation (task #27).

Claude-Session: https://claude.ai/code/session_015dcGWPp734R2y8UP3Qtva1
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