Accept fixture-bound supplied review nominations without deriving match facts (by Codex)

This commit is contained in:
Codex authored and Codex committed 2026-10-27 08:51:30 +01:00
1 parent 2c4b9d2595
commit 925042b559
6 files changed
+344 -5

No files matched your search

@@ -36,6 +36,54 @@ draws and losses are unknown; no season-ranking formula is introduced here.
`eleven={available:false,reason:"not_recorded",rows:[]}` explicitly reports the
missing nominations instead of deriving match ratings from catalogue strength.
### Optional supplied nominations
The additive three-argument overloads of both pure functions accept a separate
`records` object. The existing two-argument functions and the source hook retain
their original no-records behaviour. Records do not modify the live fixture:
```json
{
"schema": "openbmh-post-match-records@1",
"fixture_id": "the-original-fixture-id",
"source_revision": 1,
"eleven": {
"available": true,
"source": "supplied-records",
"notice": "Nominations supplied by the presentation data provider",
"formation": "3-4-3",
"rows": []
}
}
```
`rows` must contain exactly eleven unique player identities and a 1/3/4/3 split
of `position: "gk"|"def"|"mid"|"fwd"`. Each row contains exactly
`player:{id,name}`, `team:{id,name,role:"club"}`, `position` and `rating:null`.
The team must retain a known ID and name from the recording's match teams or
final standings. This validates presentation provenance and identity; it does
not independently prove an engine nomination. The supplying adapter is
responsible for that fact. No producer here selects players from their strength,
lineup position or goal events. Until an authoritative rating scale exists,
numeric ratings are rejected, including otherwise plausible values.
Records are accepted only for club/outdoor and must bind exactly to the same
fixture ID and source revision. Unknown fields, malformed UTF-8, foreign teams,
renamed teams, duplicate players, stale references or invalid formations fail
atomically. `source` is either `supplied-records` or
`synthetic-layout-fixture`; neither claims engine authority. National and
indoor remain three-tab reviews and reject nominations from this club-only
path. Available records replace only `eleven` and remove it from
`unknown_fields`. Scores, report events, timeline minutes, tables and all other
review facts remain unchanged. Missing records retain byte-identical defaults.
`tests/fixtures/modern_post_match_eleven.json` is an explicitly synthetic
standalone layout fixture containing `eleven` and its notice. It deliberately
contains no guessed fixture/revision binding. The core test binds it to its
actual synthetic recording; a document renderer test may use the same `eleven`
to cover a filled pitch/list without a product debug option or any change to
the nine-frame recording. These test names are not original game data.
For example, two recorded 2:1 matches shared by four human managers produce:
```json