Skip to content

Commit 0233dc8

Browse files
fix(ci): corrige quebras de loop e alinhar testes custom
1 parent 6c1902b commit 0233dc8

File tree

5 files changed

+16
-3
lines changed

5 files changed

+16
-3
lines changed

apps/server/src/orchestration/Layers/ProjectionSnapshotQuery.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,9 @@ projectionSnapshotLayer("ProjectionSnapshotQuery", (it) => {
357357
],
358358
session: {
359359
threadId: ThreadId.make("thread-1"),
360-
status: "running",
360+
// t3code-custom: local boot sanitization marks stale busy sessions as
361+
// interrupted so zombie turns do not survive restarts.
362+
status: "interrupted",
361363
providerName: "codex",
362364
runtimeMode: "approval-required",
363365
activeTurnId: null,

apps/web/src/composerDraftStore.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,11 @@ describe("composerDraftStore file references", () => {
555555
.getOptions()
556556
.merge(persistedState, useComposerDraftStore.getInitialState());
557557

558-
expect(mergedState.draftsByThreadKey[threadKeyFor(threadId)]?.fileReferences).toEqual([
558+
// t3code-custom: file references are a local draft extension and stay
559+
// scoped by environment after the multi-environment merge.
560+
expect(
561+
mergedState.draftsByThreadKey[threadKeyFor(threadId, TEST_ENVIRONMENT_ID)]?.fileReferences,
562+
).toEqual([
559563
{
560564
id: "ref-1",
561565
name: "report.pdf",

apps/web/src/store.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ function makeState(thread: Thread): AppState {
126126
updatedAt: thread.updatedAt,
127127
branch: thread.branch,
128128
worktreePath: thread.worktreePath,
129+
// t3code-custom: thread loops are a local extension, so test fixtures
130+
// must preserve loop state through the shell shape too.
131+
loop: thread.loop ?? null,
129132
},
130133
},
131134
threadSessionById: {

apps/web/src/store.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ function toThreadShell(thread: Thread): ThreadShell {
248248
updatedAt: thread.updatedAt,
249249
branch: thread.branch,
250250
worktreePath: thread.worktreePath,
251+
loop: thread.loop ?? null,
251252
};
252253
}
253254

@@ -336,7 +337,8 @@ function threadShellsEqual(left: ThreadShell | undefined, right: ThreadShell): b
336337
left.archivedAt === right.archivedAt &&
337338
left.updatedAt === right.updatedAt &&
338339
left.branch === right.branch &&
339-
left.worktreePath === right.worktreePath
340+
left.worktreePath === right.worktreePath &&
341+
left.loop === right.loop
340342
);
341343
}
342344

@@ -473,6 +475,7 @@ function getThread(state: EnvironmentState, threadId: ThreadId): Thread | undefi
473475
activities: selectThreadActivities(state, threadId),
474476
proposedPlans: selectThreadProposedPlans(state, threadId),
475477
turnDiffSummaries: selectThreadTurnDiffSummaries(state, threadId),
478+
loop: shell.loop ?? null,
476479
};
477480
}
478481

apps/web/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ export interface ThreadShell {
134134
updatedAt?: string | undefined;
135135
branch: string | null;
136136
worktreePath: string | null;
137+
loop?: ThreadLoop | null;
137138
}
138139

139140
export interface ThreadTurnState {

0 commit comments

Comments
 (0)