Skip to content

eval-interface: serve GET /v1/public/eval-scores — the v1 transport #9215 committed to #9266

Description

@JSONbored

Context

Sub-issue of #9216 (frozen-repo benchmark harness), epic #8534. #9215 specs GET /v1/public/eval-scores as the v1 transport for EvalScoreRecords; that endpoint does not exist. It is the one piece both #9265 (leaderboard emitter) and the internal outcome-confirmed-precision scores (already computed, never served in this shape) depend on.

Requirements

  1. GET /v1/public/eval-scores?subject=<id>&since=<iso>{ records: EvalScoreRecord[] }, unauthenticated, matching the existing /v1/public/* posture exactly (isPublicStatsEnabled-style flag gate, 404 disabled / 503 on internal error, same cache header discipline as /v1/public/stats).
  2. Two record sources feed one endpoint, same shape: outcome-confirmed precision (adapt loadPublicRulePrecision's existing computation into EvalScoreRecord's shape now — this needs no new scoring, only a re-shaping) and, once benchmark: leaderboard artifacts as spec-conformant EvalScoreRecords #9265 lands, benchmark-run records. The endpoint must not grow a second response format when the second source arrives.
  3. recordDigest is computed at serve time from the record's own canonical JSON (same primitives as contentDigest in src/review/decision-record.ts — reuse, do not reimplement), so a consumer can verify it without trusting the transport.
  4. OpenAPI registration, matching every other /v1/public/* route's existing pattern in src/openapi/spec.ts.
  5. Exemption from auth middleware, same pattern as the other public routes (the if (path === ...) return false list in src/api/routes.ts).

Deliverables

  • GET /v1/public/eval-scores implemented, wired for the outcome-confirmed-precision source immediately (this does not block on benchmark: leaderboard artifacts as spec-conformant EvalScoreRecords #9265)
  • OpenAPI spec entry
  • Tests: response shape validates against EvalScoreRecord, digest is independently recomputable, flag-gated 404, auth exemption, cache headers match sibling endpoints

Expected outcome

The one transport #9215 committed to actually exists, and the score data that's already computed today is reachable in the spec's shape without waiting on the benchmark harness.

References

Sub-issue of #9216. Spec: #9215 (§1, §2). Existing pattern: src/api/routes.ts's /v1/public/stats and /v1/public/decision-ledger/verify. Reuse: contentDigest/canonicalJson in src/review/decision-record.ts. Epic #8534.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions