Skip to content

fix(build): drop wall-clock timestamps from shipped vendor outputs - #428

Merged
debugmcpdev merged 2 commits into
mainfrom
fix/421-reproducible-vendor
Aug 22, 2026
Merged

fix(build): drop wall-clock timestamps from shipped vendor outputs#428
debugmcpdev merged 2 commits into
mainfrom
fix/421-reproducible-vendor

Conversation

@debugmcpdev

Copy link
Copy Markdown
Collaborator

Fixes #421

What

Two identical clean builds from the same commit did not produce byte-identical vendored outputs, because the vendor scripts stamped wall-clock time into files that ship:

  • packages/adapter-javascript/scripts/build-js-debug.jsfetchedAt: new Date().toISOString() in the js-debug vendor manifest, which ships in @debugmcp/adapter-javascript (files includes vendor/js-debug).
  • packages/codelldb-common/scripts/vendor-codelldb.jsdownloadedAt: new Date().toISOString() in each platform version.json, which ships in six packages: @debugmcp/codelldb-common and the five @debugmcp/codelldb-* platform packages (staged by scripts/stage-codelldb-packages.mjs).

This blocked the OpenSSF Best Practices build_repeatable criterion (independent verification that a rebuild matches what was published).

Approach: remove, don't derive

The issue offered SOURCE_DATE_EPOCH-derived stamps as one option. Removal is simpler and strictly better here:

  • Nothing consumes either field. Integrity lives in the committed vendor-manifest.json digest pins; the CodeLLDB resolver and the staging script read only version/platform from version.json; nothing reads the js-debug manifest at runtime. No test asserts on either field.
  • With the fields gone, no timestamps remain in any shipped output, so there is nothing for SOURCE_DATE_EPOCH to control.
  • The cachedAt stamp is left alone — it lands in cache metadata under the user cache dir and never ships.

Also updated the manifest field list in packages/adapter-javascript/docs/README.md. The "Deterministic output" claim in the build-js-debug.js header is now actually true.

Verification (the issue's acceptance criterion)

Ran pnpm run vendor:force && npm run build twice on win32 from this commit:

  • Recursive sha256 of packages/adapter-javascript/vendor/js-debug/ and packages/codelldb-common/vendor/codelldb/ (all five platforms): byte-identical across runs.
  • pnpm pack of @debugmcp/adapter-javascript, @debugmcp/codelldb-common, and the staged @debugmcp/codelldb-win32-x64: identical tarball sha256s across runs.
  • vitest run packages/codelldb-common/tests (81 tests) and adapter-javascript package tests (146 tests): all pass.

🤖 Generated with Claude Code

cynarlab and others added 2 commits August 22, 2026 14:39
Two identical clean builds from the same commit did not produce
byte-identical vendored outputs because the vendor scripts stamped
wall-clock time into files that ship:

- build-js-debug.js wrote `fetchedAt` into vendor/js-debug/manifest.json
  (ships in @debugmcp/adapter-javascript)
- vendor-codelldb.js wrote `downloadedAt` into each platform
  version.json (ships in @debugmcp/codelldb-common and the five
  codelldb platform packages)

Neither field had a consumer: integrity lives in the committed
vendor-manifest.json digest pins, and the resolver/staging only read
`version`/`platform` from version.json. With the fields removed, no
timestamps remain in shipped outputs, so no SOURCE_DATE_EPOCH plumbing
is needed. The cache-only `cachedAt` stamp is kept - it lands in the
user cache dir and never ships.

Verified the issue's acceptance criterion on win32: two consecutive
`pnpm run vendor:force && npm run build` runs produce byte-identical
vendor trees (recursive sha256) and identical packed tarballs for
adapter-javascript, codelldb-common, and codelldb-win32-x64.

Fixes #421

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@debugmcpdev
debugmcpdev merged commit b421391 into main Aug 22, 2026
10 checks passed
@debugmcpdev
debugmcpdev deleted the fix/421-reproducible-vendor branch August 22, 2026 18:48
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.

Reproducible builds: vendor scripts embed wall-clock timestamps in vendored outputs

2 participants