Skip to content

test: cube sizes 2 to 15 (W7), scramble length above 7x7 - #72

Merged
wstein merged 10 commits into
mainfrom
test/app-size-range-15-tests
Nov 18, 2026
Merged

wstein merged 10 commits into
mainfrom
test/app-size-range-15-tests

Conversation

@wstein

@wstein wstein commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Tests for cube sizes 2 to 15 (work package W7), plus one small source change in CubeMoves.res.

  • Size-loop tests that stopped at 2 to 7 (or 3, 5, 7 and 2, 4, 6) run over 2 to 15; test/cubeSizes.ts holds the range.
  • ReScript property tests draw sizes up to 15, including the Orbit64 token property and a new V2 round-trip property via Orbit64V2Facelets.
  • Mesh, slice-turn, zoom and index-buffer tests for 8 to 15 (32-bit indices from 7x7 stickered and 9x9 stickerless).
  • Synthetic fixtures 2 to 15: schema, ZIP round trip, fingerprint, read-back by the app detection.
  • Synthetic faces and presets on 8 to 15; budgets for the 15x15 steps in test/sizePerformance.test.ts.
  • Source change (owner decision 2026-11-18): scramble length above 7x7 was 20 moves; now round(100 * n^2 / 49), 131 for 8x8, 459 for 15x15. The 2 to 7 table is unchanged.
  • Known gap kept as expected failure: glare preset at 12x12 and 15x15.
  • Each new check failed under a targeted mutation, then the mutation was reverted.
  • Not covered: Playwright specs, real photos, WebGL frame rate.
  • Tests: npx vitest run: 2031 passed, 47 failed. The 47 fail on main too: fixture JPEGs are Git LFS pointers (no git-lfs here).
  • Checks: typecheck, lint, format:check, typos, build pass.

Blocker: none.

🤖 Generated with Claude Code

@wstein wstein changed the title test: cube sizes 2 to 15 (W7) test: cube sizes 2 to 15 (W7), scramble length above 7x7 Nov 18, 2026
Base automatically changed from feat/app-size-range-15-profiles to main November 18, 2026 15:04
@wstein
wstein force-pushed the test/app-size-range-15-tests branch from 02ce315 to 81a0b04 Compare November 18, 2026 15:36
wstein and others added 9 commits November 18, 2026 17:04
Widen the loops that stopped at 2 to 7 (or 3, 5, 7 and 2, 4, 6 by parity) to
every accepted size: random states, scramble validity, guided reassembly and
routing, face orientation solving, notation round trips, shadow floor and
display-frame conjugation. test/cubeSizes.ts holds the range once. Tests that
take seconds at 9 to 15 get an explicit time limit; the display-frame test
runs one case per size.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Extend the junction, inner-slice and scramble-depth tests to 15x15 and add a
size 2 to 15 block: index buffers (32-bit above 65535 vertices, 9x9 stickered
and up), geometry growth, zoom and the exact column a slice turn moves.
The scramble length table ends at 7x7 and falls back to 20 moves above it;
an expected-failure test records that gap.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The generators stopped at 7x7. Scrambles, move inverses, valid-state, facelet
round trips, the odd-cube and wing parity checks and the zoom range now draw
sizes up to 15. The zoom property also checks that an in-range zoom is kept.
A new property round-trips an Orbit64 V2 token for every size; the V1 token
property stays at 2 to 7, the sizes of that codec.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The clean-face read-back now covers 8x8 to 15x15, and the lighting presets run
on 8x8, 10x10, 12x12 and 15x15. At 300 px the glare preset washes four corner
stickers out to white on 12x12 and 15x15; that case is listed as a known
failure, like the other misread presets.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… to 15

Each size renders a random valid cube to six JPEG faces, checks the meta
against the published fixture schema, round-trips the ZIP, reads the
fingerprint of every photo and reads the photos back as the cube's colors with
the app's own detection.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Time budgets (median of three runs) for random cube, scramble, facelets,
parity, Orbit64 V2 token, both meshes, photo rendering and reading, face
orientation and the guided search at 15x15. The budgets are 10 to 150 times
the measured medians so a loaded runner passes and a step that grows with the
size faster than expected fails.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Grid alignment, repeated-face detection and the guided capture routing test
used lists that stopped at 7x7 (2, 3, 4, 5, 7 and 2, 3, 4, 7).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The length table ended at 7x7 (100 moves) and every larger size fell back to
20 moves. Above 7x7 the length is round(100 * n^2 / 49): 131 moves for 8x8,
459 for 15x15. The table for 2 to 7 is unchanged. The test checks the length
of every size from 2 to 15 and that it grows.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The app token is the V2 codec since #69, so the property
no longer needs the 2 to 7 generator of the removed V1 codec.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@wstein
wstein force-pushed the test/app-size-range-15-tests branch from 81a0b04 to fda7cd8 Compare November 18, 2026 17:08
@wstein

wstein commented Nov 18, 2026

Copy link
Copy Markdown
Owner Author

Review: FINDINGS head=fda7cd85b0fa578d07c163e9a62f6a59c12cf44a patch-id=056b03eb461556def9127ab2a62f4854f9f62a35 pr=72

  1. blocking: test/sizePerformance.test.ts:75 'stickered mesh' calls buildCubeMesh(cube, SIZE); the adapter defaults stickerless = true, so it times the same stickerless mesh as line 78 and the stickered 15x15 mesh has no budget. Probe: a 4 s delay only for stickered 15x15 meshes in CubeMesh.res survives (9/9 pass). Fix: pass (cube, SIZE, undefined, false).
  2. nit: test/cubeView3D.test.ts:896-897 and the PR text say 32-bit indices start at stickered 9x9; measured vertex counts: stickered 7x7 = 81648, stickerless 9x9 = 80676 (> 65535), so stickered meshes switch at 7x7.
    Mutations (scratch copy), each failing the intended test: scramble formula 99/49 (8x8: 129 vs 131); maxCubeSize 14 (16 tests, incl. the new 15x15 fixture and mapping tests); Uint32 threshold raised (index-buffer tests 7x7 stickered and 9x9 up); getDefaultZoom capped at 7 (zoom test); clampZoom upper bound capped at 7 (new in-range clause, counterexample [29.001, 8]); Orbit64Token encode refuses n > 12 (token property, n = 13); V2 encodeFacelets refuses n > 9 (V2 property, token property, 15x15 budget).
    Formula checked independently: 8..15 = 131 165 204 247 294 345 400 459, no .5 ties; table 2..7 unchanged against main.
    Checks (Node 22.23.4): npm ci, typecheck, lint, format:check, typos, build rc 0; git diff --check clean; vitest test/properties 23 passed (3 runs stable).
    vitest full: head 2040 passed (incl. 9 expected fail) / 47 failed / 1 skipped; main 1773 / 47 / 1; same 47 LFS photo failures (fixtures 23, liveFaceAppearance 24, gridAlignmentRealCrops suite).
    range-diff 81a0b04 -> fda7cd8: 7 '=', commit 3 '!' (Orbit64Token after feat(notation): Orbit64 V2 tokens for sizes 2 to 15, remove V1 #69), commit 9 new; no merges; only src change is CubeMoves.res (disclosed); no Orbit64 V1 files tracked.
    CI run 44355363249 (CI, pull_request) success at this head: test, typos. Commits: Conventional, Co-Authored-By, identity matches git config, no CRLF, no session links. PR text 18 lines, one Blocker line.

…e note

The stickered-mesh budget called the adapter with its default (stickerless),
so it measured the same mesh as the stickerless line. It now passes
stickerless = false (median 74 ms at 15x15, budget unchanged at 3000 ms).
The index-buffer comment named 9x9 for stickered meshes; 32-bit indices start
at 7x7 stickered and 9x9 stickerless.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@wstein

wstein commented Nov 18, 2026

Copy link
Copy Markdown
Owner Author

Review: CLEAR head=3fc038b7b1f28821ef887f61739fb4ab8c4dbf8d patch-id=c540cd7c3d1f69d3cd2e6f9dace8bbe023f44da8 pr=72
Delta round 2 on 3fc038b (one commit on fda7cd8, no rewrite, no merges; base main 11cd659). Delta: test/sizePerformance.test.ts and test/cubeView3D.test.ts only.
Round 1 blocking fixed: 'stickered mesh' now passes stickerless = false. Measured at 15x15: stickered 447120 vertices, median 43 ms of 7 (stickerless 277020, 24 ms); budget unchanged at 3000 ms.
Error class rechecked: every buildCubeMesh call added by the diff passes stickerless explicitly.
Round 1 nit fixed: comment and PR text now say 32-bit from 7x7 stickered and 9x9 stickerless, matching 81648 and 80676 vertices.
Mutations, each failing the intended test: 4 s delay for stickered 15x15 meshes ('stickered mesh', 4047.8 >= 3000); Uint32 threshold 90000 (7x7 stickered, 9x9 stickerless index buffers, 7x7 junctions); threshold 50000 (6x6 stickered, 8x8 stickerless); stickered budget 0 ms.
Checks (Node 22.23.4): npm ci, typecheck, lint, format:check, typos, build rc 0; git diff --check clean; vitest sizePerformance + cubeView3D 90 passed.
vitest full: 2040 passed (incl. 9 expected fail) / 47 failed / 1 skipped, same as round 1; the 47 are the LFS photo failures also on main (1773 / 47 / 1).
CI run 44379802723 (CI, pull_request) success at this head: test, typos. Commit: Conventional test(perf), Co-Authored-By, identity matches git config, no CRLF, no session links. PR text 18 lines, one Blocker line, Generated line last.

@wstein
wstein marked this pull request as ready for review November 18, 2026 19:56
@wstein
wstein merged commit 3ecb788 into main Nov 18, 2026
2 checks passed
@wstein
wstein deleted the test/app-size-range-15-tests branch November 18, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant