|
| 1 | +# Consolidation scoreboard |
| 2 | + |
| 3 | +`grida_dev scoreboard` is the consolidation program's comparison instrument. |
| 4 | +It measures the legacy engine and the chassis against the same declared oracle |
| 5 | +and against each other. The legacy engine is context, never the oracle. |
| 6 | + |
| 7 | +The instrument is present but scoring is not yet authorized. Registry decision |
| 8 | +FLIP remains open in |
| 9 | +[gridaco/nothing#49](https://github.com/gridaco/nothing/issues/49), and the |
| 10 | +[decision proposal](../../docs/wg/consolidation/flip-rule.md) is explicitly |
| 11 | +unratified. Until the owner records GO and that proposal carries a ratification |
| 12 | +record, `scoreboard run` refuses before corpus validation or either renderer is |
| 13 | +called. The committed Chromium images are oracle inputs, not scores. |
| 14 | + |
| 15 | +## Corpus contract |
| 16 | + |
| 17 | +Scoreboard v0 uses the closed |
| 18 | +[`svg-rect-path-v0` corpus](../../fixtures/scoreboard/svg-rect-path-v0/corpus.json). |
| 19 | +Its manifest fixes the ordered denominator, source digests, 128×128 viewport, |
| 20 | +oracle paths, and an explicit excluded-family patrol ledger. Each included row |
| 21 | +sends the identical checked-in SVG bytes to the legacy SVG entry point, the |
| 22 | +chassis's bounded authored-Base entry point, and Chromium. No model bridge or |
| 23 | +oracle-only source rewrite is permitted. |
| 24 | + |
| 25 | +The corpus is intentionally limited to the direct static rectangle/path |
| 26 | +intersection already accepted by both engine entry points. Unsupported source |
| 27 | +families remain visible in the exclusion ledger. `scoreboard check` requires |
| 28 | +both entry points to accept every row in this fixed v0 corpus. During an |
| 29 | +authorized report run, the same preflight is retained as per-engine evidence: |
| 30 | +an entry-point rejection becomes `UNSUPPORTED` without calling that renderer, |
| 31 | +while a failure after an accepted preflight remains an error. A later admitted |
| 32 | +row therefore stays in the denominator with an explicit disposition rather |
| 33 | +than being silently removed or classified by matching diagnostic text. |
| 34 | + |
| 35 | +## Commands |
| 36 | + |
| 37 | +Run commands from the repository root. |
| 38 | + |
| 39 | +```sh |
| 40 | +# Validate the closed corpus, source/oracle hashes, bake provenance, and both |
| 41 | +# parser entry points. This performs no rasterization or image comparison. |
| 42 | +cargo run -p grida_dev -- scoreboard check |
| 43 | + |
| 44 | +# Deliberately sealed until FLIP is ratified on gridaco/nothing#49. |
| 45 | +cargo run -p grida_dev -- scoreboard run |
| 46 | + |
| 47 | +# Derive a fresh review candidate from an authorized, complete report. |
| 48 | +# This never overwrites the committed baseline. |
| 49 | +cargo run -p grida_dev -- scoreboard bless |
| 50 | +``` |
| 51 | + |
| 52 | +The shared path options are `--corpus`, `--report`, and `--baseline` where |
| 53 | +applicable. `bless` also accepts `--candidate`. Defaults are: |
| 54 | + |
| 55 | +| Artifact | Default | |
| 56 | +| ------------------ | ------------------------------------------------------- | |
| 57 | +| Corpus | `fixtures/scoreboard/svg-rect-path-v0/corpus.json` | |
| 58 | +| Report | `target/scoreboard/report-v0.json` | |
| 59 | +| Baseline | `fixtures/scoreboard/svg-rect-path-v0/baseline-v0.json` | |
| 60 | +| Baseline candidate | `target/scoreboard/baseline-v0.candidate.json` | |
| 61 | +| Hard run budget | 120 seconds | |
| 62 | + |
| 63 | +The baseline is intentionally absent before the first authorized score. The |
| 64 | +ratified active configuration must declare that absence explicitly; after the |
| 65 | +first baseline lands, it pins the required baseline digest. A missing or |
| 66 | +mistyped path therefore cannot silently disable regression checks. The |
| 67 | +120-second budget is part of the proposed rule identity and has no command-line |
| 68 | +override. The timer starts before corpus, oracle, parser, renderer, comparator, |
| 69 | +and prior-baseline validation. Those stages run behind a terminal-command |
| 70 | +watchdog that returns at the deadline even if an in-process stage is blocked. |
| 71 | +The worker has no report path; only a complete in-budget result returns to the |
| 72 | +caller that may publish the create-new report. |
| 73 | + |
| 74 | +## Chromium bake |
| 75 | + |
| 76 | +The checked-in Chromium PNGs are produced by |
| 77 | +[`scoreboard_bake_chromium.ts`](./scripts/scoreboard_bake_chromium.ts). The |
| 78 | +script verifies each source digest, transports that exact hashed buffer to a |
| 79 | +JavaScript-disabled, network-disabled browser context without DOM mutation, |
| 80 | +style injection, or animation control, captures it twice, and requires |
| 81 | +byte-identical PNG output. Repository inputs and output parents must contain no |
| 82 | +symlink components. It records the Chromium version, corpus digest, |
| 83 | +script digest, capture policy, and per-row oracle digests in |
| 84 | +[`oracle-bake.json`](../../fixtures/scoreboard/svg-rect-path-v0/oracle-bake.json). |
| 85 | + |
| 86 | +The bake command is create-new-only. Its default outputs must not already |
| 87 | +exist; a re-bake never replaces the committed oracle in place. Prepare a fresh |
| 88 | +corpus candidate that preserves the ordered row/source identities but declares |
| 89 | +fresh repository-relative `oracle_bake` and per-row `oracle` paths, then pass |
| 90 | +all three matching paths: |
| 91 | + |
| 92 | +```sh |
| 93 | +pnpm --filter @grida/reftest exec tsx \ |
| 94 | + ../../crates/grida_dev/scripts/scoreboard_bake_chromium.ts \ |
| 95 | + --corpus target/scoreboard/oracle-candidate/corpus.json \ |
| 96 | + --out target/scoreboard/oracle-candidate/chromium \ |
| 97 | + --bake-manifest target/scoreboard/oracle-candidate/oracle-bake.json |
| 98 | +``` |
| 99 | + |
| 100 | +## Report and baseline laws |
| 101 | + |
| 102 | +An authorized report records exact corpus, oracle-bake, scoring-method, rule, |
| 103 | +and run identities. Every included row has one tagged cell for each engine and |
| 104 | +all three comparisons: legacy-vs-oracle, chassis-vs-oracle, and |
| 105 | +legacy-vs-chassis. Comparison cells carry integer differing/scoring-pixel |
| 106 | +counts or a reasoned unavailable state. Coverage obeys |
| 107 | +`included = scored + unsupported + error` for each engine. |
| 108 | + |
| 109 | +The baseline is a deterministic projection of a valid report. It excludes |
| 110 | +host, timestamp, output paths, prior-baseline pointer, and other run-local |
| 111 | +data. Baseline candidates are direct create-new files under |
| 112 | +`target/scoreboard/`; symlinked directory components are refused, and a |
| 113 | +candidate cannot be written directly to the committed baseline path. Blessing |
| 114 | +fails closed |
| 115 | +for an unratified rule, identity mismatch, incomplete coverage, missing |
| 116 | +comparison triple, invalid provenance, or an over-budget run. A scored row |
| 117 | +becoming unsupported/error, or an engine-to-oracle differing-pixel count |
| 118 | +increasing, is a regression; aggregates cannot hide it. |
| 119 | + |
| 120 | +The threshold and eligibility laws belong to the owner-gated WG decision, not |
| 121 | +to the report or bless command. See the consolidation |
| 122 | +[method](../../docs/wg/consolidation/method.md) for the full gate lifecycle. |
| 123 | + |
| 124 | +## CI posture |
| 125 | + |
| 126 | +The consolidation workflow runs the synthetic scoreboard contract tests and |
| 127 | +`scoreboard check` when engine scope changes. It does not invoke |
| 128 | +`scoreboard run` while FLIP is unratified. Once the owner records GO, enabling |
| 129 | +the real run and committing the first baseline are a separate consolidation |
| 130 | +step with their own gate evidence. |
0 commit comments