Add opt-in paging to the ListTicketSchemas task #1238
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.40) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 314 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.344
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1238"
general
weight: 0.35
ggreer
Connectors with many ticket schemas were truncated at 100 when the ListTicketSchemas task ran in service mode, and callers had no way to ask for the rest.
What changed
ListTicketSchemasTaskgainspaginate,page_tokenandpage_size. These are new field numbers, so the change is additive.TicketsServiceListTicketSchemasResponsegainsbool paged, which only the SDK sets. Connectors need no changes.paginateis false, the old code path runs unchanged: unroll up to 100, then truncate.pagedstays unset.Paged mode (
paginate = true)page_sizeand about 2 MiB serialized, plus an opaquenext_page_token.page_sizeis 0 (default 100) or 1 to 1000;page_tokenis at most 4096 bytes. Both are enforced by validate rules on the task, and the handler keeps its own clamp.Contract (documented on the proto)
paged = true: first, middle, last and empty batches.paginateand getspaged == falseis talking to an SDK that ignored the field, so the result may be truncated.next_page_tokenmeans keep going, even whenlistis empty.Cursor
base64url(version byte, uvarint offset, connector token), with no escaping.page_sizechanges between calls, because the handler never sends a page size to the connector.next_page_tokenvalidation rule.Testing
New unit tests in
pkg/tasks/c1api/list_ticket_schemas_test.go:pagedunset;pagedset on first, middle, last and empty batches;page_sizeandpage_token, and the handler clamp for an unvalidatedpage_size;<>&-heavy connector tokens, and a golden token format;go test ./...,go test -race ./pkg/tasks/...,make chaos-checkandbuf lint/breakingpass locally.🤖 Generated with Claude Code