LOCAL PIT CREWREPAIR WORKBENCH
BROWSER REPAIR BENCHReady for a repair

JavaScript repair bench

The patch passed.
Would you ship it?

Challenge a plausible fix with real inputs. See what the function returns, catch changes it makes to its arguments, and keep the failing case as a regression test.

Bring my function

Checking function execution support…

Checkout example · Recorded Gemini draft
Initial checks
4/4
With one new case
4/5

An unsafe price slipped through the passing patch.

Expected return
null
Observed return
"too-high"

How the bench checks a repair

Analyze a failure, review a replacement, then run it against the same examples. Add a case if there is a requirement the examples miss.

  1. ON-DEVICE · OPTIONAL

    Diagnose in Chrome

    Ask Nano to inspect the source and a failing example. Requires a supported browser and on-device model.

  2. CLOUD · YOUR CHOICE

    Approve the cloud request

    Inspect the exact request before asking Gemini for a patch. Its draft still needs your diff review and Apply.

  3. INDEPENDENT CHECKS

    Run the new counterexample

    Check actual returns and input changes. Challenge a passing repair with another example, then verify afresh.

Try the example without a model or account. On-device advice needs a supported model; Firebase setup may contact Google. Passing your examples leaves untested behavior unknown.

See the recorded Firebase run

Why did valid tags disappear?

The demo’s original function passed three of five checks. It returned an empty list when the expected result was ["constructor", "__proto__"].

  1. On-device · SDK reported on_device

    The hint found the filter

    Chrome pointed to if (!key || seen[key]) return false. Its explanation left the cause unresolved.

  2. Cloud · SDK reported in_cloud

    Gemini challenged the diagnosis

    After approval to share the hint, Gemini identified inherited properties on seen. The filter treated valid tags as duplicates.

  3. Browser verifier · 5/5

    The reviewed correction passed

    An authored correction used a Set and handled non-string inputs. The verifier reran the same five examples.

Watch the Firebase segment

Saved demo results. Comparing the two versions runs fresh checks in this tab and makes zero model calls.

Bring your own function · JSON counterexamples

One synchronous CommonJS export, up to eight examples. Compare its return value and check that inputs stayed unchanged. No imports, async functions or repository access. Source stays in this run unless you explicitly send a cloud request.

Checking function execution support…

Reopen a saved replay case

Choose a saved replay file or paste its JSON. Load the replay to replace the intake draft. Then open it as a new run and verify it.

Validation checks both file hashes. Open and verify the function separately.

Each example includes label, args, and either expected for a JSON return or throws for an error code such as "INVALID_SLUG".

Examples define your contract. Passing them does not prove behavior for other inputs.

Save or reopen an intake draft

The draft file contains these form values, including source and examples. Loading a file replaces only the form.

Practice with guided repair drills

OPTIONAL / LEARN THE WORKFLOW

Inspect failure opens the selected authored drill, runs its baseline checks and reads the source. Choose model advice separately.

Run the reviewed examples on every pull request

Put the downloaded function.contract.json in the repository root. Save the workflow below in .github/workflows/.

Use a repository-relative .js or .cjs path with forward slashes.

CI stops if the downloaded contract changes. After reviewing new examples, download a new contract and workflow.