John looked at R41's proof shots and named three faults. All three are fixed, at zero draw cost, and every lane corrected somebody's numbers on the way — including its own. E-LOOK (§42.1+§42.2a) — THE PREMISE WAS WRONG. "The pub props have no texture" (my brief, quoting E's own R41 note) is false: all 37 carry COLOR_0 and three.js renders it. The colour was BLEACHED — jukebox at saturation 0.02, 15 assets under 0.05; what the source library called colour was baked AO. So the fix was a palette imposed on colour already present, in place: 46 assets, draw delta +0 and tri delta +0 on every one, proved the honest way — the concatenated POSITION/NORMAL/TEXCOORD/index bytes are sha1-identical to R41, so footprints and origins provably did not move. (A first-pass bbox check ignored node rotations and "found" 3 phantom violations; thrown out for the byte comparison.) The banquette was 1990s office teal and went burgundy; the beer umbrella was white and went brewery green. THE DECK, diagnosed before being touched: 7 greys, chassis 0.05 luminance on a 0.033 bench = 1.21:1, and the one high-contrast feature was INSIDE-OUT (white ring around a dark disc; a turntable is a dark record on a light platter). Now Technics silver at 6.74:1, black vinyl, red start/stop. Node contract re-read from the shipped GLB: 4/4 + 1/1 PASS. Filed to R43, not fixed: deck_1200_rigged has NO PLINTH (bottom 43mm of 119mm lost to R41 join damage). E-CAST (§42.3) — 19 of 24 ship. Rejected: comical_luchador_01 (Mixamo Ch43, purple mask reading EL CHUPACABRA, identified from the file's own material name), a 3-heads-tall cartoon child, a robed wuxia elder, a WW2 infantryman — and dj_phrtt_01, AN UNCLOTHED BODY whose only texture is a bare-skin atlas, which was in the DEFAULT crowd and live on the depot. It is the R41 deny-list's failure class through a different door: an innocent name from another pipeline. Only rendering all 24 and LOOKING found it. Ruling 2 (prefer CC0) was REFUSED ON MEASUREMENT: Quaternius is 25 nodes / 23 joints and ZERO of 64 canonical tracks bind — it would have loaded silently and never animated. Replacements came from Mixamo's Ch## pool, filtered to the contract-clean 65-bone family (candidates ran 65..99 bones; named characters carry facial/hair bones). THE LICENCE GAP WAS UNREAD, NOT MISSING: every source FBX carries ApplicationVendor "Mixamo, Inc." internally. Adobe royalty-free, no attribution owed. B's amber rows are now real. B (§42.5) — MY ASSIGNED FIX WAS USELESS AND B PROVED IT. document.fonts.ready shipped, then measured: the atlas canvases are already byte-identical across boots, the game ships NO webfonts (document.fonts.size === 0), and ready fires 50ms BEFORE the first fillText. The real cause of unreproducible bookmarks is the wall-clock CROWD — 983 changed px of 921,600, ALL in the pedestrian band; 0 px with the crowd out. New DBG.freeze() takes stable bookmarks 2/5 -> 5/5. Also found: ?pop=0 boots 140 citizens (0 is falsy against the default). THE BENCH: D's filing correct on both counts. Front-vs-road 90.0deg -> 0.0deg, min=med=max over 60/60 instances; the streetlight arm now reaches 1.05m over the road where it reached 0.00. Both used a base yaw that pointed +Z down the street while their own comments claimed otherwise — the side term was already right, which is why it survived 41 rounds of reading. Also: on any box with CDN access 9 of 60 benches are the depot GLB, 90deg out from the house law — normalised at the geometry, once, at load. benchStops(plan) exported as one truth. C (§42.2b) — 122 vs 123 WAS THE CAMERA ASPECT, and nobody was wrong. Draw counts are post-frustum-cull and the sweep camera inherits the window aspect: 1.25->116, 1.60->122 (C's harness), 1.778->123 (F's), 2.37->124. Pinned MEASURE_ASPECT=16/9 with a 1.25 control. E's "keep the bench dark" advice was measured and declined with reason (deck-vs-bench was already 4.73:1, over threshold). "Reads as a black box" is a claim about pixels, so C measured pixels: near-black in the booth crop 57.5% -> 26.7%, distinct colours 228 -> 389. Bench rebuilt 3->7 boxes with an open record bay; headphones on the mixer; faceDoor aims booths at the player's entry — alignment within 45deg went 49% -> 92%. Two bugs found by looking: a fitting could be planted INSIDE A WALL (0.77m of a 0.86m half-depth in plaster), and every booth part sat 25mm sunk into its own worktop. D (§42.4) — five swaps IN PLACE at the same index (pickRig indexes these arrays and pedIndex is in the identity signature and the impostor atlas; removal would renumber the town). Identity signature pre- vs post-swap: 0 differing lines of 150 — who each citizen is did not move, only which body they wear. dj_phrtt_01 verified gone AT THE WIRE, not from source: a fresh default boot fetches 32 ped GLBs, none retired. THE CONTROL ARM FOUND A 41-ROUND-OLD BUG: the ped being RETIRED, comical_boy_01, binds only 3,132 of 3,460 tracks — six thumb bones lack the mixamorig prefix. It had been silently dropping six tracks per clip since it shipped. Testing the thing being thrown away found it. Imported B's benchStops mid-round: sitters now 0.0deg to the road, signatures byte-identical across the rewire. Corrected F's filing: the browse smoke was flaky-by-construction (a 16-25s race against a live sim), not deterministically red. F (§42.6) — qa.sh --strict 24 passed / 0 failed / 0 warn / 0 skipped. New Gate 11: period law (0/5 banned; CONTROL: R41's roster trips all five) and roster licence (24/24, 0 unverified; CONTROL: an amber row turns 20 red). r41_shots.py promoted warn -> strict. R41'S BYTE-HASH BAN IS REVERSED AND ITS STATED REASON WITHDRAWN AS WRONG. A gate may pin a hash under five in-run assertions (classic+flags boot, freeze().stillLive all-false, a second freeze removing 0 draws, settle until DBG.info() stops changing, hash with the dbg panel hidden): 5/5 bookmarks now pin to one sha256 over 3 fresh boots. Two findings got it there — the chunk streamer (a fixed settle is a bet on load) and the fps readout, which with everything else frozen was the last thing moving at 53-62 px. ?pop=0 fixed (Number.isFinite) — a no-op for 35 rounds. Three red flags_check gates fixed. Street: noon 282 · NIGHT 291/300 — the nine-draw margin INTACT, every R41 row reproducing to the digit. Interior at pinned 16:9: 123 @ dept/auto, margin 227. selfcheck 157,647/157,647, 0x5f76e76 unmoved. No tag — John's playtest rules the epoch. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
314 lines
21 KiB
JavaScript
314 lines
21 KiB
JavaScript
#!/usr/bin/env node
|
||
/**
|
||
* PROCITY Lane F — R42 §42.6 · THE ROSTER GATES (rulings 1 and 3), node, zero deps, ~0.1 s.
|
||
*
|
||
* node tools/qa/r42_roster.mjs --gate period # ruling 1 — no banned-genre body ships
|
||
* node tools/qa/r42_roster.mjs --gate licence # ruling 3 — every shipped ped has a credits row
|
||
* node tools/qa/r42_roster.mjs # both
|
||
*
|
||
* WHY THIS IS A SOURCE GATE AND NOT A DIRECTORY LISTING — Lane D's §42.4 filing, and it is right.
|
||
* The five retired bodies are still ON DISK (`web/models/peds/`), and one of them — `dj_phrtt_01` —
|
||
* is also still live on the shared depot (measured: 200, 712,792 B; the other four are 404). Lane E
|
||
* deliberately did not delete them mid-wave because `rigs.js` loads by literal name and deleting a
|
||
* file would shorten a pool, renumber every `pickRig` index and move the crowd's identity. So "what
|
||
* ships" is `PED_NAMES` in `web/js/citizens/rigs.js` — the only list the game reads — and a gate
|
||
* pointed at the directory would go red on files that no longer ship while staying green on a body
|
||
* that quietly reappeared in the source. This file reads the source.
|
||
*
|
||
* ARMS (period):
|
||
* 1. no banned body in PED_NAMES — ruling 1, the R42 audit's five rejects by name
|
||
* 2. all five replacements present — the GREEN control: the gate can tell them apart
|
||
* 3. pool shape 17/5/2 unchanged — the swap was in-place; a delete renumbers the town
|
||
* 4. no banned name on a LOADABLE surface — web/js/**, web/*.html, web/assets/manifest.json
|
||
* 5. quarantine: every ped GLB on disk is shipped, a base clip, or DECLARED withdrawn in credits
|
||
* ARMS (licence):
|
||
* 6. every shipped ped resolves to a credits.json entry with a real licence (no `unverified`)
|
||
* 7. every REQUIRED entry that a ped resolves to carries a non-empty attribution string
|
||
*
|
||
* CONTROLS, run every time, on the same predicates — a gate that has never fired is a gate with a
|
||
* typo in it. Arms 1/2/3 are re-run against a SYNTHETIC roster carrying the retired names (must go
|
||
* RED on 5) and against one with a replacement removed (must go RED). Arm 4's matcher is fired at a
|
||
* synthetic line. Arms 6/7 are re-run against a synthetic credits doc whose roster row has been set
|
||
* back to `unverified` (must go RED on the 20 peds that row covers) and against one with the DJ row
|
||
* deleted (RED on `dj_techno_01` — and arm 8 explains why only one: `models/peds/woman_*.glb` still
|
||
* matches the three `woman_dj_*` bodies, which is a real defect in credits.json's globs, reported).
|
||
* The controls are IN-MEMORY on purpose: the deny-list gate plants on disk because it is a
|
||
* whole-tree byte scan and there is no other way to exercise it; these are pure functions of two
|
||
* documents, so mutating a parsed copy runs the identical predicate with no chance of a crashed
|
||
* run leaving a plant behind in a tree five lanes are working in.
|
||
*/
|
||
import fs from 'node:fs';
|
||
import path from 'node:path';
|
||
import url from 'node:url';
|
||
|
||
const ROOT = path.resolve(path.dirname(url.fileURLToPath(import.meta.url)), '..', '..');
|
||
const argv = process.argv.slice(2);
|
||
const GATE = argv.includes('--gate') ? argv[argv.indexOf('--gate') + 1] : 'all';
|
||
|
||
const fails = [];
|
||
const FAIL = (m) => { fails.push(m); console.log(` \x1b[31m✗ FAIL\x1b[0m ${m}`); };
|
||
const OK = (m) => console.log(` \x1b[32m✓\x1b[0m ${m}`);
|
||
const head = (m) => console.log(`\n\x1b[1m${m}\x1b[0m`);
|
||
const note = (m) => console.log(` \x1b[33m·\x1b[0m ${m}`);
|
||
|
||
// ── THE BANNED FIVE — Lane E §42.3-B/C, verbatim, with the reason each was rejected ───────────────
|
||
// Ruling 1: PROCITY is 1990s Australia. Ruling 5 of the R41 deny-list class also applies to the last
|
||
// one: a name deny-list could never have caught it, because its NAME is innocent — it took a render.
|
||
const BANNED = {
|
||
comical_luchador_01: 'ruling 1 — a purple masked luchador, chest reads EL CHUPACABRA (Mixamo Ch43)',
|
||
comical_boy_01: 'ruling 1 — a ~3-heads-tall cartoon child (Mixamo Ch09); ALSO a real contract break, ' +
|
||
'six thumb bones without the `mixamorig:` prefix, 3132/3460 bindable tracks (Lane D §42.4)',
|
||
man_elder_01: 'ruling 1 — a robed wuxia/fantasy elder in purple and gold (Mixamo Ch39)',
|
||
man_soldier_ww2_01: 'ruling 1 — a WW2 infantryman, helmet and webbing (Mixamo Ch49)',
|
||
dj_phrtt_01: 'NOT A PERIOD MISS — an UNCLOTHED body. Its single 1024² atlas is bare skin end to ' +
|
||
'end; there is no garment on the asset. It was in the DEFAULT crowd (opts.djs defaults to dance) ' +
|
||
'and is live on the shared depot. Lane E §42.3-C.',
|
||
};
|
||
// The five that replaced them, at the same index in the same pool (Lane D §42.4 swap table).
|
||
const REPLACEMENTS = {
|
||
man_casual_04: ['normal', 6], person_casual_01: ['normal', 9],
|
||
man_smart_01: ['djs', 4], woman_smart_02: ['comical', 0], person_youth_01: ['comical', 1],
|
||
};
|
||
const POOL_SHAPE = { normal: 17, djs: 5, comical: 2 };
|
||
// Motion clips live in the same directory and are not bodies. `_rotOnly`/`canonRig` load these by
|
||
// literal name in rigs.js; they carry their own credits rows (mixamo-clips, rokoko-mocap).
|
||
const BASE_CLIPS = new Set(['walk', 'idle', 'sit', 'look',
|
||
'dance_party', 'dance_medium', 'dance_drink', 'dance_sway']);
|
||
|
||
// ── the two documents this gate is a pure function of ─────────────────────────────────────────────
|
||
const RIGS = path.join(ROOT, 'web/js/citizens/rigs.js');
|
||
const CREDITS = path.join(ROOT, 'web/assets/credits.json');
|
||
const PEDDIR = path.join(ROOT, 'web/models/peds');
|
||
|
||
/** Parse `export const PED_NAMES = { … }` out of rigs.js WITHOUT importing it (rigs.js imports
|
||
* three.js, which node cannot resolve from here). Comments are stripped first — every pool in that
|
||
* object carries a trailing `// was …` comment naming the body it replaced, and a naive regex over
|
||
* the raw text finds the retired names inside those comments and reports a false RED. Measured:
|
||
* the first cut of this gate did exactly that and failed on all five. */
|
||
function readPedNames(src) {
|
||
const m = src.match(/export const PED_NAMES\s*=\s*\{([\s\S]*?)\n\};/);
|
||
if (!m) return null;
|
||
const body = m[1].replace(/\/\/[^\n]*/g, '').replace(/\/\*[\s\S]*?\*\//g, '');
|
||
const out = {};
|
||
for (const pm of body.matchAll(/(\w+)\s*:\s*\[([^\]]*)\]/g))
|
||
out[pm[1]] = [...pm[2].matchAll(/'([^']+)'|"([^"]+)"/g)].map((x) => x[1] || x[2]);
|
||
return Object.keys(out).length ? out : null;
|
||
}
|
||
const shipped = (roster) => Object.values(roster).flat();
|
||
|
||
/** glob a credits `files` pattern (`models/peds/man_*.glb`, `vendor/addons/**`) against a repo path. */
|
||
function globMatch(pattern, p) {
|
||
const rx = new RegExp('^' + pattern
|
||
.replace(/[.+^${}()|[\]\\]/g, '\\$&')
|
||
.replace(/\*\*/g, ' |