Skip to content

fix(executor): mock the isolate in the loop join test so staging is green - #10274

Closed
waleedlatif1 wants to merge 2 commits into
stagingfrom
fix/condition-join-loop-isolate-mock
Closed

waleedlatif1 wants to merge 2 commits into
stagingfrom
fix/condition-join-loop-isolate-mock

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Staging's unit shard has been red since #10272 (Redis required) merged alongside #10262. #10272 mocked @/lib/execution/isolated-vm in test-hooks.test.ts, but not in condition-join-loop.test.ts, which landed in #10262 minutes earlier. Without the mock, the loop's continuation check fails and the loop stops after one iteration.

This adds one shared mock, isolatedVmMock / isolatedVmMockFns in @sim/testing, which runs the code as plain JavaScript by default. Every test that mocked the module locally now uses it:

  • The loop join test and test-hooks take the default.
  • The loop orchestrator, function execute-request and loop-ceiling tests keep their own results through isolatedVmMockFns.

Verification:

…e Redis-leased isolate

#10272 made isolated-vm require Redis and mocked it in test-hooks.test.ts, but the
condition-join-loop test from #10262 merged alongside it without that mock: its
loop's continuation check failed, the loop stopped after one iteration, and
staging's unit shard went red.
@vercel

vercel Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 21, 2026 4:52am UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Low impact] The change affects only the condition-join loop test.

The mock fits the loop's needs, but the shared-mock requirement must be satisfied before merging.

Findings

  1. P2 Another mock copy to maintain ▶

Summary

Adds a test-only mock of executeInIsolatedVM so the loop can check whether to continue without Redis.

  • The condition-join test evaluates its loop check without Redis.

Reviews (1) · Last reviewed commit: "fix(executor): run the loop join test's ..." · Reviewed by Greptile

…n JavaScript

Add isolatedVmMock/isolatedVmMockFns to @sim/testing and use it in every test that
mocked @/lib/execution/isolated-vm locally. The loop join test and test-hooks take the
default plain evaluation; the loop orchestrator, function execute-request and loop
ceiling tests keep their own results through isolatedVmMockFns.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

Superseded by #10275, which adds the shared isolated-vm mock and fixes the same test

@waleedlatif1
waleedlatif1 deleted the fix/condition-join-loop-isolate-mock branch November 21, 2026 04:53

This branch was previously deployed

1 inactive deployment
Preview — de41701f Deployed Nov 21, 2026 by vercel[bot]
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.

1 participant