#!/bin/bash # Copyright © Albert Lane. All Rights Reserved. # Proprietary and Confidential — Albert Lane Proprietary Software License. # Unauthorized use, copying, modification, or distribution is prohibited. # License inquiries: https://albertlane.net # t1237: build TESTS file, source bundle, files.json and the Worker bundle (deterministic). set -euo pipefail cd "$(dirname "$0")" { printf '%s\n' "# Copyright © Albert Lane. All Rights Reserved." "# Proprietary and Confidential — Albert Lane Proprietary Software License." "# Unauthorized use, copying, modification, or distribution is prohibited." "# License inquiries: https://albertlane.net" "# t1237 test run (t1239 wording update), $(date '+%a %b %-d %Y %-I:%M %p %Z') (box time, America/Los_Angeles). Keys in this run were throwaway TEST ONLY keys." "# Command: python3 tests/test_all.py" ""; grep -E '^\[(PASS|FAIL)\]|passed\.' logs/test-run.txt | sed 's#Work dir (TEST ONLY artifacts): .*#(TEST ONLY artifacts kept in a temp dir)#'; } > TESTS-T1237.txt FILES="README.md SPEC.md TESTS-T1237.txt proto/lane_isa.proto host/CMakeLists.txt host/host_main.cpp host/eth_crypto.hpp host/eth_crypto.cpp host/lane_sentry.conf.example cosigner/grok_agent_middleware.py cosigner/lane_digest.py cosigner/lane_isa_pb2.py tools/make_packet.py tests/test_all.py tests/cross.mjs worker/src/binding.js worker/src/worker.js worker/package.json build_bundle.sh" sha256sum $FILES > dist.SHA256SUMS.tmp mkdir -p dist tar --sort=name --mtime='2026-11-10 16:00:00' --owner=0 --group=0 --numeric-owner -cf - --transform 's#^#lane-vm-sovereign-binding-t1237/#' $FILES | gzip -9n > dist/lane-vm-sovereign-binding-t1237.tar.gz { cat dist.SHA256SUMS.tmp; (cd dist && sha256sum lane-vm-sovereign-binding-t1237.tar.gz); } > dist/SHA256SUMS; rm dist.SHA256SUMS.tmp python3 - "$FILES" <<'PY' import json, sys m = {f: open(f, encoding="utf-8").read() for f in sys.argv[1].split()} m["SHA256SUMS"] = open("dist/SHA256SUMS").read() json.dump(m, open("worker/src/files.json.txt", "w"), ensure_ascii=False) PY cp dist/lane-vm-sovereign-binding-t1237.tar.gz worker/src/bundle.tar.gz (cd worker && npx esbuild src/worker.js --bundle --format=esm --platform=neutral --main-fields=module,main --target=es2022 --external:./captcha-ui.txt --external:./files.json.txt --external:./bundle.tar.gz --external:./captcha-a.bin --external:./captcha-b.bin --legal-comments=inline --outfile=dist/worker.js --log-level=warning) python3 - <<'PY' p = "worker/dist/worker.js"; s = open(p).read() h = "// Copyright © Albert Lane. All Rights Reserved.\n// Proprietary and Confidential — Albert Lane Proprietary Software License.\n// Unauthorized use, copying, modification, or distribution is prohibited.\n// License inquiries: https://albertlane.net\n// Bundled third-party code inside: @noble/curves, @noble/hashes (upstream licenses retained by their packages).\n" if not s.startswith("// Copyright"): open(p, "w").write(h + s) PY sha256sum worker/dist/worker.js dist/lane-vm-sovereign-binding-t1237.tar.gz