Skip to content

Commit dc74c57

Browse files
d-csclaude
andcommitted
refactor(run-ops): drop known-migrated read layer; residency is id-shape only
Migration/drain is deferred, so residency is decided purely by id-shape (ownerEngine): 25-char cuid -> LEGACY, 27-char ksuid -> NEW, unclassifiable -> LEGACY. This is behavior-preserving in production, which never injected a custom isKnownMigrated and, with no migration, always saw the default false. - delete knownMigratedFilter.server.ts + its test - readThrough: drop the isKnownMigrated dep + migrated short-circuit; KEEP the unclassifiable->LEGACY new-then-legacy fallback - resolveInheritedMintKind: collapse to pure ownerEngine id-shape (no deps) - mintBatchFriendlyId: drop isKnownMigrated/isSplitEnabled from ResolveDeps - runEngineHandlersShared: drop isKnownMigrated from EventReadDeps/readRunForEvent (batch-write residency probe via newReplica.batchTaskRun.findFirst is untouched) - tests: delete injected-marker cases, keep pure id-shape assertions Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent bba6506 commit dc74c57

10 files changed

Lines changed: 34 additions & 510 deletions

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ export type EventReadDeps = {
1616
newReplica: PrismaReplicaClient;
1717
legacyReplica: PrismaReplicaClient;
1818
splitEnabled: boolean;
19-
// Pure boundaries forwarded to read-through; production leaves them undefined
20-
// so the read-through layer uses its own wired defaults. Tests inject fakes.
21-
isKnownMigrated?: (runId: string) => Promise<boolean>;
19+
// Pure boundary forwarded to read-through; production leaves it undefined
20+
// so the read-through layer uses its own wired default. Tests inject a fake.
2221
isPastRetention?: (runId: string) => boolean;
2322
};
2423

@@ -43,7 +42,6 @@ export async function readRunForEvent<S extends Prisma.TaskRunSelect>(
4342
newClient: deps.newReplica,
4443
legacyReplica: deps.legacyReplica,
4544
splitEnabled: deps.splitEnabled,
46-
isKnownMigrated: deps.isKnownMigrated,
4745
isPastRetention: deps.isPastRetention,
4846
},
4947
});

apps/webapp/app/v3/runOpsMigration/knownMigratedFilter.server.test.ts

Lines changed: 0 additions & 133 deletions
This file was deleted.

apps/webapp/app/v3/runOpsMigration/knownMigratedFilter.server.ts

Lines changed: 0 additions & 138 deletions
This file was deleted.

0 commit comments

Comments
 (0)