TensorPass

Blog

A reproducible build of AI Wallet on a Mac and on GitHub

The AI Wallet 0.1.0 store zip came out byte for byte the same on a Mac and on GitHub's Ubuntu runner. The file order, dates and modes that make it so.

Published on

On 12 November 2026 the tag v0.1.0 of AI Wallet gave the same store zip, byte for byte, on GitHub's Ubuntu runner and on a Mac. Both files carry the SHA-256 752902f51804678c1e1e9b5fe321fc55729c815036818e738eac2aed607f8921. Before the tag, three builds of one commit, one of them in another time zone, gave one hash. This article describes the four mechanisms in the pack script that produce that result, the release workflow on GitHub, and what a reproducible build (a build that gives identical bytes from the same source on another machine) brings to a wallet that holds AI credentials.

The package the Chrome Web Store receives

AI Wallet is the Chrome extension of bring your own AI. It is an AI wallet: it keeps the visitor's AI accounts, their API keys and sign in tokens, in a vault encrypted on the visitor's computer, under a key derived from 12 recovery words. The Chrome Web Store takes the extension as a zip. On 12 November that zip comes from one command in the wallet's repository, npm run pack:store, which runs store/pack.mjs.

The script works in five steps:

  1. It removes the previous build and zips.
  2. It builds the four SDK packages and a production build of the wallet into store/build/extension, minified with esbuild.
  3. It drops the manifest's key field, which the store refuses, and writes the manifest back as JSON with a fixed indent and a final newline.
  4. It sets one date and one mode on every file.
  5. It zips the files in name order as store/build/aiwallet-<version>.zip.

What the pack script fixes in the zip

A zip records more than the bytes of its files. Each entry carries a path, a modification time, a file mode and, on Unix, extra fields with the owner's user and group ids and further timestamps. Two machines that build identical files still write different zips when any of these differ.

What differs between machinesThe fix in store/pack.mjs
The order of the files: a directory listing returns entries in the order its file system keeps them, and macOS and Linux keep different file systemsThe script lists the build recursively, keeps the files, and sorts their relative paths before it hands the list to zip
The dates: a checkout stamps each file with the time it was writtenEach file gets the date of the commit, read with git log -1 --format=%ct, or SOURCE_DATE_EPOCH when the environment sets it
The time zone: a zip stores dates in local timezip runs with TZ=UTC on every machine
The mode and the owner: the umask and the account differEach file gets mode 0644, and zip -X leaves out the extra fields that hold the user id, the group id and the Unix timestamps

The commit's date is the same on every machine that checks out the commit, so the date stamped in the zip depends on the source alone. SOURCE_DATE_EPOCH is the variable that reproducible build tools share for the same purpose, and the script reads it first.

The same tools on both machines

The fixes cover the zip. The files inside it come out identical when the build's inputs match: the same commit, the same dependencies and the same tools. The committed lockfile fixes every dependency's version, and the release workflow builds with Node 26, the version the repository's engines field requires.

The build reads one value from the environment, a client identifier that a plan sign in needs, stored as a repository secret on GitHub and in a local file on the Mac. The value goes into the code, so both machines need the same one to reach the same bytes. The release workflow stops when the secret is missing, since that sign in fails in a package without it.

The release workflow on GitHub

A tag named v<version> starts .github/workflows/release.yml on an Ubuntu runner.

The workflow uploads nothing to the store. For 0.1.0, every step passed. The artifact aiwallet-0.1.0.zip was downloaded and checked: it carries the sign in value and its manifest has no key. The same tag, packed on the Mac, gave the same SHA-256.

What a reproducible zip proves for a wallet

A visitor installs the zip the store serves, and that zip holds the code that decrypts the vault and sends each credential to its provider. A reproducible build ties that zip to one commit. Anyone who holds the source and the same tools rebuilds the package and compares one hash, and a difference points to a change made outside the commit, on a build machine or on the way to the store. The security model lists what the vault holds and how the wallet encrypts it.

On 12 November 2026 the wallet's repository is private and its licence proprietary, so TensorPass alone runs the comparison today: two machines with different operating systems, accounts and time zones gave the same bytes. The Chrome Web Store item is a draft that has not gone to review, and the upload of a tagged artifact from the workflow waits on Chrome Web Store API credentials. Provenance for the SDK's npm packages waits on their first publication from a public repository, since npm signs provenance only for those. The changelog and the release notes of 0.1.0 list what the package contains.

Sources

Read the quickstartRead the changelog