Skip to content

fix: released contract artifact aztec version (forward port of #23470)#23500

Merged
benesjan merged 1 commit into
merge-train/fairiesfrom
bj/fix-release-image-stamp-artifacts-fp
May 24, 2026
Merged

fix: released contract artifact aztec version (forward port of #23470)#23500
benesjan merged 1 commit into
merge-train/fairiesfrom
bj/fix-release-image-stamp-artifacts-fp

Conversation

@benesjan
Copy link
Copy Markdown
Contributor

@benesjan benesjan commented May 22, 2026

Forward-port of #23470 (originally merged to backport-to-v4-next-staging for the v4 release line).

Important

Do not merge until we get a green v4 nightly release.

Summary

The v4.3.0 release shipped contract artifact JSONs with aztec_version: "dev" baked in, which caused ci-compat-e2e to fail because the artifact version did not match the expected tested version. The root cause is that REF_NAME is not reliably populated when the release artifacts are built, so stamp_aztec_version in noir-projects/noir-contracts/bootstrap.sh was falling back to "dev".

The fix re-stamps the version at the point in the release process where the actual version is known:

  • ci3/release_prep_package_json now stamps aztec_version into artifacts/*.json at npm-publish time using the authoritative $version arg.
  • release-image/Dockerfile now re-stamps aztec_version into all shipped contract artifacts (accounts, noir-contracts.js, noir-test-contracts.js) using $VERSION at image build time.
  • noir-projects/noir-contracts/bootstrap.sh is simplified to always stamp "dev" (renamed to stamp_dev_aztec_version) — the real version is now applied at publish time by whichever path owns it.

The stamp_dev_aztec_version helper preserves the cat/rm pattern from #23174 so artifact file permissions aren't clobbered.

The assertContractArtifactsVersion() bypass from the original PR is omitted here because v5 doesn't have the bad v4.3.0 artifact in its compat matrix.

Verification (from the original PR)

  • npm release: DRY_RUN=1 ../../ci3/deploy_npm latest 5.1.0-test produced artifacts with aztec_version: "5.1.0-test".
  • docker release: built the docker image and inspected the contract artifacts inside — aztec_version matches $VERSION.

The v4.3.0 release shipped contract artifact JSONs with aztec_version: "dev"
baked in, because release-image/Dockerfile copies pre-built artifacts from an
earlier stage where REF_NAME isn't set (so stamp_aztec_version in
noir-projects/noir-contracts/bootstrap.sh falls back to "dev"). Mirror the
stdlib/package.json stamp pattern (75fd494) to re-stamp aztec_version in
every artifact under accounts/, noir-contracts.js/, and noir-test-contracts.js/
at image-build time.

Forward port of #23470 from backport-to-v4-next-staging.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@benesjan benesjan force-pushed the bj/fix-release-image-stamp-artifacts-fp branch from 9556432 to 36b6d32 Compare May 22, 2026 12:47
@benesjan benesjan marked this pull request as ready for review May 24, 2026 08:24
@benesjan benesjan requested a review from charlielye as a code owner May 24, 2026 08:24
@benesjan
Copy link
Copy Markdown
Contributor Author

Merging this as I just verified the fix worked on v4-next.

@benesjan benesjan merged commit 90de996 into merge-train/fairies May 24, 2026
18 of 20 checks passed
@benesjan benesjan deleted the bj/fix-release-image-stamp-artifacts-fp branch May 24, 2026 08:27
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