History regimes and list pages
Top: the stored history of review task e5c95b09, four messages from history[0] to history[3], plus the status message 2 findings, which is never part of history. With historyLength unset GetTask returns all four messages, with historyLength 1 only history[3], and with historyLength 0 no history field. Bottom: the five tasks on test-runner sorted by status timestamp, newest first. ListTasks with pageSize 2 returns f22ed7af and 8ae21dcb, then 728ba084 and d0c28826, and each page ends with an opaque cursor token for the next one. The fifth task, 3d8f7801, was not requested. Neither page carries artifacts or history. A third call filters on TASK_STATE_CANCELED with no historyLength and gets f22ed7af with its full history.
A · HISTORY
GetTask on the review task e5c95b09, held by code-reviewer
historyLength
unset
1
B · PAGES
ListTasks on test-runner with pageSize 2 and historyLength 0
id
state
status.timestamp
history[0]
ROLE_USER
Review this diff of payments-api. + refunds.diff
history[1]
ROLE_AGENT
Which base branch should I compare this diff against?
history[2]
ROLE_USER
main
history[3]
ROLE_AGENT
Comparing the diff against main
status.message
2 findings, returned every time, never in history
history messages returned
4
1
historyLength 0, on task d0c28826 in 04-polling.http: the reply has no history field at all
f22ed7af
TASK_STATE_CANCELED
09:00:03.750
8ae21dcb
TASK_STATE_FAILED
09:00:03.000
728ba084
TASK_STATE_COMPLETED
09:00:02.250
d0c28826
TASK_STATE_COMPLETED
09:00:01.500
3d8f7801
TASK_STATE_COMPLETED
09:00:00.750
page 1
returns cursor 1
page 2
returns cursor 2
not requested
totalSize 5 on both pages, and no task carries artifacts or history
filter on TASK_STATE_CANCELED, no historyLength: f22ed7af with its full history, token ""