review fix: distinguish checkpoint settlement
This commit is contained in:
@@ -114,7 +114,7 @@ describe('agent loop scheduling properties', () => {
|
||||
|
||||
// No message lost: every send appears as a user/message, in order.
|
||||
expect(userMessageTexts(agent)).toEqual(texts)
|
||||
// Every successful send owns an independent turn even before the driver wakes.
|
||||
// This failure-free fixture claims every item into an independent turn.
|
||||
expect(turnNumbers(agent)).toEqual(texts.map((_, i) => i + 1))
|
||||
expect(turnEndNumbers(agent)).toEqual(texts.map((_, i) => i + 1))
|
||||
expect(userMessageCountsByTurn(agent)).toEqual(texts.map(() => 1))
|
||||
@@ -172,7 +172,7 @@ describe('agent loop scheduling properties', () => {
|
||||
|
||||
// No message is lost or reordered, regardless of driver timing.
|
||||
expect(userMessageTexts(agent)).toEqual(steps.map(s => s.text))
|
||||
// Every send owns exactly one turn, numbered in FIFO order.
|
||||
// Every item is claimed and therefore owns one FIFO-ordered turn.
|
||||
const turns = turnNumbers(agent)
|
||||
expect(turns).toEqual(steps.map((_, i) => i + 1))
|
||||
expect(turnEndNumbers(agent)).toEqual(turns)
|
||||
|
||||
@@ -221,8 +221,8 @@ export interface SessionEventMap {
|
||||
'turn/start': { turn: number; trigger: TurnTrigger }
|
||||
/**
|
||||
* Closes turn `turn` with the {@link TurnEndReason} that ended it. The loop
|
||||
* fires the awaited `session/flush` checkpoint at every turn end, so the turn
|
||||
* boundary is also the durable-commit boundary.
|
||||
* fires the awaited `session/flush` checkpoint at every turn end; the next turn waits for settlement.
|
||||
* Success commits the closed turn; rejection is reported live and does not prevent later work.
|
||||
*/
|
||||
'turn/end': { turn: number; reason: TurnEndReason }
|
||||
/** Opens step `step` of turn `turn` — one model call plus the tool executions it requested. */
|
||||
|
||||
Reference in New Issue
Block a user