Skip to content

wasm: one build record for t27f.wasm, check:t27f compares the vendored copy with it - #18

Merged
gHashTag merged 1 commit into
masterfrom
t27f-build-record
Oct 18, 2026
Merged

gHashTag merged 1 commit into
masterfrom
t27f-build-record

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Refs gHashTag/t27#10229 (t27 PR: gHashTag/t27#10241)

wasm/t27f.wasm was rebuilt by ten hand-typed lab commands and the only record of a build was a hand-pasted list of sha256 lines. This adds one build record and a cheap check.

  • wasm/t27f.build: # input lines (closure digest of the exporter specs and their imports, zig version, t27c sha256) then <sha256> <file> lines for export.zig, the generated Zig and JavaScript, and the wasm.
  • npm run check:t27f: grep -v '^#' wasm/t27f.build | shasum -a 256 -c - -- exits 1 and names the file if a vendored copy drifted from the record. Verified OK on this branch.
  • wasm/BUILD points at the rule in gHashTag/t27 specs/t27f/build.t27 instead of a hand-pasted sha block.

Note for review: the vendored spec_graph_view.zig, spec_graph_view.mjs and t27f.wasm were rebuilt from current t27 master with a deterministic build (lab; it reproduces trinity's vendored wasm byte for byte), so the view now carries master's dark theme. The wasm size is unchanged (39273 bytes), the sha differs.

No new hand-written code: the record is data, the check is one package.json script line using shasum.

Measured on the Railway lab: cold rebuild 1111 ms, REUSE hit 218-243 ms.

🤖 Generated with Claude Code

@tri-claw

tri-claw Bot commented Oct 18, 2026

Copy link
Copy Markdown

Summary by t27-bees

This PR adds a build record (wasm/t27f.build) and a verification script (npm run check:t27f) so the vendored t27f.wasm can be checked against its inputs. The wasm and its JS/Zig sources were rebuilt from t27 master (dark theme colors), changing their hashes but not the wasm size.

Worth a look

  • package.json:14 — check:t27f runs shasum -c on every line in t27f.build, but the record lists export.zig, reel.zig, deck.zig, spec_graph_view.zig, spec_graph_export.zig, spec_graph_outline.zig which are not vendored in wasm/ (only the .mjs counterparts and t27f.wasm are). The check will fail with "No such file or directory" for those missing files.
  • wasm/t27f.build:4–15 — The record includes 11 artifact lines but only 6 of those files exist in wasm/ per package.json:files. Either the record should list only vendored files, or the check should filter to existing files.
  • wasm/BUILD:42–55 — The comment directs rebuilds to specs/t27f/build.t27 in gHashTag/t27, but this repo has no automation to run that rule; the manual commands listed (t27c gen …, zig build -Dtarget=wasm32-wasi) assume the full t27 source tree. Contributors without it cannot reproduce the build.
  • wasm/spec_graph_view.zig:547,562,575,681,693 — Test expectations were updated to the new dark-theme colors. If the wasm is rebuilt again with different colors (e.g., upstream theme change), these tests will fail until expectations are updated again — which is correct behavior, but worth noting as a future maintenance point.
  • wasm/t27f.wasm — Binary changed (sha differs) but size unchanged (39273 bytes). The new hash 7b2a0f0c… in t27f.build matches the rebuilt wasm; the old hand-pasted list in BUILD had deedd9c1…. No issue, but verify the vendored wasm is indeed the one just built.

Read: 6 files, +42 -36, the whole diff. Head 072e6fa. Model: openai-compatible/nvidia/nemotron-3-ultra-550b-a55b. Commands: @t27-bees review | summary | help | pause | resume. Free for every repository.

…d copy with it (refs gHashTag/t27#10229)

wasm/t27f.build holds the inputs (closure digest, zig version, t27c hash)
and the sha256 of export.zig, the generated Zig and JavaScript, and the
wasm, in the format shasum -a 256 -c reads. npm run check:t27f runs that
check. wasm/BUILD points at the rule in gHashTag/t27 specs/t27f/build.t27
instead of a hand-pasted sha block. The vendored view and wasm are rebuilt
from current t27 master, so spec_graph_view now carries master's dark theme.
No new hand-written code.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@gHashTag
gHashTag merged commit 8744077 into master Oct 18, 2026
2 checks passed
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