Skip to content

feat(benchmark): loop-closure harness, case format, first 2 cases (#66) - #87

Merged
jyotir-aditya merged 1 commit into
mainfrom
feat/loop-closure-benchmark
Jul 11, 2026
Merged

jyotir-aditya merged 1 commit into
mainfrom
feat/loop-closure-benchmark

Conversation

@jyotir-aditya

Copy link
Copy Markdown
Contributor

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 loops verfix run --base-url ... --output json → agent adapter → re-run, up to max_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 nonzero
  • oracle — applies the case's known fix from its fixed/ overlay; must score 100% (proves cases are solvable) or exits nonzero
  • any other value — a shell command run with the workspace as cwd and the failure JSON on stdin: the real measurement, agent-agnostic

The null/oracle pair is the self-test that keeps cases from rotting.

Cases: drifted-selector (renamed data-testid, config-scope fix) and occluding-modal (full-viewport dialog blocks a correct click; the first run must carry a blocking_overlay finding — the benchmark validates the findings contract as a side effect).

Recorded per case: closed, iterations, whether the first run reported the expected failure_type and findings code, 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 modes
  • Invariant-violation path exercised: an adapter that swapped in a trivially-true assertion made the flow pass but the case correctly reported not-closed
  • cd cli && npm test unaffected; only benchmark/ + a root bench script added

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).
@jyotir-aditya
jyotir-aditya merged commit d47c632 into main Jul 11, 2026
2 checks passed
@jyotir-aditya
jyotir-aditya deleted the feat/loop-closure-benchmark branch July 11, 2026 08:35
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