xai / grok-4.7-efficient / xhigh / xhigh effort preferred over xai / grok-4.7-efficient / medium / medium effort · close win.
Primary judge: Sol 6.1, requested Low. Effective provider effort and internal attempts were not verified. A close win is still a scored preference; it does not establish a material defect.
Reviewed public evidence
Task goal
Review the released BattleRanks recipe data integrity boundary in the named frozen source. Trace family identity, observation identity, verification, storage deduplication, and recovery on duplicate submissions. Identify concrete conditions that could merge distinct recipes, double count one observation, accept mismatched battle/configuration lineage, or partially persist state. For each finding cite the exact function and evidence, show a minimal counterexample or actor sequence, distinguish proven behavior from assumptions, assess severity, and propose the smallest regression scenario. Compare existing guardrails with each claimed gap. Return prioritized findings and a release follow-up decision. Do not edit files or claim tests ran.
xai / grok-4.7-efficient / xhigh / xhigh effort answer
The recipe integrity boundary is not release-ready. Same-season exact retries are deduped, but omitted publication binding, non-transactional admission, and immutability can permanently lock a wrong or unrecoverable row. Static review only; no tests were run and no files were edited.
## Decision
**HOLD.** Do not sign off this boundary. Fix the P0 items below, or explicitly accept them in the release contract, before calling recipe admission immutable and deduplicated. Same-season publisher admission is substantially guarded; the holes are the optional publication switch, retry handling that does not match the SQL contract, and no way to repair a bad first write.
## Prioritized findings
### P0 — Omitting `manifest.complete` skips battle and runtime binding
`deriveRecipeObservation` in `recipe-evidence.js` treats battle, category, root hash, and publication as optional.
```29:33:inputs/recipe-data-integrity/source/recipe-evidence.js
check((!m.battleID||m.battleID===battle.id)&&(!m.category||m.category===battle.category)&&(m.complete===undefined||m.complete===true)&&m.runID===(metadata.runID??root.info?.metadata?.agentTeamsV2?.runID)&&(!m.rootSHA256||m.rootSHA256===h.rootExport),'run binding mismatch')
if(m.complete===true){check(e.publicAfter&&e.runtimePackage,'published snapshot or runtime package evidence missing');check(stable(parse(e.publicAfter).battle)===stable(battle),'archived public battle mismatch')}
const runtime=e.runtimePackage?parse(e.runtimePackage):null
const protocolVersion=runtime?`${runtime.name}-${runtime.version}`:metadata.synthesisProtocolVersion||e.synthesisProtocolVersion
```
`complete === false` is rejected, but omitting `complete` is allowed. Stored `battleID` and `category` come from the caller’s `battle`, not from the manifest (`record` at lines 68–69). `recipeEvidenceVerifier` (line 71) resolves bytes with `(event.battleID, event.sourceRunID)` and passes that caller battle through.
**Proven:** for a manifest with no `battleID`, no `category`, and no `complete`, this function does not require `publicAfter` or `runtimePackage`, and protocol version may be only `metadata.synthesisProtocolVersion`. Worker configs still have to match the claimed battle (`recipe-evidence.js` lines 38 and 55; `verifiedRecipeObservation` line 80).
**Not proven:** that the outside resolver will actually return another battle’s bytes. `configuration.js`, the resolver, and `combined-season-read.js` are outside this packet.
**Counterexample:** Battles B1 and B2 share the same model configIDs, variants, elapsed times, and costs. Manifest for run R omits `battleID`, `category`, and `complete`. Publisher submits `battleID=B2`. Worker checks pass against B2. Family and observation are stored as B2. A later correct B1 submission with the same `sourceRunID` hits the global source-run reject and cannot replace the row.
**Severity:** High. Wrong battle lineage, and the version string in the family id is then only a claim. Unrecoverable once inserted.
**Guardrail that holds:** if `complete===true`, `publicAfter.battle` must deep-match the claimed battle and a runtime package is required, so version becomes `` `${name}-${version}` ``. That guard is skipped by omitting the field, not only by a false value.
**Smallest regression:** one run, two season battles with identical `models`, manifest without `battleID`/`category`/`complete`. Admit once under each battle id. Expect the second to be rejected as the wrong battle, not stored or index-failed after a successful wrong insert.
### P0 — Identical retry recovery does not match the global unique index
SQL says one source run cannot be stored twice, including across seasons and concurrent publishers, and that identical retries are absorbed before the unique index:
```11:18:inputs/recipe-data-integrity/source/0010_recipe_observations.sql
PRIMARY KEY (season_id, observation_id),
UNIQUE (season_id, battle_id, recipe_family_id)
...
CREATE UNIQUE INDEX IF NOT EXISTS recipe_observations_source_run ON recipe_observations(json_extract(evidence_json, '$.sourceRunID'));
```
`insertRecipeObservations` only short-circuits duplicates inside the current season:
```38:46:inputs/recipe-data-integrity/source/recipe-store.js
const existing=(await db.prepare('SELECT observation_id,recipe_family_id,battle_id,evidence_json FROM recipe_observations WHERE season_id=?')...
const replay=(await db.prepare('SELECT evidence_json FROM recipe_observations').all()).results
for(const v of incoming)for(const row of replay){...if(previous.sourceRunID===v.sourceRunID&&stable(await verifiedRecipeObservation(previous))!==stable(v))throw Error('Recipe source run replay')}
...
const previous=byID.get(v.observationID)||byPair.get(`${v.battleID}:${v.recipeFamilyID}`)
if(previous){if(stable(...)!==stable(v))throw Error('Conflicting recipe observation');results.push({observationID:v.observationID,status:'duplicate'});continue}
...
if(toInsert.length)await db.batch(...)
```
**Proven:**
- Same season, same body: `status:'duplicate'`, no second insert. This path works.
- Same `sourceRunID`, different body, any season: throw `Recipe source run replay`. Fail closed.
- Same body, previous season: replay condition is false (equal, so not a conflict); season map misses it; insert runs; global index is the only stop. There is no `catch` that turns that into `duplicate`.
- No lock around select-then-insert. Concurrent identical publishers both pass the map and one receives a raw constraint error.
- A mixed batch of new rows plus a cross-season identical retry is one `db.batch`. The replay row prevents a clean duplicate result for the whole batch.
**Assumption:** `db.batch` atomicity is not in this packet. If the driver is non-atomic, earlier statements in that batch can remain. Deletes cannot repair them (`recipe_observations_no_delete`, SQL lines 21–22).
**Severity:** High for idempotency and for the written contract. Integrity of “two rows for one `sourceRunID`” holds only if the expression index is enforced. Recovery is wrong, and a mixed batch does not partially succeed in a controlled way.
**Guardrail comparison:** pair/id dedup and the inequality scan are real. They are season-scoped for the success path and not concurrency-safe. Observation id omits `season_id` (`recipeObservationID`, `recipe-observations.js` lines 49–51); cross-season collapse depends entirely on `json_extract`, which admission does not mirror.
**Smallest regression:** admit observation O in season S1; switch the active season to S2; resubmit the same body alone and again in a batch with one new run. Expect `{status:'duplicate'}` and the new run still inserted. Current code cannot do that.
### P1 — First write is permanent, and a bad row takes down or hides the catalog
```19:22:inputs/recipe-data-integrity/source/0010_recipe_observations.sql
CREATE TRIGGER ... recipe_observations_no_update ...
CREATE TRIGGER ... recipe_observations_no_delete ...
```
`readRecipeCatalog` (`recipe-store.js` lines 19–22) re-verifies every JSON body against the current season battle list. Missing battle: `continue` (success, row omitted). Verification throw: whole catalog fails. `admitted_revision` is written (line 46) and never read back.
**Proven:** this module has no repair, supersede, or revision filter. A wrong P0 admission keeps consuming `(season, battle, family)` and the global `sourceRunID`.
**Assumption:** whether a season snapshot can drop or reshape battles is outside the packet (`readActiveCombinedSeason`). The read behavior if that happens is proven.
**Severity:** High amplifier. Medium alone as a visibility bug.
**Smallest regression:** admit a row; read with that battle removed from the snapshot passed into `readRecipeCatalog`. Expect an explicit missing/conflict, not a shorter successful catalog. Second case: mutate the battle’s `models` and expect a scoped read error, not a total outage, or document the outage.
### P1 — Root/run binding is not an equality check
Same function, lines 29 and 41.
**Proven:**
- If `metadata.runID` is set, root metadata run id is not compared (`??` short-circuit). Manifest root hash is optional.
- A `team_moa` tool matches if `name==='team_moa'` and some text **includes** `m.runID`, or if `tool==='team_moa'` and `input.runID` is equal. Admission time is that tool’s `time.ran`.
- Task question is checked only when `state.input.question` is present (line 41).
**Counterexample:** `metadata.runID` equals manifest `runID` and differs from `root.info.metadata.agentTeamsV2.runID`. The only `name==='team_moa'` tool has text containing that run id and no `input.question`. Derivation accepts. `fullRecipeMs` is `synth.completed - admission` (lines 49 and 68), so the wrong tool also sets recipe wall time.
**Severity:** Medium. Mismatched root lineage and timing, then frozen by immutability.
**Guardrail:** exact `input.runID` match exists, but it is not required. Worker export hashes are still bound to manifest children (line 58).
**Smallest regression:** root metadata run id R2, manifest/metadata run id R1, one `team_moa` text blob that merely contains R1, no question field. Expect reject.
### P1 — `authenticatedCanonical` drops evidence lineage
```35:35:inputs/recipe-data-integrity/source/recipe-store.js
const derived=authenticatedCanonical?event:await verifyRecipePublisherPayload(event,verifyPublisherEvidence,{battle,season:selected});incoming.push(await verifiedRecipeObservation(derived,{battle}))
```
`verifiedRecipeObservation` (`recipe-observations.js` lines 64–80, 77) checks the configID **set** and count against `battle.models`, not configuration bodies, elapsed times, or hashes. `v.lineage` null, or `workerExports: []`, passes. `rubricVersion` is any non-empty string (family id line 47) while derive hardcodes `'quality-metrics-v3'`. Eligibility may be mixed (line 79); derive sets every individual `eligible:true`.
**Proven:** the parameter is an in-module bypass. It is not read from the event. Whether a caller can set it is outside the packet.
**Counterexample:** `authenticatedCanonical:true`, contributor configIDs equal to the battle, configuration objects or model strings different, `lineage` omitted, `rubricVersion` `'other'`. Admission succeeds. A second label on the same battle is a second family, so one battle is ranked twice. Publisher path cannot do this: `verifyRecipePublisherPayload` (lines 9–13) requires `stable(derived)===stable(event)` after full derivation.
**Severity:** High if any request path can set the flag; otherwise a trusted-writer residual that is still weaker than the publisher path.
**Smallest regression:** canonical insert whose `recipe.contributors[].configuration` differs from `battle.models[]` for the same `configID`, and `lineage.workerExports.length !== contributors.length`. Expect reject.
### P1 — Family rank merges distinct task, profile, and judge contexts
```42:50:inputs/recipe-data-integrity/source/recipe-observations.js
return `recipe-family-v1:${await digest(['recipe-family-v1',ids.sort(),synthesizer.configID,rubricVersion,synthesisProtocol.version,synthesisProtocol.instructionsSHA256])}`
...
return `recipe-observation-v1:${await digest(['recipe-observation-v1',v.battleID,v.recipeFamilyID,v.sourceRunID,v.judge?.exportSHA256])}`
```
`aggregateRecipeObservations` (lines 129–147) groups only by `recipeFamilyID`, averages quality across those rows, and sorts families by that average. `frozen.taskSHA256`, `profileSHA256`, and judge identity are not grouping keys. Per battle, `UNIQUE (season_id, battle_id, recipe_family_id)` plus lines 132–133 stop a second observation of the same family; they do not stop cross-battle pooling.
**Proven:** two observations with the same contributor configID set, synthesizer, rubric string, protocol version, and instructions hash are one ranked family even if tasks or judge exports differ. They are not two stored rows merged into one row.
**Severity:** High if a family is supposed to be task- or judge-scoped; otherwise a contract note, not a logic error. Cost rates live in the profile, which is also outside the family id, so cost means mix rate cards.
**Guardrail:** observation details keep `frozen` and judge hashes (`publicObservation`, `recipe-store.js` line 8). The ranking row does not split on them. Intra-family `stable(recipe)` drift throws (line 135) rather than silently merging configuration objects.
**Smallest regression:** two battles, same configs and protocol, different `taskSHA256` and judge export. Expect two family rows, or an explicit documented cross-task average. Today they are one `recipeID`.
### P2 — Native cohort completeness is a skippable title heuristic
```35:36:inputs/recipe-data-integrity/source/recipe-evidence.js
const manifestWorkers=m.children.filter(x=>x.title?.includes('/effort-'))
if(manifestWorkers.length)check(manifestWorkers.length===workers.length&&manifestWorkers.every(x=>workers.some(w=>w.sessionID===x.id)),'incomplete native worker cohort')
```
**Proven:** if no child title contains `/effort-`, extra manifest children need not be workers. `children.length >= workers.length` is only a lower bound (line 34).
**Also proven, and it limits the hole:** `verifiedRecipeObservation` line 80 requires `battle.models.length === contributors.length` and equal configID sets. A subset of a larger published battle is rejected on both publisher and canonical paths.
**Counterexample:** manifest children W1, W2, W3, synth; no `/effort-` titles; claimed battle’s models are exactly W1 and W2. W3 is dropped, run id is consumed, family excludes W3. This still needs a battle that matches the reduced set (ties to P0 if that battle is not the run’s battle).
**Severity:** Medium. Cannot shrink the published battle by itself. Can drop untitled native sessions and then freeze that family via the source-run index.
**Smallest regression:** three session children, no effort titles, battle models matching only two of them. Expect reject as an incomplete native cohort.
### P2 — No in-module transaction around admission
`insertRecipeObservations` lines 31–46 read the season, scan all evidence, decide duplicates, then `db.batch` inserts. Immutability triggers forbid compensation.
**Proven:** the check and the write are separate statements in this file. Constraint failures are not translated into `duplicate` or `conflict`.
**Assumption:** D1-style `batch` atomicity is not defined here. Partial multi-row persist is therefore unproven, but unrecoverable if the driver commits prefix statements.
**Severity:** Medium. Single-statement insert is all-or-nothing. Multi-row partial write is the open risk.
**Smallest regression:** two concurrent identical new observations, and one batch whose second insert violates the source-run index. Expect one stored row and a classified duplicate/conflict, with zero rows from the failed batch.
### P3 — Identity and timing edge cases
- **Tie-break** (`recipe-evidence.js` line 66): `reduce` keeps the earlier worker on equal `scorePoints`. Observation id does not include that choice, so the other order is a permanent conflict, not a second row. Low. Regression: two workers, equal quality, reversed `e.workers` order; expect a defined configID, not first-array-wins.
- **Wall time** (`recipe-observations.js` lines 98–99): `fullRecipeMs` must be `>= bestQualityIndividualMs` only, not `>=` every `workerElapsedMs`. Publisher worker elapsed is the battle value within 250ms of native `idle-created` (lines 49–50), while recipe wall time is synth-completed minus admission. Low. Regression: one non-best worker with `elapsedMs > fullRecipeMs` must be rejected if wall time is defined as covering contributors.
- **Canonicalization:** sorts use `localeCompare` (lines 104–109). Hex config ids are unlikely to reorder; session ids might. Low. Duplicate detection can false-conflict across locales. Regression: same body verified under two locales must stay `stable`-equal.
- **Storage defense in depth:** no CHECK that columns equal JSON fields. App insert writes them from the same object. Expression unique index allows multiple SQLite NULLs; this writer cannot emit a null `sourceRunID` (`verifiedRecipeObservation` line 73). Low, not an app double-insert.
## What was checked and not shown to double-count one observation id
Within one season catalog, one `observationID` is not inserted twice by this writer if the primary key holds. `aggregateRecipeObservations` throws on duplicate observation ids or `battleID:recipeFamilyID` (lines 132–133). Same-season exact retry returns `duplicate` and does not insert. Same `sourceRunID` with a different body is rejected in the app and by the global index.
Double-counting that remains is identity split, not two rows with one id: a new `sourceRunID` can cite the same worker export hashes (no unique index on lineage hashes), and two protocol-version labels are two families on one battle. That is proven as missing uniqueness, not as a catalog row counted twice.
## Discarded hypotheses
- **Non-empty `configurationDispatch` array stored as the synthesizer config.** The synth `dispatch.push` is inside `if(!dispatch.length)` (lines 38–39). A non-empty array is used as the dispatch list. Workers still hit the battle match at line 55. Fail closed, not a silent merge.
- **`find` by model+variant swaps configs.** Ambiguous first match throws unless configurations already stable-match. Fail closed.
- **Publisher path accepts a configuration body that does not match the battle model.** Line 55 checks model, `appliedKind==='variant'`, stable configuration, elapsed, and cost. Canonical path does not.
- **Pair unique constraint silently averages two judges on one battle.** Different bodies throw `Conflicting recipe observation`. First writer wins; scores are not merged.
- **Contestant / score-block regex as a proven mis-bind.** More likely to fail parse than to accept a swapped cohort. Not shown.
- **`admitted_revision` ignored on read as a defect.** In this module it behaves as an optimistic lock (line 33), not a catalog generation. Sticky rows after a revision bump are consistent with that, until a snapshot also changes battles (P1).
## Missing evidence
Outside the packet, so these are uncertainties, not clean passes:
- `combined-season-profile.js` (`digest`, `stable`): family collision resistance and duplicate equality are only as strong as those functions.
- `configuration.js` (`deriveConfigurationID`): if not injective over persisted configuration fields, distinct configs can share a family id, or `aggregateRecipeObservations` can throw and blank the season.
- Resolver and `combined-season-read.js`: whether battle id is independently bound, and whether season battles can change under one `season_id`.
- `db.batch` atomicity and SQLite JSON1 unique-index behavior: required to judge partial persist.
- Callers of `authenticatedCanonical`: exposure is unknown.
## Next action
Do not ship this as a closed integrity boundary. Before sign-off: require manifest `battleID`, `category`, and `complete===true` (archive battle plus runtime package); make native cohort completeness structural; classify unique-index hits as duplicate versus conflict, including cross-season and concurrent retries; wrap admission in one transaction. State in the release note whether family rank is allowed to average across `taskSHA256` and judge exports. Keep `authenticatedCanonical` off request paths, and if it remains, require configuration-body equality and `workerExports.length === contributors.length`.
MATERIAL_EVIDENCE_CONFLICT: SQL comment at `0010_recipe_observations.sql:15-17` says identical retries, including across concurrent publishers or seasons, are handled by publisher admission before `recipe_observations_source_run`; `insertRecipeObservations` in `recipe-store.js:38-46` only returns `duplicate` for the current season and does not lock or catch the index, so cross-season and concurrent identical retries reach that index.xai / grok-4.7-efficient / medium / medium effort answer
The recipe admission boundary is not release-ready. Evidence derivation is much stricter than storage, reread, and the canonical bypass. First admission of a battle/family pair is permanent, and several proven paths can lock in mismatched lineage or wedge the catalog.
Work was a direct review of the frozen packet only. No tests were run and no files were edited.
## Release decision
**HOLD.** Do not treat this boundary as closed. Ship only after the follow-ups below are fixed and covered by regression tests. Cryptographic identity is sound only if `digest` is collision-resistant; that function is outside the packet.
## Prioritized findings
### 1. High — Battle cohort check is not set equality and ignores configuration bodies
**Where:** `verifiedRecipeObservation` in `recipe-observations.js` (line 80). Used by `insertRecipeObservations` (line 35) and `readRecipeCatalog` (line 22).
**Proven:** The check is `battle.id`, `battle.category`, `battle.models.length === recipeConfigs.size`, and `battle.models.some(m => !recipeConfigs.has(m.configID))`. It never compares `model`, `variant`, or `configuration`, and it never requires every recipe `configID` to appear in `battle.models`.
**Counterexample:** `battle.models = [{configID: A}, {configID: A}]` and contributors `{A, B}`. Length is 2 and every battle configID is in the recipe set, so line 80 passes. `B` is not on the battle. A second case with the same configID set but different `model` / `configuration` documents also passes line 80.
**Guardrail that does not close it:** `deriveRecipeObservation` (recipe-evidence.js lines 45–46 and 55) does bind worker configuration, `deriveConfigurationID`, model, and `elapsedMs` to `battle.models`. That runs only on the non-canonical derive path. Canonical insert and every catalog reread skip it.
**Assumption:** Whether production season rows can actually contain duplicate configIDs is outside the packet (`combined-season-read.js`). The local predicate is still wrong.
**Severity:** High. Mismatched battle/configuration lineage can be stored and republished.
**Smallest regression:** Admit a canonical observation whose contributor set is `{A,B}` against a battle whose `models` are two entries both with `configID` A. Expect rejection. Second case: same configIDs, different `configuration` objects. Expect rejection.
### 2. High — Manifest battle lineage is optional, so a run can be bound to a caller-chosen battle
**Where:** `deriveRecipeObservation` (recipe-evidence.js lines 29–30); resolver wrapper at line 71.
**Proven:** `(!m.battleID || m.battleID === battle.id)` and the same pattern for `category` and `rootSHA256`. If `m.complete !== true`, `publicAfter` / `runtimePackage` are not required and `stable(parse(e.publicAfter).battle) === stable(battle)` is skipped. `record.battleID` is taken from the caller `battle`, not from the manifest. `recipeEvidenceVerifier` only passes `resolveEvidence(event.battleID, event.sourceRunID)` into that function.
**Actor sequence:** Publisher submits `event.battleID = B`. Resolver returns a manifest that omits `battleID`, `category`, `rootSHA256`, and `complete`. Workers’ configIDs, configurations, and durations match battle B within 250 ms (`elapsedMs` is taken from the battle at line 49; native idle span must be within 250 ms at line 50). The observation is stored as battle B even though the native manifest never named it.
**Guardrail:** Worker-to-battle checks at line 55 still apply on this path. They do not require the manifest, root export, or archived public battle to name B. Global `sourceRunID` uniqueness stops the same run being stored twice; it does not stop the first store being the wrong battle.
**Assumption:** Exploitability depends on `resolveEvidence`, which is not in the packet. Acceptance of an unnamed manifest is proven in this file.
**Severity:** High if the resolver can return evidence not already bound to that battle. Otherwise the hole is latent but real.
**Smallest regression:** Derive with a manifest that omits `battleID` / `category` / `complete` while the context battle differs from any archived public battle. Expect rejection.
### 3. High — `authenticatedCanonical` skips evidence verification inside this boundary
**Where:** `insertRecipeObservations` (recipe-store.js lines 30–35).
**Proven:** If `authenticatedCanonical` is true, the only extra check is `seasonID === selected.seasonID && revision === selected.revision`. The event is not passed through `verifyRecipePublisherPayload` or `deriveRecipeObservation`. It is then passed to `verifiedRecipeObservation`, which does not recompute scores, judge bindings, or configuration-vs-battle equality (finding 1). This module does not authenticate the caller.
**Actor sequence:** Caller passes `{authenticatedCanonical: true, seasonID, revision}` and an internally consistent event whose configIDs satisfy line 80, with fabricated `quality` / `comparisonBaseline` / `lineage` hashes. `recipeFamilyID` and `recipeObservationID` are recomputed and can be made to match. The row is inserted and becomes immutable.
**Guardrail:** Schema projection, identity recomputation, pair arithmetic, and the weak battle check still run. They do not replace evidence derivation. `verifyRecipePublisherPayload` (lines 9–13) is the real guard and is explicitly skipped.
**Assumption:** Whether any production caller can set the flag is outside the packet. The boundary function itself allows it.
**Severity:** High for this admission API.
**Smallest regression:** Call `insertRecipeObservations` with `authenticatedCanonical: true` and a cohort-matching but evidence-free payload. Expect rejection unless a separate, tested authz gate is the only caller.
### 4. High — First battle/family write is permanent, and one bad row wedges the season catalog
**Where:** SQL triggers (0010_recipe_observations.sql lines 19–22); `UNIQUE (season_id, battle_id, recipe_family_id)` (line 12); `insertRecipeObservations` duplicate/conflict branch (recipe-store.js lines 42–45); `readRecipeCatalog` (lines 21–22).
**Proven:** UPDATE and DELETE abort. A second observation for the same season, battle, and family either returns `duplicate` only when `stable` matches, or throws `Conflicting recipe observation`. It never replaces the row. `readRecipeCatalog` has no per-row isolation: `verifiedRecipeObservation` throwing, or `JSON.parse` throwing, fails the whole catalog. `if (!battle) continue` silently drops rows whose `battleID` is absent from the current season snapshot.
**Actor sequence:** First publisher admits a mismatched canonical observation (findings 1–3). A corrected replay throws conflict. Operators cannot delete the row. If the live battle’s category or model-set length later diverges, every catalog read throws. If the battle ID disappears from the season snapshot, the observation vanishes from rankings with no error while remaining stored.
**Guardrail:** Immutability and the unique pair are real and prevent overwrite double-counts. They also prevent repair. Same-season identical retry is handled. Correction and cleanup are not.
**Assumption:** That a season revision can change category or cohort for an existing battle ID is outside the packet. The read and trigger behavior if it does is proven.
**Severity:** High. Integrity failures become permanent availability failures.
**Smallest regression:** Insert one observation, change the in-memory battle category, call `readRecipeCatalog`. Expect a defined per-row failure, not a season-wide throw, and a supported quarantine path. Today the throw is the proven behavior.
### 5. Medium-high — Writes treat revision as a consistency token; reads ignore it
**Where:** `insertRecipeObservations` lines 33 and 46 versus `readRecipeCatalog` line 19.
**Proven:** Canonical inserts require the caller revision to equal the active revision. The INSERT stores `admitted_revision` only if `combined_season_active` still has that `(season_id, revision)`. The catalog query is `WHERE season_id=?` with no revision predicate. `UNIQUE (season_id, battle_id, recipe_family_id)` does not include revision, so a later revision cannot add a second observation for that pair and cannot replace the first.
**Actor sequence:** Admit under revision R1. Advance the active revision to R2 without changing `season_id`. Catalog still aggregates the R1 row. A corrected R2 observation for the same battle and family conflicts.
**Guardrail:** The revision subquery stops inserts after the revision row disappears. It does not scope reads or allow replacement.
**Assumption:** Whether revisions are in-place on one `season_id` is in `combined-season-read.js` (outside the packet).
**Severity:** Medium-high for stale lineage being ranked as current.
**Smallest regression:** Two revisions, one season ID, one stored observation. Catalog must either filter to `selected.revision` or explicitly aggregate historical revisions. A superseded pair must not be the only publishable sample if the product treats revision as the battle snapshot.
### 6. Medium — Duplicate recovery is not idempotent across seasons or concurrent publishers
**Where:** `insertRecipeObservations` lines 37–46; SQL lines 15–18.
**Proven:** Identical-content replay is recognized only from `existing` rows `WHERE season_id=?` (line 38) and from the in-batch `sourceRunID` set (line 37). The all-seasons scan (lines 39–40) throws only when `sourceRunID` matches and `stable(...)` differs. An equal cross-season retry falls through to INSERT. The global unique index on `json_extract(evidence_json, '$.sourceRunID')` then aborts. The SQL comment says identical retries are handled by publisher admission before that index, including across seasons. The JS does not do that. SELECT-then-INSERT is not one transaction. Concurrent same-season first inserts can both pass the SELECT; the loser gets a constraint error, not `status: 'duplicate'`.
**Actor sequence:** Store observation O with `sourceRunID` R in season S1. Active season becomes S2. Retry the same body. Replay loop does not throw. `byID` / `byPair` miss. `db.batch` hits `recipe_observations_source_run`. Caller sees an exception, not `duplicate`.
**Partial persist:** A batch that mixes new observations with that cross-season identical retry depends on `db.batch` atomicity, which is not in the packet. If the batch is not atomic, earlier statements in the batch can remain while the function throws and returns no `results`.
**Guardrail:** The unique index, if present and if `json1` works, prevents a second row. It does not implement the recovery contract the comment states. Same-season serial retry is handled (lines 42–43).
**Severity:** Medium for recovery. Low for double-count as long as the unique index is actually created. `CREATE TABLE IF NOT EXISTS` will not add the table-level unique pair to a pre-existing table; the separate unique index will be created only if absent.
**Smallest regression:** Replay an identical observation after `season_id` changes. Expect `duplicate` and no throw. Concurrent double submit of a new observation should also return one `inserted` and one `duplicate`.
### 7. Medium — Distinct task contexts share one family and are ranked as one recipe
**Where:** `recipeFamilyID` (recipe-observations.js lines 42–47); `aggregateRecipeObservations` (lines 129–147); derive hardcodes `rubricVersion: 'quality-metrics-v3'` (recipe-evidence.js line 68) and does not pass `taskSHA256` or `profileSHA256` into the family id (line 69).
**Proven:** Family digest input is sorted contributor configIDs, synthesizer configID, `rubricVersion`, protocol `version`, and `instructionsSHA256`. It does not include `taskSHA256`, `profileSHA256`, battle ID, judge, or runtime package hash. Insert does not compare a new family’s recipe body to stored observations of that family on other battles. Aggregation pools them into one `recipeID`, with `sampleCount` equal to the number of observations, sorted by average relative uplift.
**Counterexample:** Battles B1 and B2, tasks T1 and T2, same contributor configIDs, synthesizer, protocol version, and instructions hash. Two observations insert. Catalog emits one row, `sampleCount: 2`.
**Related proven gap:** Protocol version is a free string. If a runtime package is present, derive sets version to `` `${runtime.name}-${runtime.version}` ``; if absent, it uses `metadata.synthesisProtocolVersion` (recipe-evidence.js lines 31–33). The same version string plus the same instructions hash merges a runtime-bound observation with an unbound one. Runtime hash is lineage-only.
**Guardrail:** `aggregateRecipeObservations` throws `Recipe configuration changed within family` if `stable(recipe)` differs (line 135). That protects body equality only when both rows are read together. A difference bricks the catalog (finding 4) instead of splitting the family. Insert will not stop the second body from being stored.
**Assumption:** This merge may be intentional recipe-level pooling. It is still a concrete merge of distinct task observations. Whether `deriveConfigurationID` is injective over every persisted configuration field is outside the packet (`configuration.js`). If it drops fields, same family ID with different bodies is possible; the read then throws and cannot be repaired.
**Severity:** Medium for ranking integrity. High only if a family is specified to be task-specific.
**Smallest regression:** Two battles, different `taskSHA256`, identical recipe identity inputs. Assert either two family IDs or an explicit documented pool. Assert a body mismatch cannot make `readRecipeCatalog` throw for the season.
### 8. Medium — Lineage is optional at the verification gate
**Where:** `project` (recipe-observations.js lines 31–39); incomplete-evidence check (line 73); lineage check (line 77).
**Proven:** `project` is a whitelist and copies only keys that are present. Line 73 does not require `lineage`. Line 77 validates lineage only if it is truthy. Derive always builds a lineage object; canonical admission can omit it. Stored hashes are not re-resolved on read.
**Guardrail:** Format checks run when lineage is present. `deriveRecipeObservation` hashes worker bytes against the manifest (line 58). That is skipped on the canonical path and on read.
**Severity:** Medium if published observations are claimed to carry worker/root/public hashes.
**Smallest regression:** Canonical event with no `lineage` must be rejected if lineage is part of the release contract.
### 9. Low — Timing and a few derive bindings are weaker than they look
**Proven, secondary:**
- Non-best `workerElapsedMs` is not required to be `<= fullRecipeMs` (`verifiedRecipeObservation` lines 98–99). Only the best individual is.
- Judge receipt `providerID` may be absent (recipe-evidence.js line 20).
- Root `team_moa` question is checked only if present (line 41). Task binding still depends on `p.task.taskSHA256 === h.task` (line 27).
- Contestant extraction uses a greedy `/JUDGE-VISIBLE CONTESTANTS\s*(\[[\s\S]*\])\s*Return only/` (line 22). A packet with two such sections binds the last match. It still has to agree with the score block or it throws. Not a proven silent merge.
**Severity:** Low. Not sufficient alone to hold, but they should not be described as exact native timings or unambiguous packet parsing.
## Guardrails that do hold
- Observation ID is recomputed from battle, family, `sourceRunID`, and judge export hash (`recipeObservationID`, lines 49–50). A body that does not match that ID is rejected (line 75).
- Same-season identical retry returns `duplicate` and does not insert (recipe-store.js lines 42–43), so it does not double-count.
- In-batch duplicate observation IDs, battle/family pairs, and source runs are rejected (`aggregateRecipeObservations` line 132; store line 37).
- Different content for one `sourceRunID` is rejected before insert (store lines 39–40), and the global unique index is a backstop if it exists.
- Derive path checks judge receipt, packet text, contestant uniqueness, score-alias bijection, profile digest, worker export hashes, configuration ID, and synthesis result hash.
- Cost coverage cannot claim a full workflow price for an unpriced original judge (recipe-observations.js lines 67–72 and 90).
- Immutability triggers block silent overwrite.
These stop classic same-season double-insert and identity spoofing of the observation ID. They do not stop findings 1–5.
## Discarded hypotheses
- Non-empty `configurationDispatch` arrays silently become the synthesizer configuration. Line 39 would push the array as the synthesizer config; `config()` requires `providerID` / `appliedKind === 'variant'`. That path fails closed.
- Empty-dispatch `find()` by model+variant silently attaches the wrong distinct configuration. The later `stable` comparison and `deriveConfigurationID === configID` check reject a first match that is not the worker’s configuration. That is a false reject for two same-model slots, not a silent merge.
- `status: 'duplicate'` returns a different observation ID than the stored row. That return is only reached when `stable` matches. It is a bug only if `stable` drops identity fields. `stable` is outside the packet, so this is not proven.
- Score changes for an existing observation ID merge or overwrite. They throw `Conflicting recipe observation` and the trigger blocks UPDATE.
## Missing dependencies
Outside the packet, and able to change severity: `digest` and `stable` (`combined-season-profile.js`), `deriveConfigurationID` (`configuration.js`), `TASK_CATEGORIES`, `readActiveCombinedSeason` and whether revision/battle IDs are reused (`combined-season-read.js`), `resolveEvidence`, and whether `db.batch` is atomic. None of those gaps erase findings 1–6, which are proven in the frozen files.
## Next useful action
Add regression tests for findings 1, 2, 4, and 6 before any release cut. Then make `verifiedRecipeObservation` require exact battle configID set equality and configuration equality; require manifest `battleID`, `category`, and public-snapshot binding on derive; make cross-season and concurrent retries return `duplicate` inside one transaction; stop failing the entire catalog on one row. Keep `authenticatedCanonical` out of the untrusted admission surface unless an upstream authz gate is shown and tested.Primary judge's stated reason
A receives a slight forced preference for more accurate control-flow analysis and additional concrete root/run lineage coverage. B's useful battle-set counterexample substantially offsets that advantage. This is not an established material quality gap; an independent review could reasonably prefer B.
This reason is the judge's assessment. No independent factual-defect finding is asserted by this record.
Battle wave: c45fb52e-f319-4911-b8d9-47ec80be5c0c. Pair: brp1_7e98b8e2c62010af178a1a84644d898cddd3921b8a80c04b33b90a5b01bf4e47. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.