Remove helpers package and inline ChainMocking into test_codegen#1251
Conversation
The previous root `pnpm test` ran all three e2e-tests files
(templates, e2e, install) in parallel, which OOMs on smaller
sessions because each fork triggers a concurrent `cargo build --lib`
for the envio NAPI addon — peak ~1.4 GB rust-lld + 1.2 GB rustc per
process.
The new script iterates scenarios/{e2e_test,test_codegen,fuel_test,svm_test}
sequentially, running `envio codegen && pnpm test` per scenario,
mirroring the per-scenario CI steps in build_and_verify.yml. The
test_codegen symlink for `.pnpmfile.cjs` matches the CI workaround
for its nested pnpm-workspace.
https://claude.ai/code/session_01X2K78WTDQnrd1dTm9VupNB
test_codegen covers the largest codegen surface so failures surface fastest. e2e_test is the longest-running (full indexer + Hasura queries) so it runs last. https://claude.ai/code/session_01X2K78WTDQnrd1dTm9VupNB
scenarios/helpers was only used by scenarios/test_codegen, and the nested pnpm-workspace.yaml in test_codegen was the reason .pnpmfile.cjs needed a symlink to be visible to nested pnpm installs triggered by `envio codegen`. Move helpers into scenarios/test_codegen/helpers/, register the new path in the root pnpm-workspace.yaml so `workspace:*` still resolves, delete the nested workspace + lockfile, and drop the symlink branch from the root `test` script. test_codegen now inherits the root `.pnpmfile.cjs` (artifact redirect) automatically. Verified: `pnpm exec envio codegen && pnpm test` in test_codegen runs 562/565 tests green (3 pre-existing skips). https://claude.ai/code/session_01X2K78WTDQnrd1dTm9VupNB
The helpers package contained a single ReScript file (ChainMocking.res) with one consumer: test/rollback/MockChainData.res. Its leftover @rescript/react and rescript-envsafe deps from the original "Official ReScript starter template" were never used by ChainMocking. Move ChainMocking.res next to its consumer in test/rollback/, switch the include from Helpers.ChainMocking.Make() to ChainMocking.Make(), drop the helpers workspace entry from pnpm-workspace.yaml, drop the helpers dep from test_codegen's package.json and rescript.json, and clear the stale CI symlink hack in build_and_verify.yml that the previous commit's nested-workspace removal already obsoleted. Verified: test_codegen runs 562/565 tests green. https://claude.ai/code/session_01X2K78WTDQnrd1dTm9VupNB
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (11)
💤 Files with no reviewable changes (8)
📝 WalkthroughWalkthroughThe PR removes a shared ChangesHelpers Module Removal and Test Orchestration Refactor
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Summary
Removes the
scenarios/helperspackage and inlines itsChainMockingmodule directly intoscenarios/test_codegen. This simplifies the monorepo structure by eliminating an unnecessary intermediate package dependency.Key Changes
scenarios/helpers/directory (package.json, README.md, rescript.json, .gitignore)ChainMocking.resfrom helpers intoscenarios/test_codegen/test/rollback/scenarios/test_codegen/to referenceChainMockingdirectly instead of through the helpers namespacehelpersworkspace dependency fromscenarios/test_codegen/package.jsonandrescript.jsonpnpm-workspace.yamlfromscenarios/test_codegen/(no longer needed without helpers reference)package.jsontest script to run codegen and tests for all scenario directories (test_codegen, fuel_test, svm_test, e2e_test).pnpmfile.cjssymlink workaround from build workflow (no longer necessary)Implementation Details
The
ChainMockingmodule is now co-located with its only consumer intest_codegen, eliminating the indirection of a separate helpers package. This reduces build complexity and makes dependencies more explicit.https://claude.ai/code/session_01X2K78WTDQnrd1dTm9VupNB
Summary by CodeRabbit