Skip to content

Commit fa32df2

Browse files
d-csclaude
andcommitted
chore(run-ops split): strip test-plan scaffolding from PR10 routes/tests
Comment/label/title cleanup only — no product logic or test behavior changed. Removes leftover enumeration scaffolding across the PR10 files: Test A-D and Leg 1-4 case markers, (A)/(B)/(D) parenthesized markers, Step 1-3 prefixes, and --- comment framing, while preserving the behavioral prose and the describe/it titles. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 9e958b2 commit fa32df2

5 files changed

Lines changed: 19 additions & 21 deletions

apps/webapp/app/routes/api.v1.runs.$runFriendlyId.input-streams.wait.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const { action, loader } = createActionApiRoute(
7878
}
7979
}
8080

81-
// Step 1: Create the waitpoint. Co-locate it with the owning run (run-ops split) so a ksuid
81+
// Create the waitpoint. Co-locate it with the owning run (run-ops split) so a ksuid
8282
// run's input-stream waitpoint lands on the run's DB and its block edge resolves.
8383
const result = await engine.createManualWaitpoint({
8484
runId: run.id,
@@ -90,7 +90,7 @@ const { action, loader } = createActionApiRoute(
9090
tags: bodyTags,
9191
});
9292

93-
// Step 2: Cache the mapping in Redis for fast lookup from .send()
93+
// Cache the mapping in Redis for fast lookup from .send()
9494
const ttlMs = timeout ? timeout.getTime() - Date.now() : undefined;
9595
await setInputStreamWaitpoint(
9696
run.friendlyId,
@@ -99,7 +99,7 @@ const { action, loader } = createActionApiRoute(
9999
ttlMs && ttlMs > 0 ? ttlMs : undefined
100100
);
101101

102-
// Step 3: Check if data was already sent to this input stream (race condition handling).
102+
// Check if data was already sent to this input stream (race condition handling).
103103
// If .send() landed before .wait(), the data is in the S2 stream but no waitpoint
104104
// existed to complete. We check from the client's last known position.
105105
if (!result.isCached) {

apps/webapp/app/routes/api.v1.runs.$runFriendlyId.session-streams.wait.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ const { action, loader } = createActionApiRoute(
9999
}
100100
}
101101

102-
// Step 1: Create the waitpoint. Co-locate it with the owning run (run-ops split) so a ksuid
102+
// Create the waitpoint. Co-locate it with the owning run (run-ops split) so a ksuid
103103
// run's session-stream waitpoint lands on the run's DB and its block edge resolves.
104104
const result = await engine.createManualWaitpoint({
105105
runId: run.id,
@@ -111,7 +111,7 @@ const { action, loader } = createActionApiRoute(
111111
tags: bodyTags,
112112
});
113113

114-
// Step 2: Register the waitpoint on the session channel so the next
114+
// Register the waitpoint on the session channel so the next
115115
// append fires it. Keyed by (environmentId, addressingKey, io) — the
116116
// canonical string for the row, scoped to the environment because
117117
// externalIds are only unique per environment. The append handler
@@ -126,7 +126,7 @@ const { action, loader } = createActionApiRoute(
126126
ttlMs && ttlMs > 0 ? ttlMs : undefined
127127
);
128128

129-
// Step 3: Race-check. If a record landed on the channel before this
129+
// Race-check. If a record landed on the channel before this
130130
// .wait() call, complete the waitpoint synchronously with that data
131131
// and remove the pending registration.
132132
if (!result.isCached) {

apps/webapp/test/api.v1.waitpoints.tokens.complete.crossSeamGuard.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function buildEngine(opts: {
5454
}
5555

5656
describe("waitpoint-token complete route — cross-seam guard", () => {
57-
// (A) the completion path consults the guard FIRST with routeKind RESUME_TOKEN
57+
// The completion path consults the guard FIRST with routeKind RESUME_TOKEN
5858
// recording the waitpointId, then delegates and the waitpoint becomes COMPLETED.
5959
containerTest(
6060
"consults the guard first (RESUME_TOKEN), then completes (single-store)",
@@ -96,7 +96,7 @@ describe("waitpoint-token complete route — cross-seam guard", () => {
9696
}
9797
);
9898

99-
// (B) an injected guard that throws (unclassifiable) causes completeWaitpoint
99+
// An injected guard that throws (unclassifiable) causes completeWaitpoint
100100
// to reject and the waitpoint stays PENDING (loud, not silently applied).
101101
containerTest(
102102
"propagates a guard throw and leaves the waitpoint PENDING (loud)",
@@ -132,7 +132,7 @@ describe("waitpoint-token complete route — cross-seam guard", () => {
132132
);
133133
});
134134

135-
// (D) no-FK-abort: with the Waitpoint table split off control-plane, the env/project Cascade
135+
// no-FK-abort: with the Waitpoint table split off control-plane, the env/project Cascade
136136
// FKs are physically absent. Completing a waitpoint (status flip) must not trip a now-missing FK
137137
// on EITHER the PG14 (legacy) or PG17 (new) store. Seed + complete on the SAME store (single-store
138138
// write, no two-store router). The DB is never mocked: writes hit the real PG14/PG17 containers.

apps/webapp/test/api.v1.waitpoints.tokens.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function buildEngine(opts: {
6464
}
6565

6666
describe("waitpoint-token create engine seam — residency-keyed id contract", () => {
67-
// Test A: a standalone token (no owning run) mints a cuid WaitpointId and stays LEGACY.
67+
// A standalone token (no owning run) mints a cuid WaitpointId and stays LEGACY.
6868
containerTest(
6969
"create mints a cuid WaitpointId for a standalone token (LEGACY)",
7070
async ({ prisma, redisOptions }) => {
@@ -99,7 +99,7 @@ describe("waitpoint-token create engine seam — residency-keyed id contract", (
9999
}
100100
);
101101

102-
// Test B: the standalone token id classifies LEGACY and resolves back.
102+
// The standalone token id classifies LEGACY and resolves back.
103103
containerTest(
104104
"token id classifies to the legacy store and resolves back",
105105
async ({ prisma, redisOptions }) => {
@@ -129,7 +129,7 @@ describe("waitpoint-token create engine seam — residency-keyed id contract", (
129129
}
130130
);
131131

132-
// Test C: the control-plane WaitpointTag write stays control-plane — it cannot
132+
// The control-plane WaitpointTag write stays control-plane — it cannot
133133
// route through the run-ops store, which exposes no tag-write surface at all.
134134
containerTest(
135135
"control-plane WaitpointTag write stays control-plane, not on the run-ops store",
@@ -330,7 +330,7 @@ function makeRouter(prisma14: PrismaClient, prisma17: RunOpsPrismaClient) {
330330
}
331331

332332
describe("waitpoint-token create engine seam — NEW residency via a ksuid run across the version boundary", () => {
333-
// Test D: NEW residency comes from co-locating the token with a ksuid run; the token
333+
// NEW residency comes from co-locating the token with a ksuid run; the token
334334
// resolves only on its owning (#new) store across the PG14<->PG17 boundary, never #legacy.
335335
twoDbEngineTest(
336336
"a ksuid run's token co-locates on #new and resolves only there, not on #legacy",

apps/webapp/test/crossSeamGuard.proof.test.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { WaitpointId } from "@trigger.dev/core/v3/isomorphic";
1616
const NEW_WP = WaitpointId.toFriendlyId("0".repeat(27)); // 27-char internal body → NEW
1717
const LEGACY_WP = WaitpointId.toFriendlyId("c".repeat(25)); // 25-char internal body → LEGACY
1818

19-
describe("cross-seam guard — exhaustive per-route store selection (Leg 1)", () => {
19+
describe("cross-seam guard — exhaustive per-route store selection", () => {
2020
for (const route of UNBLOCK_ROUTES) {
2121
it(`routes ${route.id} (${route.kind}) to new store for a NEW waitpoint`, () => {
2222
const d = selectStoreForWaitpoint({ waitpointId: NEW_WP, routeKind: route.kind });
@@ -32,7 +32,7 @@ describe("cross-seam guard — exhaustive per-route store selection (Leg 1)", ()
3232
}
3333
});
3434

35-
describe("cross-seam guard — single-DB no-op (Leg 2)", () => {
35+
describe("cross-seam guard — single-DB no-op", () => {
3636
for (const route of UNBLOCK_ROUTES) {
3737
it(`${route.id}: single-DB returns legacy without consulting the classifier`, () => {
3838
const calls: string[] = [];
@@ -70,7 +70,7 @@ function tally(sites: string[]): Record<string, number> {
7070
return counts;
7171
}
7272

73-
describe("cross-seam guard — CI drift guard (Leg 3)", () => {
73+
describe("cross-seam guard — CI drift guard", () => {
7474
it("per-file completeWaitpoint( tally in source matches the catalog", () => {
7575
const root = repoRoot();
7676

@@ -90,17 +90,15 @@ describe("cross-seam guard — CI drift guard (Leg 3)", () => {
9090
});
9191
});
9292

93-
// ---------------------------------------------------------------------------
94-
// Leg 4 — PG14+PG17 hetero-fixture proof. The pure legs above prove the guard
95-
// SELECTS the right store; this leg proves the selected store corresponds to the
93+
// PG14+PG17 hetero-fixture proof. The pure-selection tests above prove the guard
94+
// SELECTS the right store; this proves the selected store corresponds to the
9695
// DB the Waitpoint row PHYSICALLY lives in, on a REAL heterogeneous PG14+PG17
9796
// fixture. NEVER mock. Seed Org->Project->Env (parents before children, or the
9897
// required Waitpoint.projectId/environmentId FKs abort the insert) then the
9998
// Waitpoint, on the matching DB ONLY: NEW residency on PG17, LEGACY on PG14. The
10099
// cross-DB toBeNull checks then prove no ghost row leaked to the other version.
101100
// Seed pattern copied from
102101
// internal-packages/run-engine/src/engine/tests/crossVersionCompat.test.ts.
103-
// ---------------------------------------------------------------------------
104102

105103
const FIXED_TS = "2024-01-01 00:00:00+00";
106104

@@ -161,7 +159,7 @@ async function seedWaitpoint(
161159
);
162160
}
163161

164-
describe("cross-seam guard — PG14+PG17 hetero-fixture proof (Leg 4)", () => {
162+
describe("cross-seam guard — PG14+PG17 hetero-fixture proof", () => {
165163
heteroPostgresTest(
166164
"exhaustive routes resolve to the physically-correct store on PG14+PG17",
167165
async ({ prisma14, prisma17 }) => {

0 commit comments

Comments
 (0)