Skip to content

M2.1 — Build fair multi-model orchestration (scheduler + pluggable runner + budget) #4

Description

@GiggleLiu

Background

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

Issue #2 runs one AI bug-hunting session (one model exploring the library and submitting counterexamples). To build a leaderboard we must run many sessions across many AI models — and the comparison is only fair if every model gets the identical environment, prompt, and budget. This issue builds that orchestrator. It also puts the AI behind a small swappable interface called AgentRunner, so a different agent program (e.g. opencode) can be plugged in later without changing the rest of the system.

Objective

Run N sessions across M models — fairly, in parallel, and resumably after interruption — with the AI behind a swappable AgentRunner.

Interface (Input → Output)

  • AgentRunner (the swap point): given (environment, model, per-session budget) → returns (the certificates found, accounting). The default implementation wraps the M1.2 — Build the bug-hunting session: explore → certify → verify, under budget #2 mini-SWE-agent session.
  • Scheduler: given (list of models, sessions per model, total budget, per-model budget, parallelism, optional --resume) → writes per-model results files + a checkpoint file + a budget ledger (how much each model spent, how much is left).

Technical recommendations (suggestions)

Verification (how a reviewer confirms this is done)

Run one acceptance run using a fake AI (FakeRunner — returns a canned certificate, makes no real model calls, so the test is fast and free) over 2 models. It should demonstrate three things:

  1. Swappable: the whole pipeline runs end-to-end with the fake AI. (Proves the rest of the system needs zero mini-SWE-agent-specific code.)
  2. Resumable: kill the process partway, re-run with --resume → it finishes only the remaining sessions, does not re-charge the finished ones, and produces no duplicates. (Without --resume it would redo everything — that's the contrast.)
  3. Budget-fair: with a total budget of $0.20, total spend stays ≤ $0.20, the scheduler stops launching once that's hit (remaining sessions marked "skipped — budget"), and each model is capped equally. (Turn the cap off and it overspends — that's the contrast.)

Dependencies

Depends on #2 (the session) and #3 (the results format).

Out of scope

Plugging in a second real agent like opencode (deferred — we build only the swap point now); the tamper-proof checker and de-duplication (#5).

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