23. Validation scoreboard and friction summary (scripts/scoreboard.py, 2026-11-21)
- 23.1 One unified scoreboard over auto-discovered ports.
scripts/scoreboard.pydiscovers every*.cpport with a sibling*_orig.cppunderproto/ports/ecnerwala/(and any future Rust-era port directory underproto/ports/that follows the same layout, excluding retiredscout_batch_*,blind_critic_*,hillclimb_*,sim3,beforedirectories). Concurrent port waves are picked up automatically with no manifest to edit. How to reverse: pass--dirsor changediscover_portsinscripts/scoreboard.py.
- 23.2 Contestant-written token counting. Both
.cpand_orig.cppare tokenized by language-aware lexers that strip comments and whitespace;_orig.cppalso reports a library-stripped token count usingbench/corpus_registry.py'sauto_strip(or a sibling.stripfile when present) so template headers and hand-rolled standard structures do not inflate the C++ baseline. Both raw and stripped ratios are recorded. How to reverse: swaptokenize_cp/tokenize_cppor point tocpllexer output.
- 23.3 Adaptive max-size input probing for runtime and peak RSS. When a port has a judge-limit
generator in
bench/corpus_generators.pyorbench/rust_max_n_audit.py, the scoreboard uses it. Otherwise it probesgen/NAME.py 1 <SIZE>upward (8 -> 40 -> 200 -> 1000 -> 5000 -> 25000), stopping when the original exceeds the probe budget (~0.25 s) or the input saturates/caps, falling back to the largestsamples/NAME.*.in. This gives a real max-size measurement for every newly pushed port without hanging on super-linear problems. How to reverse: changeMAX_SIZE_STEPSor add explicit specs tobench/corpus_generators.py.
- 23.4 Baseline diff and
--fastmode.research/scoreboard.jsonis the committed baseline.--fastrunscpl check,cpl fmt --check,cpl lint,cpl build(emitted bytes <= 64 KB), token counts,friction_lint, and theresearch/frictions/*.mdsummary in a few seconds soscripts/check.sh --fastcan gate every push.--checkfails on gate regressions (any passing or new port failing), emitted files over 64 KB or growing > 5% and > 1,024 B, median token ratio regressions (> +0.02),wa_trapregressions, openblockerfriction increases, and (in full mode) p50/p95 runtime or RSS regressions (> 1.10x baseline). How to reverse: adjust threshold constants at the top ofscripts/scoreboard.py.
- 23.5 Custom checker hook
checkers/NAME.py INPUT OUTPUT ANSWERfor constructive ports. Matches thecpl stress(crates/cpl-stress/src/judge.rs) and testlib argument order:INPUTtest file,OUTPUTcandidate stdout,ANSWERoriginal C++ stdout; exit 0 accepts, non-zero rejects with reason on stderr. Bothproto/ports/ecnerwala/gate.shandscripts/scoreboard.pysanity-checkorigagainst itself before judging the C++ build and interpreter, andscripts/scoreboard.pytrackschecker_portsin totals. How to reverse: remove theCHECKERbranch ingate.shandrun_checker/judge_outputinscripts/scoreboard.py.
- 23.6
gen/NAME.py --max, per-port >10% runtime ratchet, dream-gap metrics, andPORTS.mdruntime column.generate_max_inputprefersgen/NAME.py --max(when--maxappears in the generator) over explicit specs and adaptive probing so judge-limit worst-case inputs live beside each port. Full-mode--checkratchets any port withmax(cpp_ms, orig_ms) >= 10 mswhosetime_ratioregresses by > 10% againstresearch/scoreboard.json, reportsp50 <= 1.1x/max <= 1.5xgoal status, and prints the worst 10 runtime ratios.measure_tokensandcompute_totalstrackdream/NAME.cp(dream_tokens,dream_ratio,dream_gap_tokens, aggregate median/p90/max).scripts/ports-page.pyreads cachedtime_ratiovalues fromresearch/scoreboard.jsoninto theRuntimecolumn ofresearch/PORTS.mdwithout re-running. How to reverse: adjustTIME_P50_GOAL,TIME_MAX_GOAL,PERF_FLOOR_MS, orPERF_REGRESSION_RATIOinscripts/scoreboard.pyor remove theRuntimecolumn inscripts/ports-page.py.
- 23.7 Interpreter-vs-C++ ratio ratchet, strict
cp/dreamratchet, andresearch/reviews/taste-score integration. In full mode,scripts/scoreboard.pytimescpl runand the compiled-O2C++ binary on the same input (usingmax_inpwhencpp_ms <= 250 ms, else the largest diff case), reportingratio_p50/ratio_maxagainstINTERP_RATIO_BAR = 10.0andINTERP_RATIO_NORTH_STAR = 5.0(with a20 msfloor to avoid startup noise) and failing--full --checkon> 10%regressions inp50or any port>= 20 ms. In both--fastand--full, any increase in a port'scp/dreamtoken ratio (dream_ratio) fails--check.parse_review_scorereads 1–5 scores fromresearch/reviews/<name>.mdintototals.tasteand theTastecolumn ofresearch/PORTS.md. How to reverse: adjustINTERP_RATIO_BAR,INTERP_RATIO_NORTH_STAR,INTERP_FLOOR_MS, or thedream_ratiocheck inscripts/scoreboard.py.
- 23.8 Friction metadata gate + 10-area stdlib routing, P0 bug-replay & revision goal tests, and worst-20 dream-gap leaderboard.
Normalized all
research/frictions/*.mdreports to canonicalSeverity(blocker|high|medium|low) andGoal it hurtsvalues (0 schema warnings), gated warning growth inscripts/scoreboard.py --check, and addedroute_friction_areamapping every friction to one of the 10 stdlib areas (graphs,trees,ranges,strings,math,flows,containers,geometry,dp,seq) orcore(printed as per-area owner queues in--frictionsand as anAreascolumn onresearch/PORTS.md). Added two live goal-test suites underbench/goal_tests/: (a)bug_replay/(12 P0 contest bug classes classified empirically viacpl check+cpl runasprevented,caught_on_run, orleft_to_diagnose, ratcheted at>= 90%handled and no per-case downgrade); (b)revision/(2 unseen problems + 1 changed requirement each, verified viacpl run, ratchetinglines_touchedagainst baseline). Added a worst-20cp/dreamtoken-ratio leaderboard toscripts/ports-page.py->research/PORTS.mdso the polish lane works worst-first. How to reverse: adjust_AREA_KEYWORDS,BUG_REPLAY_BAR_PCT, or the suites inbench/goal_tests/.
- 23.9 63-case P0 bug-replay suite (per-class rates), 10-problem revision suite, and ratcheted spelling-drift metric.
Expanded
bench/goal_tests/bug_replay/from 12 to 63 cases (>= 5 per P0 class across all 11 AGENTS.md bug classes), evaluatingcpl check+cpl lint(prevented) andcpl run(caught_on_runvsleft_to_diagnose) in parallel with per-class rates (59/63 = 93.7%, 4 honestleft_to_diagnosegaps). Expandedbench/goal_tests/revision/from 2 to 10 unseen problems + 1 requirement change each (10/10 ok,95lines touched). Addedmeasure_spelling_driftoverproto/ports/**/*.cp(tracking both all files and non-retired active+dream files) for constructs with multiple spellings (multitest,sum,first,sort), ratcheted strictly downward againstresearch/scoreboard.jsonso codemods visibly drive drift to 0. Canonical forms live inSPELLING_DRIFT_SPECS(@!multitestper §20; method formsxs.sum(),xs.first(...),xs.sort(...)per §49). How to reverse: flip any construct's"canonical"value inSPELLING_DRIFT_SPECS(1-line edit) or adjust cases underbench/goal_tests/.
- 23.10 Active spelling-drift zero gate, dream-score ratchet, and
check.sh --fast<= 180s wall-time budget. Alignedmeasure_spelling_driftwith §53.1 by exempting canonical free-form generator calls (sum(f(x) for x in xs),first(i for i in ... if ...)), addedscripts/fix-spelling-drift.pyto rewrite non-canonical multitest dividers (@multitest,--- multitest ---,--- with multitest() ---->@!multitest) across active and dream files (driving active/dream drift to 0), and gatedactive_non_canonical == 0in--fast --check. Addedtotals.dream_scores(parsingDream: N/5fromresearch/reviews/*.md) with a baseline ratchet failing on median drop or under-4 growth. Addedopt-level = 1inCargo.toml[profile.dev.package]forcpl-syntax,cpl-check,cpl-ir, andcpl-codegen(matchingcpl-interp) and overlappedrecovery_scoreboardwith the post-nextest checks inscripts/check.sh, cuttingscripts/check.sh --fastwall time from 249s to 84s, recorded intarget/gate-fast-time.json/totals.gate_fastand gated at<= 180s. How to reverse: remove the[profile.dev.package]opt-level = 1entries inCargo.toml, adjustGATE_FAST_BUDGET_S, or relax the active-drift / dream-score checks indiff_against_baseline.
- 23.11 Attributable gate ratchets, merge-safe
.ports.jsonlbaseline (--update PORT...), and expanded ratchets.diff_against_baselinenow takes a gitscope(detect_change_scope) so a commit fails only for regressions in ports/files it changed, or in ports whose emitted C++/perf/dreams changed because of acrates/orstdlib/diff (naming the port and cause); unrelated drift is reported as a warning instead of blocking other lanes. Replaced the globalnew_under_4_maxquota inscripts/review-check.pywith per-change attribution: new or changed ports require a review file (Score: N/5orScore: pending), while scores< 4are tracked and non-blocking. Splitresearch/scoreboard.jsoninto compact summary JSON plus sorted 1-line-per-portresearch/scoreboard.ports.jsonland added--update PORT...to update only named port lines without touching summary JSON, so concurrent lanes rebase cleanly. Added strict ratchets for interpreter ratiop50and>10xcount (bar<= 10x, north star<= 5x), dream-compile count (never fewer), and construct-split spelling drift (getter_parens,where_filter,dot_pow,multitest,turbofish, plussum/first/sort). How to reverse: passscope=Nonetodiff_against_baseline, restorenew_under_4_maxinscripts/review-check.py, or inlineportsback intoresearch/scoreboard.json.
- 23.12 Input-hash caching + parallel post-nextest tracks in
scripts/check.sh --fast, plus.githooks/pre-push. Addedscripts/check_cache.py(deterministic SHA-256 over sorted input paths, stored undertarget/check-cache/<step>.sha256, disabled via--no-cacheorCHECK_NO_CACHE=1or--full) to cache unchangedclippy,cpl_build,nextest_doc,stdlib_test,recovery,scoreboard_fast,site_bundle, anddocs_sitesteps without dropping coverage, and ranvalidation scoreboardin parallel withsite/bundle.py->docs gate + site testsandrecovery_scoreboard. Cold--fastwall time dropped from 188s to 163s (<= 180sbudget), and unchanged/rebased reruns complete in ~1.3s. Added.githooks/pre-pushto reject merge conflict markers, invalid changed JSON/JSONL, and brokencargo check --workspace --all-targetsafter rebases (which skippre-commit). How to reverse: pass--no-cache/ removescripts/check_cache.pycalls inscripts/check.sh, or delete.githooks/pre-push.