Skip to content

Commit 6218d52

Browse files
PR Batch Testerclaude
andcommitted
test(server): start the page-boundary replay on a page of only unknown rows
The previous fixture started before the known "before" event, so no page was entirely unknown rows. A read that stopped on an all-unknown page still passed. Start after "before" so the first page is all unknown. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
1 parent 3e502d0 commit 6218d52

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎apps/server/src/persistence/Layers/OrchestrationEventStore.test.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,6 @@ layer("OrchestrationEventStore", (it) => {
582582
Effect.gen(function* () {
583583
const store = yield* OrchestrationEventStore.OrchestrationEventStore;
584584
const sql = yield* SqlClient.SqlClient;
585-
const baseline = yield* store.latestApplicationSequence;
586585
const now = "2026-01-05T00:00:01.000Z";
587586
const threadId = "thread:shell-skip-unknown-page-boundary";
588587
const projectEvent = (suffix: string) => ({
@@ -630,22 +629,23 @@ layer("OrchestrationEventStore", (it) => {
630629
const after = yield* store.appendProjectEvent(projectEvent("after"));
631630

632631
const throughSequence = yield* store.latestApplicationSequence;
632+
// Start after "before" so the first page holds only unknown rows.
633633
const replayed = yield* store
634634
.readApplicationEvents({
635-
afterSequence: baseline,
635+
afterSequence: before.sequence,
636636
throughSequence,
637637
skipUnknownEventTypes: true,
638638
})
639639
.pipe(Stream.runCollect);
640640
assert.deepEqual(
641641
Array.from(replayed, (event) => event.sequence),
642-
[before.sequence, after.sequence],
642+
[after.sequence],
643643
);
644644

645645
// Same range, strict: still fails outright without the opt-in.
646646
const strictResult = yield* Effect.result(
647647
store
648-
.readApplicationEvents({ afterSequence: baseline, throughSequence })
648+
.readApplicationEvents({ afterSequence: before.sequence, throughSequence })
649649
.pipe(Stream.runCollect),
650650
);
651651
assert.equal(strictResult._tag, "Failure");

0 commit comments

Comments
 (0)