fix(files): dispatch search indexing from Trigger workers - #7293
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR routes workspace-file indexing through Trigger.dev whenever execution is already inside a Trigger worker and simplifies sandbox image builds to a stable task ID.
Confidence Score: 4/5The rollout compatibility gap should be fixed before merging because old replicas or queued revisioned tasks can leave sandbox image builds pending. The new worker removes every handler for the task ID emitted by the previous web release even though web and Trigger deployments can overlap, so builds created during that window may not execute until their pending records become stale. Files Needing Attention: apps/sim/lib/execution/remote-sandbox/image-registry.ts; apps/sim/background/sandbox-image-build.ts
|
| Filename | Overview |
|---|---|
| apps/sim/lib/workspace-files/search/dispatcher.ts | Correctly selects Trigger.dev for indexing when either deployment configuration or active Trigger runtime context requires it. |
| apps/sim/lib/execution/remote-sandbox/image-registry.ts | Introduces the stable sandbox-build task ID, but mixed-version deployments can still emit the removed revisioned ID. |
| apps/sim/background/sandbox-image-build.ts | Removes revisioned compatibility handlers before old producers and queued task IDs are guaranteed to have drained. |
| apps/sim/lib/workspace-files/search/dispatcher.test.ts | Adds focused coverage for the new Trigger dispatch predicate. |
| apps/sim/lib/execution/remote-sandbox/image-registry.test.ts | Updates the task-ID assertion but does not cover mixed-version rollout compatibility. |
Sequence Diagram
sequenceDiagram
participant W as Old web replica
participant T as Trigger.dev
participant N as New worker
participant D as Sandbox image row
W->>D: Create pending build
W->>T: Trigger sandbox-image-build-v2
Note over N: Registers only sandbox-image-build
T--xN: No matching v2 handler
Note over D: Remains pending until stale/reclaimed
Reviews (1): Last reviewed commit: "fix(files): dispatch search indexing fro..." | Re-trigger Greptile
Summary
Type of Change
Testing
bun run lintbun run type-checkbun run check:audits(39 audits)origin/stagingChecklist
staging