Repository navigation
feat(benchmark): loop-closure harness, case format, first 2 cases (#66) - #87
Merged
Merged
Conversation
Adds the product metric harness from issue #66: a zero-dependency Node runner that drives a coding agent against deliberately-broken tiny apps using only Verfix's JSON output as the failure signal, then checks whether the loop closes (and in how many iterations). Ships the null/oracle self-test adapters and the first 2 cases spanning the failure taxonomy (drifted-selector, occluding-modal).
This was referenced Jul 11, 2026
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.
Slice 1 of #66 — the harness, the case format, the null/oracle self-test pair, and the first 2 cases. Remaining 6 cases and results/CI reporting follow in separate PRs.
What this adds
benchmark/run.js(zero-dependency Node): copies a case to a fresh temp workspace, starts its broken app on a free port, and loopsverfix run --base-url ... --output json→ agent adapter → re-run, up tomax_iterations. A case counts as closed only when the flow passes AND the case's anti-cheat invariants hold (assertions not deleted/weakened; config-scope cases can't be closed by editing app source).Adapters:
null— does nothing; must score 0% (proves cases genuinely fail) or the harness exits nonzerooracle— applies the case's known fix from itsfixed/overlay; must score 100% (proves cases are solvable) or exits nonzeroThe null/oracle pair is the self-test that keeps cases from rotting.
Cases:
drifted-selector(renamed data-testid, config-scope fix) andoccluding-modal(full-viewport dialog blocks a correct click; the first run must carry ablocking_overlayfinding — the benchmark validates the findings contract as a side effect).Recorded per case: closed, iterations, whether the first run reported the expected
failure_typeandfindingscode, invariants outcome; aggregate closure_rate + mean_iterations as JSON (--out) plus a human table on stderr.Verification
node benchmark/run.js --agent oracle→ 2/2 closed in 2 iterations each, exit 0 (run twice independently)--agent null→ 0/2 closed, exit 0; inverse proofs exercised for both self-test failure modescd cli && npm testunaffected; onlybenchmark/+ a rootbenchscript added