Skip to content

Commit 5d13224

Browse files
committed
docs(webapp): update agent guidance for the v3 engine removal
Refresh the CLAUDE.md / AGENTS.md / legacy-v3-code rule sections that described the now-deleted V1 files, and drop stale comment references to removed modules.
1 parent 2a22b01 commit 5d13224

4 files changed

Lines changed: 9 additions & 21 deletions

File tree

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ User API call -> Webapp routes -> Services -> RunEngine -> Redis Queue -> Superv
140140
- **internal-packages/schedule-engine**: Durable cron scheduling
141141
- **internal-packages/zod-worker**: Graphile-worker wrapper (DEPRECATED - use redis-worker)
142142

143-
### Legacy V1 Engine Code
143+
### v3 (engine V1) removed
144144

145-
The `apps/webapp/app/v3/` directory name is misleading - most code there is actively used by V2. Only specific files are V1-only legacy (MarQS queue, triggerTaskV1, cancelTaskRunV1, etc.). See `apps/webapp/CLAUDE.md` for the exact list. When you encounter V1/V2 branching in services, only modify V2 code paths. All new work uses Run Engine 2.0 (`@internal/run-engine`) and redis-worker.
145+
v3 (engine V1: MarQS + Graphile worker) is end-of-life and its execution code has been removed. The `apps/webapp/app/v3/` directory name is historical - everything there now serves V2 (Run Engine 2.0, `@internal/run-engine` + redis-worker). There is no V1 execution path: a `RunEngineVersion` `V1` branch only rejects gracefully so v3 clients get a clean 4xx, never a 5xx. Do not reintroduce V1. See `apps/webapp/CLAUDE.md` and `.claude/rules/legacy-v3-code.md`.
146146

147147
### Documentation
148148

apps/webapp/CLAUDE.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,9 @@ Do NOT add new jobs using zodworker/graphile-worker (legacy).
9898
- Socket.io: `app/v3/handleSocketIo.server.ts`, `app/v3/handleWebsockets.server.ts`
9999
- Electric SQL: Powers real-time data sync for the dashboard
100100

101-
## Legacy V1 Code
101+
## v3 (engine V1) removed
102102

103-
The `app/v3/` directory name is misleading - most code is actively used by V2. Only these specific files are V1-only legacy:
104-
- `app/v3/marqs/` (old MarQS queue system)
105-
- `app/v3/legacyRunEngineWorker.server.ts`
106-
- `app/v3/services/triggerTaskV1.server.ts`
107-
- `app/v3/services/cancelTaskRunV1.server.ts`
108-
- `app/v3/authenticatedSocketConnection.server.ts`
109-
- `app/v3/sharedSocketConnection.ts`
110-
111-
Some services (e.g., `cancelTaskRun.server.ts`, `batchTriggerV3.server.ts`) branch on `RunEngineVersion` to support both V1 and V2. When editing these, only modify V2 code paths.
103+
v3 (engine V1: MarQS + Graphile worker) is end-of-life and its execution code is gone. The `app/v3/` directory name is historical; everything under it now serves V2. There is no V1 execution path: a `RunEngineVersion` `V1` branch (e.g. in `triggerTask.server.ts`, `cancelTaskRun.server.ts`) only rejects/finalizes gracefully so v3 clients get a clean 4xx, never a 5xx. Do not reintroduce V1. See `.claude/rules/legacy-v3-code.md` for the deprecation boundary.
112104

113105
## Performance: Trigger Hot Path
114106

apps/webapp/app/v3/mollifierDrainerWorker.server.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,9 @@ declare global {
2626
* factory) guarantees a signal landing during boot can never find
2727
* the polling loop running without a graceful-stop path.
2828
*
29-
* The drainer is intentionally NOT wired through `~/services/worker.server`
30-
* — that file is the legacy ZodWorker / graphile-worker setup. The
31-
* mollifier drainer is a custom polling loop over `MollifierBuffer`, not
32-
* a graphile-worker job, so it gets its own lifecycle file alongside the
33-
* redis-worker workers (`commonWorker`, `alertsWorker`,
34-
* `batchTriggerWorker`).
29+
* The mollifier drainer is a custom polling loop over `MollifierBuffer`, not a
30+
* redis-worker job, so it gets its own lifecycle file alongside the redis-worker
31+
* workers (`commonWorker`, `alertsWorker`, `batchTriggerWorker`).
3532
*
3633
* Gating order:
3734
* - `TRIGGER_MOLLIFIER_DRAINER_ENABLED !== "1"` → early return. Unset defaults

apps/webapp/app/v3/services/batchTriggerV3.server.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,8 @@ type RunItemData = {
8686
* we increment the BatchTaskRun's completed count. Once the completed count is equal to the expected count, and the
8787
* batch is sealed, we can consider the batch completed.
8888
*
89-
* So now when the v3 batch is considered completed, we will enqueue the ResumeBatchRunService to resume the dependent
90-
* task attempt if there is one. This is in contrast to v2 batches where every time a task was completed, we would schedule
91-
* the ResumeBatchRunService to check if the batch was completed and set it to completed if it was.
89+
* When the v3 batch is considered completed it is marked COMPLETED. (Dependent-attempt
90+
* batches from batchTriggerAndWait only existed on the retired V1 engine.)
9291
*
9392
* We've also introduced a new column "resumedAt" that will be set when the batch is resumed. Previously in v2 batches, the status == "COMPLETED" was overloaded
9493
* to mean that the batch was completed and resumed. Now we have a separate column to track when the batch was resumed (and to make sure it's only resumed once).

0 commit comments

Comments
 (0)