You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
regex_match gates fail in the standalone runtime: Cannot find module 're2js' #457
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.
Triage 2026-10-05: VALID — still present on main (3c58ee1). embeddedRE2() (packages/sdk/src/named-gate-lowering.ts:12-15) resolves re2js via createRequire(import.meta.url), which fails inside the standalone authored-node payload built by scripts/build-standalone-cli.mjs:21-27 (inlined and run from a temp dir). The workaround in packages/sdk/tests/authored-node-runtime.test.ts:132 (word_count_bounds instead of regex_match) is still there. Acceptance: bundle or inline re2js into the standalone payload, add a regex_match gate to that runtime test, and have it pass under the standalone build.
Activity
AgentRelayBot commentedon Oct 5, 2026
Triage 2026-10-05: VALID — still present on main (3c58ee1).
embeddedRE2()(packages/sdk/src/named-gate-lowering.ts:12-15) resolvesre2jsviacreateRequire(import.meta.url), which fails inside the standalone authored-node payload built byscripts/build-standalone-cli.mjs:21-27(inlined and run from a temp dir). The workaround inpackages/sdk/tests/authored-node-runtime.test.ts:132(word_count_boundsinstead ofregex_match) is still there. Acceptance: bundle or inlinere2jsinto the standalone payload, add aregex_matchgate to that runtime test, and have it pass under the standalone build.