← Back to Pull requests

feat(ifeval): add adapter #1683

Closed
unknown closed this pull request without merging on Oct 30, 2026 21:27 UTC
View on GitHub
unknown unknown commented on May 18, 2026 22:33 UTC
Author

Summary

  • Add an IFEval adapter for the full 541-prompt Google Research corpus.

  • Port the strict IFEval checker into self-contained Harbor task tests.

  • Register a dependency-free agentgateway agent that calls an OpenAI-compatible Responses API at a configurable api_base.

  • Replace the PR-specific LiteLLM agent and reference configuration with AgentGateway.
  • IFEval adapter

    The adapter generates all 541 tasks by default. --task-ids accepts Harbor IDs such as ifeval-1001 and bare upstream keys such as 1001. Generated tasks contain the prompt, environment, strict checker, and case metadata needed for deterministic scoring.

    Verifier parity is pinned to Google Research commit 5b09c22d73a9d35eb6c5d2a99b95677a45053466. Harbor and the upstream verifier agree on all 541 frozen GPT-4 responses and all 834 instruction checks. Those old GPT-4 responses remain test fixtures only. Normal task generation never loads them, and generated tasks do not contain an oracle answer.

    The template keeps a small solution/solve.sh file because Harbor's adapter validator requires it. The adapter excludes that directory from every generated task.

    AgentGateway agent

    agentgateway runs on the Harbor host and sends one request to {api_base}/responses. It supports reasoning_effort and max_tokens, uploads the returned text to /workspace/response.txt, records token usage, and writes redacted request metadata. No new package dependency is needed because Harbor already depends on httpx.

    Example:

    uv run harbor run \
      -p datasets/ifeval/ifeval-1001 \
      -a agentgateway \
      -m gpt-5.6-luna \
      --agent-kwarg api_base=http://localhost:9999/v1 \
      --agent-kwarg reasoning_effort=low
    

    Verification

  • Ruff check passed. Ruff format reported 1,379 files already formatted.

  • AgentGateway unit tests: 28 passed.

  • IFEval adapter and checker tests: 30 passed.

  • Frozen verifier parity: 541 of 541 prompts and all 834 instruction checks matched upstream.

  • Targeted type check passed. The repository-wide check still reports 18 unrelated diagnostics in optional integrations.

  • Adapter validator: 30 checks passed and 0 errors.

  • Quorum review: both five-reviewer panels completed with no accepted findings.

  • Live port 9999 smoke with Podman and gpt-5.6-luna: 1 completed trial, 0 errors, punctuation:no_comma=1.0, reward 1.0.
  • Live result: /tmp/harbor-ifeval-release.yjxwSf/jobs/agentgateway-ifeval-release-cfs-20260901/result.json

    Diff: 309 lines (+231 / -78) across 3 files Reviewer: iandvt Review duration: 237533m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 309 lines diff across 3 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.343
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #1683"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 45.2% (MEDIUM) · Higher = larger blast radius
    45.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.9% · Safe to merge
    17.9%