Skip to content

feat(eval): mergeability verdict for external-repo PRs without a benchmark delta #2385

Description

@matedev01

Problem (current state, with file refs)

The merge decision on our OWN repo is self-referential: "should I merge this PR?" reduces to "did this change to OUR agent raise OUR benchmark composite?" scripts/score_pr_delta.py is a reporter (docstring line 27) that consumes two pre-existing run_eval artifacts (baseline-agent vs. candidate-agent) and bands the composite_mean delta behind a Pareto floor over PARETO_AXES = ("judge_mean", "objective_mean") (line 52), doubled to a public/private target by combine_dual_target() (line 264).

That delta only exists when the change is to the agent itself. scripts/benchmark_pr_policy.py is_agent_submission() (line 50) restricts the scored surface to agent.py / agent/**. For an arbitrary PR on an external product repo ("fix validator lease handling") there is no baseline-agent/candidate-agent artifact pair, so score_pr_delta has nothing to consume — no delta, no band. The verdict falls back on the LLM judge, which currently saturates at judge_mean=1.0 (#2379) and, even once fixed via challenger-vs-king (#2382), grades maintainer foresight rather than the correctness/safety of a submitted diff.

So there is no defined signal today for "is THIS external PR worth merging?" — this is the structural gap the whole roadmap is built around.

Why it blocks autonomous external maintenance

Every downstream capability — attestation, the run loop, the safety envelope, the eventual execution gateway — needs a value verdict to carry. Without a non-self-referential mergeability signal there is nothing meaningful for the maintainer loop to act on for an external repo, and "autonomous external maintainer" cannot be truthfully claimed.

Proposed direction (concrete, staged; reuse existing seams, invent no new APIs)

Define a mergeability verdict object for external-repo PRs, computed without a benchmark delta, that combines three independent signals with an anti-Goodhart floor rather than an average:

Stage 1 — verdict schema. A serializable verdict keyed to {repo, base_sha, head_sha, diff_digest} recording each signal, the floor decision, and an advisory value_label + rationale. Keep the anti-Goodhart shape of score_pr_delta: a Pareto-style floor that blocks on ANY regressed/uncovered/critical axis, never averaging a bad axis away.

Stage 2 — wire into the recommendation. Replace agent/review.py's ungrounded value_label with the composed verdict; write it to the owner-only local sink only. No posting, no write.

Stage 3 — publish the verdict object so the attestation sibling can bind it ({repo, pr_number, base_sha, head_sha, diff_digest, decision}), and so it is the object the (future, ROADMAP §4) owner-action gateway would consume in place of the absent score_pr_delta band.

Acceptance criteria

  • A documented mergeability-verdict schema exists for a PR that produces no run_eval artifact, keyed to {repo, base_sha, head_sha, diff_digest}.
  • The verdict is fail-closed on the correctness bundle: no green bundle → no merge recommendation.
  • A domain-critical match is an absolute veto no score can override (test).
  • The judge contributes only qualitative axes and is gated off while it saturates; a test asserts a saturated judge cannot by itself produce a merge verdict.
  • The floor blocks on any single regressed/uncovered/critical axis rather than averaging (anti-Goodhart test mirroring score_pr_delta's Pareto floor).
  • Output is advisory only — written to the owner-only sink, never posted; can_auto_execute() stays False.

Dependencies

Out of scope / stays human-gated

  • No GitHub write. This issue produces a verdict, not an action. Execution belongs to the owner-action execution gateway (external signer, approval binding, idempotency, audit; ROADMAP §4) — a separate, permanently human-gated track.
  • Incentive / consensus / emission / weights / payment / wallet code paths stay PERMANENTLY human-gated. A positive verdict never earns autonomy on those surfaces — the domain veto guarantees they never become mergeable by this signal, regardless of any score or judge outcome. Autonomy is earned only on the low-risk surface.
  • No change to the foresight benchmark, score_pr_delta, or the Pareto floor for our own agent PRs; internal repo-set selection stays anonymized as it is today (combine_dual_target).

Metadata

Metadata

Assignees

No one assigned

    Labels

    autonomy-roadmapRoadmap toward autonomous external-repo maintenancebenchmarkEvaluation harnessenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions