Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Problem
Intermittently, one Playwright platform shard's local Convex backend boots into a state where every node action fails with the node executor unable to find its own extracted source:
[CONVEX A(organizations/actions:initializeDefaultWorkflows)] Server Error
Cannot find module '/tmp/.tmpNVAFWc/source/cfdccccd-3055-4549-8f1a-1f540bedffd6/modules/organizations/actions.js' imported from /
[CONVEX A(branding/file_actions:readBranding)] Server Error
Cannot find module '/tmp/.tmpNVAFWc/source/.../modules/branding/file_actions.js' imported from /
The shard then burns its full budget on retries: auth-account.spec.ts stalls in createOrgViaWizard (tests/e2e/helpers/auth.ts:160) waiting for the provider step's Skip button, because organizations/actions:initializeDefaultWorkflows (a node action in the org-create flow) dies — while POST /api/auth/organization/create and set-active both return 200 (db-side fine). Even readBranding on the login page fails, so the poisoning is executor-wide and never self-heals for the shard's ~15-minute life.
Current behaviour (evidence)
- feat/migrations-revamp @ 6b040d9, shard 14/16: https://github.com/tale-project/tale/actions/runs/29133201097/job/86492601365 — 3 specs × 3 retries, all 1.6 m (
TIMEOUT.EXECUTION), all stuck on wizard step 1 ("Step 1 of 3: Workspace" in the failure snapshot, Next enabled, no error toast). - Trace network (playwright-report-shard-14 artifact):
organization/create200 in 1.1 s; trace console: the module-not-found errors above, starting with the shard's first attempt → broken from boot, not poisoned mid-run. - main @ a88eb12: https://github.com/tale-project/tale/actions/runs/29138407233 — same spec file, same
toBeVisiblestall (also failed on main @ 4a76694 the day before). The other 15 shards (own stacks, same commit) pass, and the same shard passes on other commits → low-probability boot race, branch-independent.
Proposed change
- Diagnose the extraction race in the local backend's node executor at boot (double push during
tale devE2E boot —npx convex dev --oncepreflight + dev-engine — is a candidate window; the executor keeps serving a source dir that no longer exists). - Repo-side mitigation regardless of root cause: after the webServer boot (
services/platform/playwright.config.tswebServer →scripts/dev.ts), probe one cheap node action and fail the boot with a distinctive error if it can't resolve its module — turning 15 minutes of opaque spec retries into an immediate, greppable boot failure.
Acceptance criteria
- A boot-time probe (or equivalent) makes a broken node executor fail the E2E webServer start with an explicit "node executor unhealthy" error instead of per-spec timeouts.
- Root cause of the missing
/tmp/.tmp*/source/<uuid>extraction identified and fixed or upstream-reported (convex-local-backend). -
auth-account.spec.tsno longer fails with this signature across 20 consecutive E2E runs (noCannot find module .../modules/in any shard's console).
Activity
yannickmonney commentedon Jul 11, 2026
Reproduced on a plain local dev boot (2026-07-11, main @ 94ef84e) — this is not E2E-shard-specific:
bun scripts/dev.tscold boot (60s, full module push) → node actions work.Cannot find module '/var/folders/…/T/.tmpXXXX/source/<uuid>/modules/<fn>.js' imported from …/local.cjs.Observed failing on that boot:
organizations/actions:initializeDefaultWorkflows(blocks the create-org wizard entirely — see #2635 for the silent-failure UI),workflow_engine/internal_actions:scanAndTrigger(cron, retries and errors every minute),agents/file_actions:listAgents(chat shows "No agents available").Recovery that worked: force any content change under
convex/(I dropped a throwawayconvex/_qa_touch.tswithexport {}, then deleted it) — the watcher's full re-push restores the executor immediately.So the trigger looks like: a fresh backend process + a skipped/no-op push leaves the node executor's extracted source dir unpopulated; the failing paths reference the previous boot's temp dir contents. Anything that guarantees a real push on boot (or re-extraction from storage) should fix both the E2E shards and local dev.
yannickmonney commentedon Jul 11, 2026
Status after PR #2674: AC 1 shipped —
scripts/node-executor-probe.tsprobes a cheap node action after the E2E webServer boot and fails the start with a distinctive node executor unhealthy error instead of 15 minutes of per-spec retries. AC 2 (root cause): hypothesis documented —dev-engine.tsrunsconvex dev --oncepreflight then a separate persistentspawnConvex(), a literal double-push window in which the executor can keep serving an extracted source dir that no longer exists; unverified beyond static reading, likely needs an upstream convex-local-backend report. AC 3 needs 20 consecutive clean CI runs — observable only after merge.yannickmonney commentedon Jul 12, 2026
Two more reproductions on a local dev stack (2026-07-12, main @ 5605bf5, mode A per
tests/manual/SETUP.md):bun install: org scaffolding silently failed —save-auth-state.tstimed out waiting for the seeded "E2E Assistant" (its node action never ran); no error surfaced anywhere user-visible.bun scripts/dev.tsagainst the existing.convex/localstate hit the same broken-executor condition.Both recovered deterministically with the touch-file workaround (create + delete a throwaway
convex/_qa_touch.tswithexport {}to force the watcher's module re-push), verified green byscripts/node-executor-probe.tseach time. The probe is a reliable detector; the failure mode remains "boot that skips the module push".yannickmonney commentedon Jul 18, 2026
Fresh frequency evidence from the chat-TTFT PR series (2026-07-18): this extraction race was the only source of CI red across three consecutive PRs, hitting a different shard each time during the E2E preflight boot:
Playwright (platform 7/16)—node executor unhealthy: its extracted action source is missingPlaywright (platform 6/16)— same signaturePlaywright (platform 12/16)—Cannot find module '/tmp/.tmp…/source/…/modules/branding/file_actions.js' imported from /tmp/.tmp…/local.cjsEach time a plain
gh run rerun --failedpassed on the retry, so it's purely the boot-time extraction race (~1-in-16 shard boots across these runs). Also reproduced locally twice in the same period (recovery: touch-file re-push). Worth a bump in priority — it currently taxes every PR with a manual rerun round-trip.feat(platform): run the dev loop on the backend
feat(platform): run the dev loop on the backend
yannickmonney commentedon Sep 27, 2026
Closing as obsolete. fd5c009 (#3107, v0.5.0) deleted the local Convex backend and its node executor, including
convex.config.tsandscripts/node-executor-probe.ts. Dev and E2E now boot the Hono backend (services/platform/scripts/backend-supervisor.ts,dev-engine.ts), so the source-extraction race cannot occur.