fix(api): honor cancellation in YouTube, Chat, and People - #1145
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 22, 2026, 1:54 AM ET / 05:54 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR attaches command contexts to 17 YouTube, Chat, and People API calls, adds three in-flight cancellation regressions, and updates automation documentation and the changelog. Merge readiness✅ Ready for maintainer review This remains a useful fix absent from current main. The updated production-path cancellation evidence addresses the previous review, and no introduced correctness or security defects were found. Priority: P2 Review scores
Verification
How this fits togethergogcli commands turn user input into Google API requests. Passing the command context into each request lets the HTTP client stop waiting when the caller cancels or reaches a deadline. flowchart LR
A[Command input] --> B[YouTube Chat or People command]
C[Cancellation or deadline] --> B
B --> D[Google request with context]
D --> E[HTTP transport]
E --> F[Result or cancellation error]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Retain the existing per-request context pattern and the dispatch-before-cancellation regressions for these affected commands. Do we have a high-confidence way to reproduce the issue? Yes, from source: the affected main-branch requests omit the caller context, and the supplied harness cancels after server arrival. This read-only review did not execute tests. Is this the best way to solve the issue? Yes. Attaching the existing context at each request follows neighboring implementations and avoids new timeout settings or transport machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4341ecead611. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
YouTube, Chat GetSpaceReadState/Messages.Create, and People.Get called Do without Context(ctx), so cancel did not abort the HTTP round trip. Chain Context like the sibling list callers. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
29e8bc6 to
0362d1a
Compare
|
Landed as 38dbdaa. Strengthened the regressions to cancel only after each YouTube/Chat/People request reaches the HTTP server. Old source waited two seconds for each fallback 504; the fixed calls return context.Canceled immediately. Full |
YouTube requests, Chat unread lookups and sends, and People profile/relationship reads could ignore command cancellation because their Google client calls did not carry the command context. Bind those calls to the existing context so stalled in-flight HTTP requests end when the caller cancels.
The strengthened regressions wait for the YouTube, Chat, and People requests to reach a synthetic server before canceling. On the old implementation, all three ignore cancellation and wait for the two-second server fallback. With the fix, all three return
context.Canceledafter exactly one request.Thanks @SebTardif for the context-propagation fix. No live Google account was used.
The full
make cigate passes on AWS Crabbox. Independent Codex review of the staged candidate found no actionable P0–P2 findings.