Skip to content

R-6: agent conformance suite: runner, OpenAI + Anthropic cases, receipt per case × model × backend #5349

Open

Description

@noahgift

Refs #4000 (EPIC 0.72 "Agent Ready", row R-6). Every other row's done_when runs through this suite, so it lands first.

Defect. No conformance suite exists. contracts/apr-serve-openai-compat-v1.yaml describes the OpenAI surface as obligations, but nothing runs a fixed set of client-observable cases against a live apr serve per model × backend and reports a cell per case. There is no Anthropic shape at all.

Done when:

  1. Runner. One runner sends each suite case to a running apr serve (any model, any backend) and writes one receipt cell per case × model × backend: pass, fail (with the failing assertion), or not_measured (with the reason). A cell that is absent is a missing measurement, and the run exits non-zero.
  2. Cases. The OpenAI cases come from the existing contract: non-streaming and SSE chat, finish_reason (stop and length), usage, completions, models. The Anthropic cases live in a new contracts/apr-serve-anthropic-messages-v1.yaml. Until R-1 adds /v1/messages, they are recorded as fail (404), never skipped. At least one case per row R-1..R-5 per shape.
  3. Prove. A planted mutant that drops finish_reason turns the run RED. The same run without the mutant is green on the cases the server supports.
  4. Nightly. CPU, qwen3-1.7b-q4km, on an idle host, with the GPU certified matrix nightly. It runs as LAB until it is promoted.
  5. PR job. A CI job on PRs that touch aprender-serve is a new gate. It needs its own ruling, three green nights and a retired gate, and is not part of this issue's first PR.

Activity

  1. noahgift commented on Oct 14, 2026

    @noahgift
    MemberAuthor

    S1 landed on the branch feat/r6-conformance-5349 @ 601f9ae866 (no PR yet; waits for a slot after the 0.72 cut).

    • realizar::api::conformance: 12 cases (7 OpenAI, 5 Anthropic) covering R-1..R-5 on both shapes, one cell per case × model × backend (pass / fail / not_measured, no skip; absent cells named by missing_cells).
    • serve_conformance example: runs the suite over HTTP against a live apr serve and writes the receipt JSON. It exits 1 on any fail, not_measured or missing cell.
    • Contract contracts/apr-serve-anthropic-messages-v1.yaml, FALSIFY-ASM-001..007: 7/7 pass; clippy -D warnings clean on lib, tests and the example.
    • Planted mutant (every finish_reason stripped from JSON and SSE): oai.chat.finish_reason and oai.chat.stream go RED.

    Baseline on the demo router: 5/12 pass.

    case row verdict
    oai.models, oai.chat.finish_reason, oai.chat.length, oai.chat.stream, oai.chat.usage R-4/R-5 pass
    oai.chat.seed R-3 fail: seeds 7 and 8 give the same text at T=0.8 (demo text is "", so this one is not yet real-model data)
    oai.chat.tool_call R-2 fail: no tool_calls
    anth.messages.* (5) R-1..R-5 fail: 404, no /v1/messages route

    Next: S2, the nightly runner on qwen3-1.7b-q4km CPU plus the GPU certified matrix; first receipt 10-16.

  2. added this to the 0.73.0 milestone on Oct 14, 2026
  3. noahgift commented on Oct 15, 2026

    @noahgift
    MemberAuthor

    R-6 S2: first live receipt from scripts/serve_conformance_nightly.sh (branch feat/r6-conformance-5349 @ f3c5a31).

    • apr 0.71.3 (f3c5a312d9), apr serve run on CPU (--no-gpu), Qwen3.5-0.8B-Q4_K_M (sha256 bd258782e35f…dc517), 2026-10-14 21:06–21:10Z. Server up; 17 cells, 0 missing, 0 not_measured.
    • Lib tests on the same commit: api::conformance 8/8, contracts stale_examples + lint_passes_on_real_contracts 2/2.

    8/17 pass

    case row verdict
    oai.models, oai.chat.finish_reason, oai.chat.length, oai.chat.stream R-5 PASS
    oai.chat.usage R-4 PASS
    ollama.chat.usage R-4 PASS
    ollama.chat.done, ollama.chat.length R-5 PASS
    oai.chat.seed, ollama.chat.seed R-3 FAIL: seeds 7 and 8 at T=0.8 gave the same text ("Hello! How can I assist you today?")
    oai.chat.tool_call R-2 FAIL: no tool_calls[0].function.name
    oai.chat.stream_tool_call R-2 FAIL: streamed tool call names ""
    anth.messages.* (5) R-1..R-5 FAIL: 404, no /v1/messages route (R-1)

    Caveat on R-3: one prompt is one input. A greeting prompt may be near-deterministic even under real sampling, so before the seed FAIL is read as "sampling is greedy" the case needs a higher-entropy prompt or a second prompt. The check still fails honestly here; the cause is not yet proven.

    Not a gate (LAB). S3 (a CI job) goes to a quorum after S2, not before 10-19.

  4. noahgift commented on Oct 22, 2026

    @noahgift
    MemberAuthor

    Tracked in #5348 (triage 2026-10-22).

  5. noahgift commented on Oct 25, 2026

    @noahgift
    MemberAuthor

    R4 triage parked and closed PR #6118 (feat(serve): agent conformance suite runner + Anthropic Messages contract (R-6, Refs #5349)). This ticket stays open and links it; re-cut or reopen the PR when rebased.

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

    P1High priorityowner:aprender-cdOwned by session aprender-cd

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions