Skip to content

regex_match gates fail in the standalone runtime: Cannot find module 're2js' #457

Description

@khaliqgant

Found while running tests/authored-node-runtime.test.ts under Bun 1.4.0 for #449 (the suite is skipped on hosts with another Bun, so this went unnoticed).

packages/sdk/src/named-gate-lowering.ts embeds the RE2 engine into the gate command via createRequire(import.meta.url).resolve('re2js'). In the standalone relayflows CLI the authored runner executes from a temp dir where re2js is not resolvable, so every .gate({ type: 'regex_match', … }) fails with Cannot find module 're2js'. The other three named gates are unaffected; #449's Bun test uses word_count_bounds to sidestep it.

Pre-existing on main before #449. Fix options: bundle re2js into the standalone runner, or resolve it relative to the SDK's own dist at lowering time and embed the source (as the code already intends) rather than resolving at execution.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    garden-readyScoped and ready for an agent to pick up

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions