wip perf analysis - #27
Closed
StachuDotNet wants to merge 1 commit into
Closed
StachuDotNet wants to merge 1 commit into
StachuDotNet wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog:
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?