Skip to content

Commit 4d29a86

Browse files
committed
test(run-store): drop source line references from the mixedResidency comments
The comments cited runOpsStore.ts line numbers. They rotted three times inside this PR alone — a docstring edit or a formatter pass moves every one of them, and a stale pointer is worse than none. Keeps the symbol names, which are what actually locate the code and survive edits. Matches the convention unblockRouteCatalog states for itself: anchored by method name, never a line number. Comment-only.
1 parent bb5cf6d commit 4d29a86

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

internal-packages/run-store/src/runOpsStore.mixedResidency.test.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,10 @@ async function seedSharedEnv(prisma14: PrismaClient, suffix: string) {
195195
}
196196

197197
describe("RoutingRunStore — mixed-residency matrix (cuid #legacy + run-ops id #new coexisting)", () => {
198-
// ── Case 1: findRuns by a MIXED bounded id-set (#findRunsByIdSet, runOpsStore.ts:453) ──
198+
// ── Case 1: findRuns by a MIXED bounded id-set (#findRunsByIdSet) ──
199199
// A list-hydrate id set spans cuid (legacy) + run-ops id (new) ids plus a run-ops id absent from legacy.
200200
// Both resident runs returned; take/skip applied GLOBALLY post-merge; orderBy honored; the absent
201-
// run-ops id short-circuits (never probed on LEGACY, #fanOutPartitioned, :169).
201+
// run-ops id short-circuits (never probed on LEGACY, #fanOutPartitioned).
202202
heteroRunOpsPostgresTest(
203203
"case 1: findRuns by a mixed id-set returns both DBs' runs, ordered, take/skip global",
204204
async ({ prisma14, prisma17 }) => {
@@ -306,7 +306,7 @@ describe("RoutingRunStore — mixed-residency matrix (cuid #legacy + run-ops id
306306
}
307307
);
308308

309-
// ── Case 2: findRuns by an OPEN predicate (#findRunsOpen, runOpsStore.ts:468) ──
309+
// ── Case 2: findRuns by an OPEN predicate (#findRunsOpen) ──
310310
// No id set → query BOTH stores, union, dedup by id (NEW wins). Filter by a shared scalar
311311
// (runtimeEnvironmentId + status) that matches rows on both DBs.
312312
heteroRunOpsPostgresTest(
@@ -355,7 +355,7 @@ describe("RoutingRunStore — mixed-residency matrix (cuid #legacy + run-ops id
355355
}
356356
);
357357

358-
// ── Case 3: expireRunsBatch with a MIXED id list (runOpsStore.ts:727) ──
358+
// ── Case 3: expireRunsBatch with a MIXED id list ──
359359
// Partitions run-ops id→NEW / cuid→LEGACY; each leg called only when non-empty; counts summed; each row
360360
// updated on its OWN DB only.
361361
heteroRunOpsPostgresTest(
@@ -388,7 +388,7 @@ describe("RoutingRunStore — mixed-residency matrix (cuid #legacy + run-ops id
388388
}
389389
);
390390

391-
// ── Case 4: clearIdempotencyKey fan-out arm (byFriendlyIds, runOpsStore.ts:594) ──
391+
// ── Case 4: clearIdempotencyKey fan-out arm (byFriendlyIds) ──
392392
// byFriendlyIds spans mixed residency → fan out to both, sum the count, each row cleared on its home.
393393
heteroRunOpsPostgresTest(
394394
"case 4: clearIdempotencyKey byFriendlyIds clears across both DBs and sums the count",
@@ -429,7 +429,7 @@ describe("RoutingRunStore — mixed-residency matrix (cuid #legacy + run-ops id
429429
}
430430
);
431431

432-
// ── Case 5: countPendingWaitpoints scattered across both DBs (runOpsStore.ts:1150) ──
432+
// ── Case 5: countPendingWaitpoints scattered across both DBs ──
433433
// A run's pending waitpoints can be split across both stores mid-drain → count on each and sum.
434434
heteroRunOpsPostgresTest(
435435
"case 5: countPendingWaitpoints sums PENDING waitpoints scattered across both DBs",
@@ -465,7 +465,7 @@ describe("RoutingRunStore — mixed-residency matrix (cuid #legacy + run-ops id
465465
}
466466
);
467467

468-
// ── Case 6: findManyWaitpoints { id: { in: [...mixed...] } } (runOpsStore.ts:1330) ──
468+
// ── Case 6: findManyWaitpoints { id: { in: [...mixed...] } } ──
469469
// Merge waitpoints from both DBs for a mixed id set.
470470
heteroRunOpsPostgresTest(
471471
"case 6: findManyWaitpoints merges a mixed id set from both DBs",
@@ -495,7 +495,7 @@ describe("RoutingRunStore — mixed-residency matrix (cuid #legacy + run-ops id
495495

496496
// ── Case 8: findExecutionSnapshot / findManyExecutionSnapshots OPEN (no runId) where ──
497497
// A by-snapshot-id-only lookup (snapshot ids are non-classifiable cuids) must fan out NEW→LEGACY
498-
// (findExecutionSnapshot, :1012) / merge both (findManyExecutionSnapshots, :1027). Seed a snapshot on
498+
// (findExecutionSnapshot) / merge both (findManyExecutionSnapshots). Seed a snapshot on
499499
// EACH DB (one run-ops run on #new, one cuid run on #legacy) and read with a no-runId where.
500500
heteroRunOpsPostgresTest(
501501
"case 8: findExecutionSnapshot/findManyExecutionSnapshots with an open where reach both DBs",
@@ -544,7 +544,7 @@ describe("RoutingRunStore — mixed-residency matrix (cuid #legacy + run-ops id
544544
}
545545
);
546546

547-
// ── Case 9a: findRun with an UNCLASSIFIABLE where (spanId) on a #legacy run (#findRunUnrouted, :369) ──
547+
// ── Case 9a: findRun with an UNCLASSIFIABLE where (spanId) on a #legacy run (#findRunUnrouted) ──
548548
// A run-ops run on #new and a cuid run on #legacy each carry a distinct spanId. A spanId where can't
549549
// be id-classified → fan out NEW-first then LEGACY. The legacy-resident run must be found.
550550
heteroRunOpsPostgresTest(
@@ -586,7 +586,7 @@ describe("RoutingRunStore — mixed-residency matrix (cuid #legacy + run-ops id
586586
}
587587
);
588588

589-
// ── Case 9b: findRunOrThrow with an UNCLASSIFIABLE where (spanId) on a #legacy run (#findRunOrThrowUnrouted, :868) ──
589+
// ── Case 9b: findRunOrThrow with an UNCLASSIFIABLE where (spanId) on a #legacy run (#findRunOrThrowUnrouted) ──
590590
// The throwing twin must match findRun's fan-out: an unclassifiable where whose only matching run
591591
// lives on #legacy must NOT throw. A NEW-only fallback would miss the legacy run and throw.
592592
heteroRunOpsPostgresTest(
@@ -628,7 +628,7 @@ describe("RoutingRunStore — mixed-residency matrix (cuid #legacy + run-ops id
628628
}
629629
);
630630

631-
// ── Case 7: findManyTaskRunWaitpoints with edges whose relations STRADDLE DBs (runOpsStore.ts:1577) ──
631+
// ── Case 7: findManyTaskRunWaitpoints with edges whose relations STRADDLE DBs ──
632632
// An edge co-locates with its RUN, but its `waitpoint`/`taskRun` relations can live on the OTHER DB
633633
// (a cuid token blocking a run-ops run, and vice versa). The per-leg scalar query is stripped of the
634634
// relation keys; the router re-hydrates `waitpoint`/`taskRun` across BOTH DBs. Exercises BOTH
@@ -721,7 +721,7 @@ describe("RoutingRunStore — mixed-residency matrix (cuid #legacy + run-ops id
721721
}
722722
);
723723

724-
// ── Case 7b: the "blocking waitpoint not found on either DB" HARD ERROR (#hydrateEdgeWaitpointsCrossDb, runOpsStore.ts:1641) ──
724+
// ── Case 7b: the "blocking waitpoint not found on either DB" HARD ERROR (#hydrateEdgeWaitpointsCrossDb) ──
725725
// An edge whose `waitpointId` resolves on NEITHER DB must throw rather than leave a null status that
726726
// would strand (hang) or wrongly unblock the run.
727727
heteroRunOpsPostgresTest(
@@ -748,7 +748,7 @@ describe("RoutingRunStore — mixed-residency matrix (cuid #legacy + run-ops id
748748
}
749749
);
750750

751-
// ── Case 10: findBatchTaskRunById / findBatchTaskRunByFriendlyId NEW-then-LEGACY probe (:1759, :1772) ──
751+
// ── Case 10: findBatchTaskRunById / findBatchTaskRunByFriendlyId NEW-then-LEGACY probe ──
752752
// A batch resident on #legacy AND a run-ops-id batch landed on #new (the control-plane window mints
753753
// cuid ids, but a run-ops batch resides on #new) are BOTH found via the probe, regardless of id-shape.
754754
heteroRunOpsPostgresTest(
@@ -792,7 +792,7 @@ describe("RoutingRunStore — mixed-residency matrix (cuid #legacy + run-ops id
792792
}
793793
);
794794

795-
// ── Case 11a: updateManyWaitpoints with a NO-ID (batch) where fans out to both and sums (:1522) ──
795+
// ── Case 11a: updateManyWaitpoints with a NO-ID (batch) where fans out to both and sums ──
796796
// A batch where (no single routable id, e.g. completedByTaskRunId IS NULL + status PENDING) must
797797
// apply on BOTH DBs and sum the count.
798798
heteroRunOpsPostgresTest(

0 commit comments

Comments
 (0)