Skip to content

armgit / kiln

Public Imported from GitHub
0

Build and revise procedural 3D assets with your coding agent. Local MCP server, CLI and TypeScript engine with rendered review, editable source and GLB export.

17.3 KB
Raw Blame
// M3 rows of the acceptance matrix (TASK-M3.md deliverables; SPEC 24: M3 is done when P-31 to P-35 pass). Idempotent: each
// listed row is replaced whole (its subject kept), every other row is left as it is, and the summary is recounted from the
// rows. Every evidence path must exist. Then `scripts/render-report-matrix.ts` regenerates REPORT.md's matrix section.
// The counted runs are those on the final m3 build (after the 20:05 tractorTouch string revert; desktop label m3-final,
// tablet suffix -final); the earlier m3 runs are listed after them as history.
// Usage: bun scripts/update-m3-matrix.ts
import assert from 'node:assert/strict';
import { existsSync } from 'node:fs';
import { readFile, writeFile } from 'node:fs/promises';
import { resolve } from 'node:path';

const root = resolve(import.meta.dir, '..'), path = resolve(root, 'evidence/acceptance-matrix.json');
const matrix = JSON.parse(await readFile(path, 'utf8')) as { date: string; notes?: string; summary: Record<string, Record<string, number>>; checks: any[] };
const T = 'evidence/tablet-2026-09-29';
const m2Contract = ['evidence/m2/contract/r33-auto/browser-results.json', 'evidence/m2/contract/r33-webgl2/browser-results.json', 'evidence/m2/contract/r34-auto/browser-results.json', 'evidence/m2/contract/r34-webgl2/browser-results.json'];
const m1Contract = ['evidence/m1/qualification-round3.json', 'evidence/m1/browser-auto-c03-c04/browser-results.json', 'evidence/m1/browser-webgl2-c03-c04-callback/browser-results.json'];
const contract = ['evidence/m3/contract/r34-auto-m3-final/browser-results.json', 'evidence/m3/contract/r34-webgl2-m3-final/browser-results.json', 'evidence/m3/contract/r34-auto-m3/browser-results.json', 'evidence/m3/contract/r34-webgl2-m3/browser-results.json'];
const b09Final = ['evidence/m3/b09/m3-final-webgpu/results.json', 'evidence/m3/b09/m3-final-webgl2/results.json', `${T}/b09-webgpu-final/results.json`, `${T}/b09-webgl2-final/results.json`];
const b09 = [...b09Final, 'evidence/m3/b09/m3-webgpu/results.json', 'evidence/m3/b09/m3-webgl2/results.json', `${T}/b09-webgpu/results.json`, `${T}/b09-webgl2/results.json`, `${T}/b09-webgl2-attempt2/results.json`];
const tiering = ['evidence/m3/tiering/m3-final-webgpu/results.json', 'evidence/m3/tiering/m3-final-webgl2/results.json', 'evidence/m3/tiering/m3-webgpu/results.json', 'evidence/m3/tiering/m3-webgl2/results.json'];
const tabletTier = [`${T}/tier/tier-auto-final.json`, `${T}/tier/tier-webgl2-final.json`, `${T}/tier/tier-auto.json`, `${T}/tier/tier-webgl2.json`];
const soak = [`${T}/soak/assigned-living-orbit.json`, `${T}/soak/high-living-orbit.json`, `${T}/soak/assigned-living-route.json`, `${T}/soak/assigned-tractor-drive.json`];
const hub = ['evidence/perf/hub-2026-09-29/README.txt', 'evidence/perf/hub-2026-09-29/results/comparison.json'];
const unit = 'evidence/m3/unit-full.log', scope = 'Farm m3 outputs (r34 pack), WebGPU and forced WebGL2; the owner\'s Galaxy Tab S9 FE for the device rows';
const recorded = 'M3 (round 5)';
type Row = { status: 'pass' | 'fail' | 'deferred'; reason: string; evidence: string[]; deferredPortion?: string; scope?: string; acceptedUnder?: string; m1?: string };
const rows: Record<string, Row> = {
  'P-01': { status: 'pass', reason: 'B-01 passes on the Farm outputs of both releases (M2) and on the m3 outputs (M3), each on both backends (zero-size container, then onReady exactly once); every parity capture reached onReady with the six phase texts. Time to ready (X-04) was measured on the hub and fails on WebGPU (see X-04).',
    evidence: [...m2Contract, contract[0]!, contract[1]!], scope: 'Farm r33, r34 and m3 outputs, WebGPU and forced WebGL2' },
  'P-11': { status: 'pass', reason: 'U-06 stream counts pass; B-06 passes, including the SPEC 19.7 stream crop at the mill bank (144 of 144 tiles on both backends); B-13 (M3) passes, including the stream crop after a governor step and a resize.',
    evidence: ['evidence/m2/world/summary.json', 'evidence/parity/m2b-static-02/results.json', 'evidence/parity/m2b-static-02/stream-crop/stream-crop.json', tiering[0]!, tiering[1]!], scope: 'Farm r33 and r34 (M2) and m3 (M3) outputs, WebGPU and forced WebGL2' },
  'P-16': { status: 'pass', reason: 'The Farm tier table (tiers.ts, SPEC 15; live ladder grass only, R5-01) passes U-15 and the Farm tier tests; B-10 passes on m3 on both backends (emulated S24+, Tab S9 FE, WebGL2 phone, Save-Data and desktop profiles each start on the tier the table predicts); on the real tablet the classification from its own adapter strings assigns economy on WebGPU (arm, valhall) and minimal on WebGL2 (ANGLE Mali-G68, D-03), as predicted.',
    evidence: ['packages/farm/src/tiers.ts', ...tiering, ...tabletTier, unit], scope },
  'P-31': { status: 'pass', reason: 'B-05 (ten mount and unmount cycles, teardown and listener audit, C-03/C-04) passes on the m3 outputs on both profiles.', evidence: contract, scope },
  'P-32': { status: 'pass', reason: 'B-09 passes on the final m3 build with Chrome touch emulation on both backends (16 of 16) and with real touch on the tablet (CDP Input.dispatchTouchEvent into the device Chrome, no emulation) on both backends (14 of 14; the safe-area and mouse-layout steps are emulation-only and skipped on the device). Earlier m3 runs are retained; there the first tablet WebGL2 attempt failed only because the WebGPU run\'s help dismissal persisted in the device Chrome\'s storage (the runner now clears its own origin first). D-22: joystick, drag look, pinch zoom, one context tap target, no button pads on touch.',
    evidence: b09, scope },
  'P-33': { status: 'pass', reason: 'U-15 and U-16 pass; B-10 and B-13 pass on m3 on both backends; on the tablet the assigned tier holds with 0 governor changes and 0 locks over 210 s (X-10).', evidence: [...tiering, ...tabletTier, soak[0]!, unit], scope },
  'P-34': { status: 'pass', reason: 'B-11 and B-12 pass on the m3 outputs on both profiles; the touch HUD passes axe in overview, play, help, context and driving, 44 px targets and text contrast (B-09 P-34 step, emulated and on the tablet); the site\'s 390 px HUD overlap is fixed (B-09 layout matrix at 360 to 430 px, portrait and landscape, touch and mouse).',
    evidence: [...contract, ...b09Final], scope },
  'P-35': { status: 'pass', reason: 'B-11 passes on the m3 outputs on both profiles: reduced motion freezes ambient motion, the page pauses when hidden (a second tab) and resumes, and the Farm door flow runs.', evidence: contract, scope },
  'U-15': { status: 'pass', reason: 'Kit coverage (M1) and the Farm tier table tests (M3: S24+, Tab S9 FE, desktop, WebGL2 phone, Save-Data, the one-level tiers).', evidence: ['evidence/m1/unit-coverage.md', 'packages/farm/tests/unit/tiers.test.ts', unit] },
  'U-16': { status: 'pass', reason: 'Kit coverage (M1); in the browser on m3, B-10 replays the governor traces through the Farm ladder.', evidence: ['evidence/m1/unit-coverage.md', tiering[0]!, tiering[1]!, unit] },
  'U-18': { status: 'pass', m1: 'pass', reason: 'Kit HUD store (M1) plus the Farm string table test: pilot messages verbatim, four door labels, prompts, no coordinates. In M3 it caught a reworded touch tractor status (the D-22 HUD edit); the pilot message was restored (SPEC 13.1, INV 6) and the m3 outputs rebuilt.',
    evidence: ['evidence/m1/unit-coverage.md', 'evidence/m2/play/unit-full-b08.log', 'evidence/m2/m2d/unit-full.log', unit, 'evidence/build/m3/revert-tractor-touch-diff.json'] },
  'B-06': { status: 'pass', acceptedUnder: 'D-20', reason: 'Accepted under D-20 on the gathered set: 24 of 24 named-view/backend pairs (m2b-static-02, unchanged thresholds), play positions yard, house porch and bridge on WebGPU, stream crop on both backends, woodland A/B (M2a), and on r34 the farmhouse views and the farmhouse interior through the open door (play-house-door), 144 of 144 tiles on both backends against the sealed r34 pilot; r33 to r34 differences are the farmhouse floor only (D-07). M3: the WebGL2 play positions were captured on the tablet as screenshots (its minimal tier with the HUD, and the 1280 x 720 parity framing at tier high).',
    evidence: ['evidence/parity/m2b-static-02/results.json', 'evidence/parity/m2a-static-prepared-01/results.json', 'evidence/parity/m2a-window-camera-02/results.json', 'evidence/parity/m2d-play-focused-02/results.json', 'evidence/parity/m2b-static-02/stream-crop/stream-crop.json', 'evidence/parity/m2a-static-prepared-01/woodland-ab-webgpu', 'evidence/parity/m2a-static-prepared-01/woodland-ab-webgl2', 'evidence/parity/m2d-r34-01/results.json', 'evidence/parity/m2d-r34-01/r33-r34-differences.json', `${T}/play-webgl2/device/results.json`, `${T}/play-webgl2/parity/results.json`],
    scope: 'Farm r33 (parity baseline) and r34 (sealed delivery) outputs, WebGPU and forced WebGL2; the tablet for the WebGL2 play positions',
    deferredPortion: 'The WebGL2 play positions (yard, house porch, bridge) are screenshots on the tablet, not compared with the pilot. The r33 play-house-door WebGPU capture failed 132 of 144 tiles because the focused root drew its outline in the rewrite frame; the capture now hides that outline (R4-07), it was not re-run on r33 under D-20, and the same view passes on r34 on both backends' },
  'B-08': { status: 'pass', reason: '24 of 24 steps on WebGPU and on forced WebGL2 with real keys and mouse: M2 (b08-03, r33) and M3 on the final m3 build (m3-final, r34 pack; its collider step uses the sealed r34 fixture, R4-09). Retained: the first m3 attempt passed every play step and failed only that step because the runner still read the r33 fixture; m3-02 then passed on the pre-revert m3 build.',
    evidence: ['evidence/m2/play/b08-03-webgpu/results.json', 'evidence/m2/play/b08-03-webgl2/results.json', 'evidence/m3/play/m3-final-webgpu/results.json', 'evidence/m3/play/m3-final-webgl2/results.json', 'evidence/m3/play/m3-02-webgpu/results.json', 'evidence/m3/play/m3-02-webgl2/results.json', 'evidence/m3/play/m3-webgpu/results.json', 'evidence/m3/play/m3-webgl2/results.json', 'evidence/m2/play/oracle.json', 'packages/farm/fixtures/play-colliders-r34.json'],
    scope: 'Farm r33 (M2) and m3 (r34 pack) outputs, WebGPU and forced WebGL2' },
  'B-09': { status: 'pass', reason: 'Final m3 build. Emulated (412 x 915, DPR 2.8125, coarse pointer) on both backends: 16 of 16. Tablet with real touch on both backends: 14 of 14 plus two emulation-only steps skipped. The earlier m3 runs are retained (tablet WebGL2 attempt 1 failed only on the persisted help state; attempt 2 passed).', evidence: b09, scope },
  'B-10': { status: 'pass', reason: 'Emulated profiles through the adapter-string hook start on the predicted tier; the improving trace gives exactly one down step and one up step after upHoldMs; a constant 30 ms trace steps down, reverts on the benefit rule and locks after two reversals; on both backends.', evidence: tiering, scope },
  'B-11': { status: 'pass', reason: 'Kit demo (M1), the Farm outputs of both releases (M2) and the m3 outputs on both profiles: axe, focus and Enter starts play, the Farm walk and door flow, Escape twice, Tab leaves, aria-live, reduced motion, second tab pauses, 44 px targets, contrast.',
    evidence: [...m1Contract, ...m2Contract, ...contract], scope: 'kit-demo; Farm r33, r34 and m3 outputs, WebGPU and forced WebGL2' },
  'B-12': { status: 'pass', reason: 'Kit demo (M1), the Farm outputs of both releases (M2) and the m3 outputs: the public build ignores dev and test flags and exposes no hooks (the look exploration is absent from public and test outputs); the dev build shows its panel.',
    evidence: [...m1Contract, ...m2Contract, ...contract, 'evidence/m3/hygiene-m3.log'], scope: 'kit-demo; Farm r33, r34 and m3 outputs, WebGPU and forced WebGL2' },
  'B-13': { status: 'pass', reason: 'A governor grass step plus a 960 x 540 to 1280 x 720 resize equals a fresh 1280 x 720 load with the same step: 144 of 144 tiles at eye-height and at the watermill, full frame and stream crop; a control (grass 1 against .75) fails the same gate (eye-height 120, watermill 139 of 144 tiles), so the metric sees the step; both backends. Z4: no pixel-ratio step.', evidence: tiering, scope },
  'X-01': { status: 'pass', reason: 'Hub run 2026-09-29 (the laptop, GTX 1660 Ti Max-Q, fullscreen 1920 x 1080 at 120 Hz, coordinator): all six backend and workload rows within 110 % of the pilot on frame-interval and CPU-render p50 and p95 (SPEC 20.1), measured on the r34 kit build.',
    evidence: hub, deferredPortion: 'the m3 build on the hub (the rebuilt kit, evidence/m3/hub-kit-README.txt)' },
  'X-04': { status: 'fail', reason: 'Hub run 2026-09-29: WebGL2 passes (cold 1.004, warm 1.020; worst run 6.4 s against 45 s); WebGPU fails (cold 6013 against 4569 ms, 1.316; warm 5875 against 4279 ms, 1.373; limit 1.20). M3 bounded attempt (this PC, indicative only): the dominant cost is per-pipeline shader builds (R-02); the rewrite fires onReady a frame after its first complete frame (SPEC 5.2(3)) and is therefore observed after the GPU pipeline-compile stall, the pilot before it; declared readiness 0.986 cold. The runner now also records declaredReadyMs; no scene change (the candidates need an owner decision).',
    evidence: [...hub, 'evidence/perf/x04-attempt/README.txt', 'evidence/m3/hub-kit-README.txt'] },
  'X-05': { status: 'deferred', reason: 'The hub run of 2026-09-29 made the kit\'s per-tier step (72 files: tiers high, balanced, economy and minimal, both backends, living-orbit, living-route and tractor-drive, 3 runs of 30 s, fullscreen 1920 x 1080 at 120 Hz): WebGPU frame p50 / p95 8.3 / 8.4 ms at every tier and workload; WebGL2 p95 16.6 to 16.7 ms for living-orbit at high, balanced and economy and living-route at high and balanced, 8.4 ms elsewhere. SPEC X-05 asks for 60 s windows, 5 runs and a walk workload, so it stays deferred; the coordinator decides whether these runs qualify.',
    evidence: [...hub, 'evidence/perf/hub-2026-09-29/results/tiers'] },
  'X-07': { status: 'fail', reason: 'Measured on the owner\'s tablet at its assigned tier (economy, WebGPU; valid with its device state, thermal status none): living-orbit 30.2 FPS, p95 49.8 ms; living-route 33.4 FPS, p95 34.3 ms; tractor-drive 27.6 FPS, p95 51.3 ms; tasks over 100 ms in orbit (2) and drive (1). SPEC 20.2 proposes 30 FPS with p95 under 33.3 ms in orbit and play and no task over 100 ms after ready (the pilot\'s recorded tablet numbers: 34.2 FPS orbit, 44.7 route, 83 ms worst gap). Chrome\'s frames on this tablet are whole 16.6 ms vsyncs, so p95 under 33.3 ms needs almost every frame within two vsyncs.',
    evidence: soak, deferredPortion: 'a same-session pilot run on the tablet (the pilot\'s numbers above were recorded earlier)' },
  'X-08': { status: 'deferred', reason: 'No phone is connected. The device kit (packages/farm/dist/device-kit) drives any USB Android Chrome (KILN_TABLET_SERIAL selects the device), so the phone run is the tablet\'s commands on the owner\'s phone.', evidence: ['packages/farm/dist/device-kit/README.txt'] },
  'X-10': { status: 'pass', reason: 'Tablet soak at its assigned tier: 210 s of living-orbit plus 60 s each of living-route and tractor-drive with 0 level changes, 0 reversals and 0 locks. Finding (FARM-004): below 20 FPS the governor never evaluates (SPEC 8.3 needs 60 samples in 3 s); forced high on the tablet ran at 17 FPS with 0 changes.',
    evidence: [...soak, 'KIT-REQUESTS.md'], deferredPortion: 'the phone (no device)' },
  'X-11': { status: 'deferred', reason: 'M4 check. Recorded now: staged packs r33 7,070,552 B and r34 7,098,444 B (23 GLBs each); the m3 public Farm chunk is 1,577,844 B / 461,199 B gzip, 91.10 % / 91.12 % of the Farm ceiling set by the D-15 amendment of 12:45 (1,732,040 B / 506,143 B, the M2 chunk plus 10 %); in the site\'s resolution (without the kit\'s three facade alias) the chunk is 1,931,509 B / 545,492 B, 111.52 % / 107.77 % of that ceiling, because three.module.js joins three/webgpu (+353,665 B / +84,293 B gzip; the remedy is one alias in the site). Bytes fetched before onReady are not yet recorded.',
    evidence: ['evidence/build/m3/bundle-r34-public.json', 'evidence/build/m3/bundle-r34-test.json', 'evidence/build/m3/bundle-r34-dev.json', 'evidence/build/m3/three-double-import.json', 'evidence/m2/bundle-r34-public.json', 'evidence/m2/staging/README.md', 'evidence/m2/staging/r34.json'] },
};
for (const [id, row] of Object.entries(rows)) {
  const at = matrix.checks.findIndex(check => check.id === id); assert(at >= 0, `Unknown matrix id ${id}`);
  for (const file of row.evidence) assert(existsSync(resolve(root, file)), `Missing evidence ${file} for ${id}`);
  matrix.checks[at] = { id, subject: matrix.checks[at].subject, ...row, recorded };
}
const summary: Record<string, Record<string, number>> = {};
for (const check of matrix.checks) { const family = String(check.id).split('-')[0]!; (summary[family] ??= { pass: 0, fail: 0, deferred: 0 })[check.status as 'pass' | 'fail' | 'deferred']++; }
matrix.summary = summary; matrix.date = '2026-09-29';
matrix.notes = 'B-00 counts as eight subchecks and suffixed U ids count separately. The one B failure is the M0 B-00e defect with its required Z4 fallback. P-28 is page-owned. P-31 to P-35 are the M3 exit (SPEC 24) and pass. X-04 fails on WebGPU on the hub and X-07 misses the SPEC 20.2 tablet proposal; both are owner questions. Rows accepted under D-20 pass on the evidence gathered when the owner closed M2 as the record, and name the portion that evidence does not cover.';
await writeFile(path, JSON.stringify(matrix, null, 2) + '\n');
console.log(JSON.stringify({ updated: Object.keys(rows), summary }));