Skip to content

DGM: score metadata completeness for fleet promotion (fixes #168) - #170

Merged
justrach merged 1 commit into
mainfrom
fix/168-dgm-score-metadata
Jul 11, 2026
Merged

DGM: score metadata completeness for fleet promotion (fixes #168)#170
justrach merged 1 commit into
mainfrom
fix/168-dgm-score-metadata

Conversation

@justrach

Copy link
Copy Markdown
Owner

Client half of #168 — all six gaps. The coordinated backend (harness-telemetry v2-first verification, legacy v1 window with ingest-time scale normalization, per-row-normalized aggregations, propose fingerprint validation, incumbent-refresh evidence floor) is already deployed to prod (version 726d9395), and the 177 historical 0-100-scale rows were normalized with a pre-migration backup — so this client's v2-only scores verify live from the moment it ships.

See the commit message for the per-gap breakdown. Built by a multi-agent workflow: 2 implementers + cross-repo verifier + 3 adversarial reviewers, a 10-fix review round, then a re-review round (7 findings, all closed). Signature parity is pinned by a golden v2 vector reproduced byte-for-byte in Zig (src/scoring.zig test), the worker's actual scoreSignature() (index.test.ts), and the regenerated Python SDK.

Verification: zig build test 162/162 · SDK regen byte-idempotent (drift gate green) · backend node --test 23/23 + tsc --noEmit clean · prod post-migration: 0 rows above 1.0, fitness view serves exactly the legitimate reviewer champion (mean 0.96), /v1/stats and /v1/elites healthy.

Fixes #168

All six gaps from #168, client side (the coordinated backend half is
live on harness-telemetry as of 2026-07-11, so v2 scores verify in prod):

- Gap 1: scoreVariants' prov string now carries niches[i] — workflow
  tournament scores land in a real MAP-Elites cell instead of the
  anonymous one that promotion can never match.
- Gap 2: the score envelope is v2 — niche and provider_class join the
  HMAC-signed message, so a score for one cell/tier cannot be replayed
  into another by mutating unsigned transport fields. All signing sites
  (scoreVariants, runEval, /score) emit v2; user-controlled envelope
  fields are sanitized (tab/CR/LF) and fingerprints hex-validated
  BEFORE signing so signed bytes always equal ingested bytes; run_id
  included. SDK signers/verifiers regenerated to match (v2-first with
  v1 legacy fallback), pinned by a cross-language golden vector.
- Gap 3: fleetEvent asserts (debug builds) that a propose's prompt_text
  hashes to its claimed prompt_sha; oversized genomes (>64KiB, cap
  raised from 8KiB) are skipped rather than sent truncated, since a
  truncated genome can neither validate nor serve.
- Gap 4: the wire scale is canonically [0,1]. runEval and scoreVariants
  divide their 0-100 local scores at the emission boundary (display,
  eval_best, and targets keep the 0-100 UX); out-of-range evals skip
  the score AND the paired fleet events; /score accepts an explicit
  scale ("unit"|"percent") and rejects unknown scale values loudly,
  with the documented [0,1]/(1,100] heuristic when absent.
- Gap 5: scoreVariants proposes the genome before submitting, so a
  judged variant's cell always has the genome text promotion needs.
- Gap 6: run telemetry now carries the same session run_id as score
  telemetry (and the run branch of the OTLP serializer actually emits
  it), giving operational and fitness rows a stable join key.

zig build test 162/162; SDK regen byte-idempotent; backend suite 23/23
against the same golden vectors.

Fixes #168

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DGM: score metadata completeness fixes for fleet promotion

1 participant