Skip to content

M1.2 — Build the bug-hunting session: explore → certify → verify, under budget #2

Description

@GiggleLiu

Background

New here? Read #9 first — it explains the project and defines every term below.

A "reduction rule" translates one problem into another and back: reduce_to turns problem A into problem B, and extract_solution turns a solution of B back into a solution of A. A rule is correct only if the round trip works — reduce A to B, solve B, translate the answer back, and get a valid (or optimal) solution to A. A bug is any case where that fails. In this benchmark the AI hunts for such cases. It is free to explore the whole library and pick which rule to attack — there is no fixed checklist (finding the weak spot is part of the skill we measure). When it believes it found a bug, it writes a counterexample certificate (a plain-JSON description of the bug). We then re-check that certificate ourselves with pred — we never take the AI's word for it.

Objective

Build the core single-session loop: the AI explores the library, picks its own targets, and emits counterexample certificates via pred; a separate checker independently re-validates each; all under a hard spending cap.

Interface (Input → Output)

What a counterexample certificate contains

A plain-JSON record of one bug: the source problem, the target problem (claimed to be reduce_to(source)), the solutions involved, and which property broke — one of:

  • unsound extraction (yes/no problems): a valid target solution that maps back to an invalid source solution;
  • incomplete reduction (yes/no problems): the source has a solution but the target has none;
  • suboptimal extraction (optimization problems): the target's best solution maps to a non-optimal source solution, plus a strictly better one to prove it.

How the checker validates a certificate (all via pred)

  1. Re-run pred reduce on the source and confirm it matches the certificate's target.
  2. Confirm the listed solutions are present and well-formed.
  3. Re-solve / re-evaluate with pred to confirm the claimed violation is real.

Technical recommendations (suggestions)

  • Reuse the existing mini-SWE-agent loop, but the AI's actions are now pred commands and reading source — drop the old "inject a Rust test and run cargo test" path in run_mini.py.
  • Keep the checker a separate program that only reads the certificate and runs pred. The AI's own claim must never decide the verdict.

Verification (how a reviewer confirms this is done)

Part A — the checker is trustworthy (deterministic, no AI needed). Run make verify-calibration. It feeds the checker a few certificates whose answers we already know, and must get every one right or exit with an error:

  • a genuine, correct bug certificate → accepted;
  • a certificate where the target problem was altered so it no longer matches pred reducerejected (caught when re-deriving the target);
  • a certificate that claims a bug but whose supposedly-invalid solution is actually valid → rejected (caught when re-checking the solution).

Part B — a real session behaves. Run one real bug-hunting session: every certificate it submits as a bug must pass the independent checker (no false alarms), and the session must stop when it hits the budget — running it again with a 10× smaller budget should stop noticeably sooner.

Dependencies

Depends on #1 (the pred environment).

Out of scope

Making the checker tamper-proof against trickier fakes and de-duplicating repeat bugs (#5); running many sessions/models (#4).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions