Skip to content

Remove helpers package and inline ChainMocking into test_codegen#1251

Merged
DZakh merged 5 commits into
mainfrom
claude/gifted-cannon-rQN8j
May 29, 2026
Merged

Remove helpers package and inline ChainMocking into test_codegen#1251
DZakh merged 5 commits into
mainfrom
claude/gifted-cannon-rQN8j

Conversation

@DZakh

@DZakh DZakh commented May 29, 2026

Copy link
Copy Markdown
Member

Summary

Removes the scenarios/helpers package and inlines its ChainMocking module directly into scenarios/test_codegen. This simplifies the monorepo structure by eliminating an unnecessary intermediate package dependency.

Key Changes

  • Deleted scenarios/helpers/ directory (package.json, README.md, rescript.json, .gitignore)
  • Moved ChainMocking.res from helpers into scenarios/test_codegen/test/rollback/
  • Updated scenarios/test_codegen/ to reference ChainMocking directly instead of through the helpers namespace
  • Removed helpers workspace dependency from scenarios/test_codegen/package.json and rescript.json
  • Removed pnpm-workspace.yaml from scenarios/test_codegen/ (no longer needed without helpers reference)
  • Updated root package.json test script to run codegen and tests for all scenario directories (test_codegen, fuel_test, svm_test, e2e_test)
  • Removed .pnpmfile.cjs symlink workaround from build workflow (no longer necessary)

Implementation Details

The ChainMocking module is now co-located with its only consumer in test_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

  • Chores
    • Reorganized test infrastructure to run multiple test scenarios sequentially during verification.
    • Simplified workspace configuration by consolidating helper modules.
    • Updated module references to remove intermediate dependency layers.
    • Removed unnecessary symlink creation in CI/CD workflow.

Review Change Stack

claude added 4 commits May 28, 2026 15:16
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
@coderabbitai

coderabbitai Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7eceed1d-7ada-4395-b5d1-47a14eef1dc2

📥 Commits

Reviewing files that changed from the base of the PR and between eab520f and 35b287b.

⛔ Files ignored due to path filters (2)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • scenarios/test_codegen/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (11)
  • .github/workflows/build_and_verify.yml
  • package.json
  • scenarios/helpers/.gitignore
  • scenarios/helpers/README.md
  • scenarios/helpers/package.json
  • scenarios/helpers/rescript.json
  • scenarios/test_codegen/package.json
  • scenarios/test_codegen/pnpm-workspace.yaml
  • scenarios/test_codegen/rescript.json
  • scenarios/test_codegen/test/rollback/ChainMocking.res
  • scenarios/test_codegen/test/rollback/MockChainData.res
💤 Files with no reviewable changes (8)
  • scenarios/helpers/README.md
  • scenarios/helpers/.gitignore
  • scenarios/helpers/package.json
  • scenarios/test_codegen/rescript.json
  • scenarios/test_codegen/pnpm-workspace.yaml
  • scenarios/helpers/rescript.json
  • scenarios/test_codegen/package.json
  • .github/workflows/build_and_verify.yml

📝 Walkthrough

Walkthrough

The PR removes a shared scenarios/helpers ReScript module and refactors the root test script to iterate through scenario directories (test_codegen, fuel_test, svm_test, e2e_test), running codegen and tests in each. The CI workflow is simplified by removing symlink setup. Import statements in test code are updated to reference modules directly instead of through the Helpers namespace.

Changes

Helpers Module Removal and Test Orchestration Refactor

Layer / File(s) Summary
Test orchestration and workflow updates
package.json, .github/workflows/build_and_verify.yml
Root test script changed from running pnpm --filter e2e-tests test to a for-loop iterating over test_codegen, fuel_test, svm_test, e2e_test directories, executing codegen and test commands within each. CI workflow removes the symlink setup for .pnpmfile.cjs in the test_codegen step.
Scenario configuration updates
scenarios/test_codegen/package.json, scenarios/test_codegen/rescript.json
Removed helpers from test_codegen devDependencies and ReScript build dependencies.
Test code import updates
scenarios/test_codegen/test/rollback/MockChainData.res
Updated module include directive from Helpers.ChainMocking.Make() to ChainMocking.Make() to use ChainMocking directly.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • enviodev/hyperindex#997: Both PRs update CI/test codegen invocation to use pnpm exec envio codegen, removing PATH/symlink-style handling in the workflows.

Suggested reviewers

  • JonoPrest
  • moose-code
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the main changes: removing the helpers package and inlining ChainMocking into test_codegen.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@DZakh DZakh enabled auto-merge (squash) May 29, 2026 09:48
@DZakh DZakh merged commit 449af6a into main May 29, 2026
8 checks passed
@DZakh DZakh deleted the claude/gifted-cannon-rQN8j branch May 29, 2026 09:59
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.

2 participants