Skip to content

[do not merge] 34-pack-ci counterfactual: pack-checks goes red - #14

Closed
AlexZ005 wants to merge 6 commits into
mainfrom
tmp/34-pack-ci-red
Closed

AlexZ005 wants to merge 6 commits into
mainfrom
tmp/34-pack-ci-red

Conversation

@AlexZ005

@AlexZ005 AlexZ005 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Throwaway proof for #13: a behavior trigger typo ('clik') and a wrong LOD ratio must fail the pack-checks job. Closed and the branch deleted once the run is red.

AlexZ005 and others added 6 commits October 2, 2026 15:17
… the kit forks

The architecture, sci-fi and town kits each carried a kit-post.mjs fork (pre-rotate,
meshy-post, seam clamp, offset, emissive drop, albedo grade, recolor, glow mask, defight);
nature-kit's finalize.mjs, props-kit's and interior-kit's build.mjs carried their own
emissive drop, colour grades, base cut, normal/texel repairs and flat-for-sync. All of it
now lives once in tools/kit-build/lib/post.mjs (each function the fork's code, unchanged);
the three kit-post.mjs files are re-export shims (town keeps its own judged defight) and
the three builds import the helpers.

- tools/kit-build/lib/deps.mjs: ONE loader for tools/meshy's packages. gltf-transform checks
  instanceof, so props/interior (which hand Documents to the shared helpers) now load it
  through the same CommonJS build as kit-build instead of the ES build by path.
- every default MESHY_TOOLS / MESHY_TOOL that pointed at another lane's worktree
  (packs-lane-30c-tools) now points at this repo's tools/meshy.
- tools/kit-build/lib/inspect.mjs: the measured facts of a GLB (drawn tris, bbox, textures,
  materials, clips) for the checks and the budget report.

PROOF (byte-stable): the OLD code (origin/main b79d32c) and the NEW code rebuilt the
architecture, nature, props, interior and sci-fi kits from the same staged Meshy raws
(--no-thumbs): 159 / 159 GLBs (every LOD0 + the internal .build pieces) are byte-identical
(sha256), and all 159 were rewritten by the new run. Unit suites unchanged: arch 6/6,
scifi 6/6 + 7/7, town 6/6, lod 10/10, anim 4/4, interior 46/46, tools/meshy 30/30.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…are cap; defight after cut

tools/kit-build/kit-build.mjs — one entry point for every step after a kit's recipe:
build (recipe → pass → judged defight → LOD1/LOD2 → thumbs → check), post (the one post
step), pass (emissive policy, texture cap per pack, opaque PNG → JPEG over the 5 MiB share
cap, decimate LOD0 to its category budget — dry run unless --write, a compliant file is never
rewritten), lod, thumbs, flicker (static probe; --record renders and writes the baseline),
report (the budget report), check (the CI).

check — over every pack in index.json: index + model-list schema (incl. P1 `lods` and P2
`behavior`, strict where core silently normalises), GLB <= 5 MiB (warn > 2), LOD0 tris <=
category budget, texture cap, emissive policy, scale (metres), pivot rule, LOD files for items
> 2 000 tris (exist, coarser, measured ratio, LOD0's node names and clips), behavior clips in
every file, the static z-fight probe (<= 1 cm², or <= the file's RENDER-judged baseline), and
thumbnails. 222 items in ~15 s, no browser.

Policy: tools/kit-build/packs.json (8 categories with budgets/extents; per pack textureCap,
emissive none|allowed, category, pivot; per-item overrides — 35 declared pivots: windows on
the wall origin, wall-face trims, hanging lights, hinges, signpost feet).
allow.json: 16 accepted failures, each with its reason — 15 items tools/lod builds no level for
(its visual gate refuses every candidate; reasons from tools/lod/report.json and a --dry-run on
town/interior), and nature-kit PondSet's render flicker (404 px, the same 404 33-fix-lod measured).
flicker-baseline.json: 118 files over the static limit, each RENDERED headless (judge.flicker,
512², 12 poses) at <= 400 px (median 37) — the CI holds each to its recorded area.

FIX default/SvelteRune: 5 342 308 bytes was over the 5 MiB share cap (it could never reach a
peer). `kit-build pass default --write` re-encoded its 2 MB PNG normal map as JPEG (the material
is OPAQUE, alpha unused): 3 704 300 bytes; render before/after mean |Δ| 0.5 / 255
(after-34/34-pack-ci/sveltrune-before-after.png).

FIX architecture-kit / scifi-kit recipes: defight AFTER kit-cut (and after a sci-fi kitbash).
The post step's defight ran before the mortar core / opening / lining existed, so a REBUILD
shipped 300-3 000 cm² of coplanar overlap on every wall that the shipped files do not have.
Counterfactual: `kit-build build architecture-kit` before this fix → check 18 errors,
scifi-kit → 9; after → 0 and 0, and WallStone / WallPlaster rebuild byte-identical to the
shipped files. (The forks' own output is unchanged: the previous commit's byte proof.)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…al per check + docs

.github/workflows/pack-checks.yml — on every PR to main (and pushes to main): npm ci in
tools/meshy (no browser, no Meshy key), the pack tools' unit tests (kit-build, lod, arch,
scifi, town, anim, interior, meshy) and `kit-build check` over every pack; the findings go to
the job summary, the JSON + budget report to an artifact. Job name `pack-checks` — the status
check to make REQUIRED on main (tools/kit-build/README.md has the click path and the gh api call).

tools/kit-build/test — a fixture pack that passes every check, then each check RED on the one
thing it exists to catch: index (no source / missing value), manifest (a typo'd key, a duplicate),
size, tris, textures, emissive, scale (cm export), pivot (and the declared exception passing),
lods (required, missing, wrong ratio, foreign node names, missing clips), behavior (missing
clip, autoplaying door), flicker (a decal on a face; its baseline passes; worse fails), thumb,
allow-list (accepted + stale); pass fixes cap/emissive/share-cap/budget and is byte-stable after.
rules.test: behavior/lods/rows/index/pivot/scale. 22/22; all suites 107/107 + meshy 30/30.

Docs: tools/kit-build/README.md (commands, checks, policy, allow-list, baseline, making the
check required); README.md (layout + Checks); tools/lod/README.md (who runs defight).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…time)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@AlexZ005

AlexZ005 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Counterfactual done for #13: run 37007384778 — unit tests green, kit-build check RED on exactly the two breaks (behavior.trigger 'clik', missing Block thumbnail). Closing; branch deleted.

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