Skip to content

fix(e2e): keep timing_env testEnvironment through yarn prepare - #24328

Merged
PhilWindle merged 1 commit into
merge-train/spartan-v5from
phil/fix-e2e-timing-testenv-inherit
Jun 26, 2026
Merged

fix(e2e): keep timing_env testEnvironment through yarn prepare#24328
PhilWindle merged 1 commit into
merge-train/spartan-v5from
phil/fix-e2e-timing-testenv-inherit

Conversation

@PhilWindle

Copy link
Copy Markdown
Contributor

Problem

PR #24281 added end-to-end/src/shared/timing_env.mjs and set the jest testEnvironment to ./shared/timing_env.mjs directly in end-to-end/package.json. But testEnvironment is an inherited field: the package.json generator (scripts/update_package_jsons.mjs) shallow-merges each package's jest block with the parent winning, and package.common.json sets testEnvironment to ../../foundation/src/jest/env.mjs.

As a result, yarn prepare reverts the override back to the foundation env, and yarn prepare:check (run by the pre-commit hook) fails. The inconsistency reached merge-train/spartan-v5 because GitHub squash-merge doesn't run the local pre-commit hook, so anyone merging this base and committing locally now hits the failure.

Fix

Move the testEnvironment override into end-to-end/package.local.json, which the generator applies last, so the timing test environment survives prepare and the generated end-to-end/package.json stays consistent with the inherits sources.

Verified: node scripts/update_package_jsons.mjs --check passes with this change and leaves end-to-end/package.json pointing at ./shared/timing_env.mjs.

PR #24281 set end-to-end's jest testEnvironment to ./shared/timing_env.mjs directly in
package.json, but testEnvironment is an inherited field: the package.json generator
shallow-merges the jest block with the parent winning, and package.common.json sets
testEnvironment to ../../foundation/src/jest/env.mjs. So 'yarn prepare' reverts the
override and prepare:check fails (the inconsistency slipped onto the base because GitHub
squash-merge does not run the local pre-commit hook).

Move the override into end-to-end/package.local.json, which the generator applies last,
so the timing test environment survives prepare and the check stays consistent.
@PhilWindle
PhilWindle enabled auto-merge (squash) June 26, 2026 12:34
@AztecBot

Copy link
Copy Markdown
Collaborator

Flakey Tests

🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry.

\033FLAKED\033 (8;;http://ci.aztec-labs.com/83882c5f3fb3486c�83882c5f3fb3486c8;;�): yarn-project/end-to-end/scripts/run_test.sh ha src/composed/ha/e2e_ha_full.parallel.test.ts "should produce blocks with HA coordination and attestations" (67s) (code: 0)

@PhilWindle
PhilWindle merged commit 6b9aa1a into merge-train/spartan-v5 Jun 26, 2026
12 checks passed
@PhilWindle
PhilWindle deleted the phil/fix-e2e-timing-testenv-inherit branch June 26, 2026 13:01
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.

3 participants