Skip to content

Commit 1651180

Browse files
committed
fix(read-router): typecheck failure on result.outcome.answer access
CI typecheck failed at src/read-router/__tests__/read-router.test.ts:211 because result.outcome was inferred as unknown when calling .startsWith() on it. Tests passed locally because vitest doesn't run strict TS on test files; pnpm typecheck does. Fix: pass the explicit { answer: string } type parameter to decideAndDispatch so the result is correctly typed. - const result = await router.decideAndDispatch('Q?', ['e1', 'e2']); + const result = await router.decideAndDispatch<{ answer: string }>( + 'Q?', + ['e1', 'e2'], + ); 163/163 router-family tests still pass. Full agentos typecheck clean.
1 parent 425a9fc commit 1651180

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/read-router/__tests__/read-router.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,10 @@ describe('ReadRouter.decideAndDispatch: composes', () => {
207207
'scratchpad-then-answer': async () => ({ answer: 'X-scratch' }),
208208
}),
209209
});
210-
const result = await router.decideAndDispatch('Q?', ['e1', 'e2']);
210+
const result = await router.decideAndDispatch<{ answer: string }>(
211+
'Q?',
212+
['e1', 'e2'],
213+
);
211214
expect(result.outcome.answer.startsWith('X')).toBe(true);
212215
});
213216
});

0 commit comments

Comments
 (0)