aien-sovereign-core-mv
AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.
Brought by drakestapleton
aien-sovereign-core-mv / docs / campaigns / scoring / SCORING-v5.md
| 1 | # Scoring contract v5 (shared by campaigns) |
| 2 | |
| 3 | ```text |
| 4 | contract = "scoring-v5" |
| 5 | status = FROZEN at the commit that adds this file |
| 6 | scorer = docs/campaigns/scoring/score-rows.sh (shell + jq) |
| 7 | tests = docs/campaigns/scoring/test-scoring-v5.sh |
| 8 | reason = NEXT-PHASE-2 v4 review: next-phase-2/make-receipt.sh scores a row PASS when |
| 9 | every repetition it finds is PASS, whatever their number. A row with 2 of |
| 10 | 3 required repetitions, or 1 of 3, scores PASS. |
| 11 | applies_to = receipts of NEXT-PHASE-2 v5 and later; NEXT-PHASE-1 v6 may adopt it |
| 12 | ``` |
| 13 | |
| 14 | ## 1. What is not changed |
| 15 | |
| 16 | `next-phase-2/make-receipt.sh`, receipt `e401fffe...`, `VERDICT-v4.md` and `ACCEPTANCE-v4.md` |
| 17 | are untouched. The v4 receipt stays reproducible because its scorer is the same bytes. v4 is a |
| 18 | v4 result under the v4 rule; scored under this contract it also PASSes (section 6). |
| 19 | `next-phase-1/` is not touched. |
| 20 | |
| 21 | ## 2. Declaration |
| 22 | |
| 23 | The case set is read from a frozen declaration file (JSON), never inferred from the results. |
| 24 | It is transcribed from the frozen acceptance file and names that file (`frozen_by`). |
| 25 | |
| 26 | ```text |
| 27 | { contract: "scoring-v5", campaign: <name>, frozen_by: <acceptance file>, |
| 28 | rows: [ { row, role: "case"|"control", reps: <integer >= 1>, expected: "PASS", |
| 29 | control: <row id> | "F0" | null, not_applicable: <bool> } ] } |
| 30 | ``` |
| 31 | |
| 32 | `expected` must be `"PASS"`. A bad declaration (missing field, reps < 1, duplicate row id, |
| 33 | a control that names no declared row) gives verdict ERROR. `"F0"` is an external control: its |
| 34 | value is passed in a third file (`{"F0": true}`); absent means false. |
| 35 | |
| 36 | ## 3. Results |
| 37 | |
| 38 | One JSON object per line, one line per run: `row`, `rep` (integer >= 1), `verdict` (PASS, |
| 39 | FAIL, NOT_RUN, NOT_APPLICABLE or UNVERIFIED). A NOT_APPLICABLE run also needs a non-empty |
| 40 | `outcome`, which is its stated reason. A run id is `(row, rep)`. |
| 41 | |
| 42 | ## 4. Row rules (first matching rule wins) |
| 43 | |
| 44 | 1. Two records with the same run id: ERROR. Never counted twice. |
| 45 | 2. Any counted repetition FAIL: FAIL. |
| 46 | 3. NOT_APPLICABLE on a row whose declaration does not list `not_applicable`: FAIL. |
| 47 | 4. A record of the row that is not well formed (no integer `rep`, no valid `verdict`, a |
| 48 | NOT_APPLICABLE without reason), or any UNVERIFIED run: INCOMPLETE. |
| 49 | 5. Fewer than `reps` distinct required repetitions (1..reps): INCOMPLETE; none at all: NOT_RUN. |
| 50 | 6. Any NOT_RUN repetition: NOT_RUN. |
| 51 | 7. NOT_APPLICABLE runs: NOT_APPLICABLE only if every repetition is NOT_APPLICABLE; mixed with |
| 52 | PASS it is INCOMPLETE. NOT_APPLICABLE never counts as PASS and never satisfies a required |
| 53 | repetition. |
| 54 | 8. Otherwise (exactly `reps` repetitions, all PASS): PASS. |
| 55 | |
| 56 | Control: a row with a `control` whose rule 8 result is PASS or NOT_APPLICABLE is NOT_RUN |
| 57 | unless its control row scored PASS (a control row must have its declared expected result, |
| 58 | PASS) or its external control is true. A control row that does not score PASS is itself FAIL, |
| 59 | INCOMPLETE, ERROR or NOT_RUN by the rules above. |
| 60 | |
| 61 | Extra runs: a run with `rep` above `reps`, or for a row not in the declaration, is listed |
| 62 | under `extras` and never counted. It cannot raise or lower a verdict. |
| 63 | |
| 64 | ## 5. Campaign verdict |
| 65 | |
| 66 | PASS only if there is no malformed line (a line that is not a JSON object with a string |
| 67 | `row`) and every row is PASS, or NOT_APPLICABLE where declared (named in `not_applicable`, |
| 68 | not counted as a PASS). Otherwise the first of: ERROR, FAIL, INCOMPLETE, NOT_RUN. The scorer |
| 69 | exits 0 only for PASS, 1 for any other verdict, 2 if it cannot score (fail closed). |
| 70 | |
| 71 | ## 6. Check against v4 |
| 72 | |
| 73 | `declarations/np2-v4.decl.json` is the v4 case set (27 cases, 7 control rows; 3 repetitions |
| 74 | per injected row, C6i once, controls once; C6d may be NOT_APPLICABLE). The v4 receipt's |
| 75 | `controls` and `rows` scored with it and `F0 = true`: PASS, C6d NOT_APPLICABLE, 33 rows PASS. |
| 76 | The same runs with one C7c repetition removed: INCOMPLETE. The C3 control row (fixture |
| 77 | backend) is a receipt-level check and stays outside this scorer. |