Repository navigation
tools/pta-web: publish the canary harness as a browser module, checked byte for byte - #121
Merged
Merged
Conversation
…d byte for byte The canary's pinned harness (docs/designs/canary/harness) built with emcc, for a page to run in a worker. - build.sh builds it with gcc and emcc: a node build, and the browser module (also loadable in node); checks MNIST against regenerate.sh's digests and pools it to 8x8 with the harness's own pool - compare.sh runs the canary's rows natively, as the node build and as the browser module itself (run-web.mjs: in-memory filesystem and callMain, as a page does), fails unless all three print the same bytes, and writes rows.json (each row's arguments and output) - .github/workflows/pta-web.yml runs both on changes to the canary or these tools; on main a passing build is force-pushed to the orphan branch pta-web with manifest.json (commit, harness and file digests, compilers). Pull requests check and publish nothing; a build that differs from the harness is never published Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017DE7ei4TzTMxDkSu5KwUv5
kubeworkz
marked this pull request as ready for review
November 1, 2026 17:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Publishes the canary's PTA harness as a browser module, checked against the native harness byte for byte, so a web page can run the PTA error model on the frozen canary and show exactly what the harness prints.
Follows the
spike/pta-webrun 41330840193: the pinned harness built with emcc 3.1.74 printed the same bytes as gcc on three canary rows, in about 0.4–0.5 s per 1,000-imageeval, from roughly 2.8 MB compressed (module ~110 KB, mostly pooled training data for--gatescale).tools/pta-web/build.sh: buildsdocs/designs/canary/harnesswith gcc and emcc (SHAPE=chain flags): a node build and the browser module (-sMODULARIZE,callMain+FS, loadable in node too). Checks MNIST againstregenerate.sh's digests; pools to 8×8 with the harness's ownpoolcompare.sh: runs the canary's rows (seed 1, 128×64 tile, 1,000 images: format only, as budgeted, as budgeted, lit, fitted) natively, as the node build, and as the shipped browser module; fails unless all three print the same bytes; writesrows.json(each row's arguments and output) and a timing tablerun-web.mjs: runs the browser module as a page would (in-memory filesystem,callMain)README.md.github/workflows/pta-web.ymldocs/designs/canary/**,tools/pta-web/**or the workflow, on pull requests, and on demandmain, a passing build is force-pushed as one commit to an orphanpta-webbranch: module, canary network, pooled data,rows.json, andmanifest.json(source commit, harness digests, compilers, per-file digests)Testing
This pull request's own run builds everything and runs the three-way comparison. The spike already showed node-build parity; this adds the shipped module to the comparison.
Generated by Claude Code