gestalt-mobile 0.49.5 → 0.49.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2474,7 +2474,10 @@ describe('production composition', () => {
|
|
|
2474
2474
|
.filter((request) => request.method === 'turn/start')).toHaveLength(1);
|
|
2475
2475
|
await fixture.app.close();
|
|
2476
2476
|
});
|
|
2477
|
-
it(
|
|
2477
|
+
it.each([
|
|
2478
|
+
{ status: 'failed', retainedQuiz: false },
|
|
2479
|
+
{ status: 'completed', retainedQuiz: true },
|
|
2480
|
+
])('production $status child wakes the idle supervisor with retainedQuiz=$retainedQuiz', async ({ status, retainedQuiz }) => {
|
|
2478
2481
|
const timers = [];
|
|
2479
2482
|
const fixture = await createProductionAutopilotFixture({
|
|
2480
2483
|
autopilotSchedule: (callback) => {
|
|
@@ -2491,6 +2494,13 @@ describe('production composition', () => {
|
|
|
2491
2494
|
payload: { enabled: false },
|
|
2492
2495
|
})).statusCode).toBe(200);
|
|
2493
2496
|
timers.length = 0;
|
|
2497
|
+
if (retainedQuiz) {
|
|
2498
|
+
const database = new DatabaseSync(join(fixture.dataDir, 'relay.sqlite'));
|
|
2499
|
+
database
|
|
2500
|
+
.prepare('INSERT INTO pending_interactions (session_id,request_id,kind,payload_json,turn_id,requested_at) VALUES (?,?,?,?,?,?)')
|
|
2501
|
+
.run(fixture.sessionId, 'earlier-quiz', 'quiz', JSON.stringify({ questions: [] }), 'ended-root-turn', new Date().toISOString());
|
|
2502
|
+
database.close();
|
|
2503
|
+
}
|
|
2494
2504
|
const handle = fixture.handles.find((candidate) => candidate.notify);
|
|
2495
2505
|
handle.notify({
|
|
2496
2506
|
method: 'thread/started',
|
|
@@ -2521,13 +2531,15 @@ describe('production composition', () => {
|
|
|
2521
2531
|
item: {
|
|
2522
2532
|
type: 'collabToolCall',
|
|
2523
2533
|
tool: 'wait',
|
|
2524
|
-
status: 'failed',
|
|
2534
|
+
status: status === 'failed' ? 'failed' : 'completed',
|
|
2525
2535
|
senderThreadId: 'thread-1',
|
|
2526
2536
|
receiverThreadId: 'child-1',
|
|
2527
|
-
agentStatus:
|
|
2537
|
+
agentStatus: status,
|
|
2528
2538
|
},
|
|
2529
2539
|
},
|
|
2530
2540
|
});
|
|
2541
|
+
if (retainedQuiz)
|
|
2542
|
+
expect((await fixture.app.inject(`/api/sessions/${fixture.sessionId}`)).json()).toMatchObject({ agentActivity: { aggregateSubagents: 'idle' } });
|
|
2531
2543
|
const quietTimer = timers.find((timer) => !timer.cancelled && !timer.fired);
|
|
2532
2544
|
expect(quietTimer).toBeDefined();
|
|
2533
2545
|
quietTimer.fired = true;
|