Skip to content

fix(kv-store): alphabetize devDependencies to keep yarn install idempotent#23112

Draft
AztecBot wants to merge 1 commit intomerge-train/fairiesfrom
claudebox/fix-fairies-txe-utility-auth
Draft

fix(kv-store): alphabetize devDependencies to keep yarn install idempotent#23112
AztecBot wants to merge 1 commit intomerge-train/fairiesfrom
claudebox/fix-fairies-txe-utility-auth

Conversation

@AztecBot
Copy link
Copy Markdown
Collaborator

@AztecBot AztecBot commented May 8, 2026

Why

Tests on merge-train/fairies were failing with SyntaxError: The requested module '@aztec/pxe/server' does not provide an export named 'composeHooks' (CI log: http://ci.aztec-labs.com/1778267162880855), even though the composeHooks export was correctly added in #23064 and present in source.

Root cause

yarn-project/kv-store/package.json had unsorted devDependencies (left over from #23096). yarn install --immutable reorders them in-place during CI bootstrap, modifying the tracked file mid-run. This trips a chain reaction:

  1. cache_content_hash sees the dirty file via git diff --name-only and exits 1 with "ERROR: Noticed changes to rebuild patterns during CI run".
  2. Inside yarn-project/bootstrap.sh's hash function, the $(cache_content_hash …) substitution silently captures empty stdout (the local hash=$(hash) Bash idiom masks the non-zero exit).
  3. The resulting cache key collapses to hash_str <noir> <bb> "" — independent of yarn-project content. Every run hits the same poisoned cache key, populated by an older build that pre-dates composeHooks.
  4. The stale pxe/dest/entrypoints/server/index.js ships without composeHooks, and Node ESM static linking fails when txe_oracle_top_level_context.ts imports it.

Fix

Alphabetize the devDependencies block. This is the order yarn produces on its own — committing it ahead of time means the install no longer modifies the working tree, no spurious rebuild_patterns diff, and the proper content-addressed cache key is used. Verified locally: yarn install --immutable is now idempotent (no working-tree changes).

A follow-up should harden cache_content_hash and the hash function so that an exit 1 in CI cannot silently turn into an empty hash component, but that is a separate infrastructure change.

ClaudeBox log: https://claudebox.work/s/598e12a1cadb1745?run=1

@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant