Repository navigation
fix(qa): retain Telegram proxy failure diagnostics - #163598
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 October 2, 2026, 11:21 AM ET / 15:21 UTC. ClawSweeper reviewWhat this changesThe Telegram QA proxy records bounded failure diagnostics on stderr and adds regression coverage for preserving the generic response while excluding exception details and bot tokens. Merge readiness✅ Ready for maintainer review The diagnostic gap remains on current main, and this focused patch addresses it without changing client responses. No blocking introduced defect was found; repository-member work also requires explicit maintainer handling rather than automatic closure. Priority: P2 Review scores
Verification
How this fits togetherTelegram release QA sends Bot API requests through a local proxy that redirects them to Telegram’s Test Server. The proxy forwards responses and supplies diagnostic evidence to release operators when forwarding fails. flowchart TD
A[Telegram QA runner] --> B[Local Test Server proxy]
B --> C[Lease checks and forwarding]
C --> D[Telegram Test Bot API]
D --> E[Response to QA client]
C --> F[Failure handling]
F --> E
F --> G[Bounded stderr diagnostics]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +37, Other +41. Total +78 across 2 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep diagnostic reporting at the proxy’s catch boundary, preserving bounded retained facts and the existing client response. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the path: a forwarding exception reaches current main’s catch and produces only the generic response. The supplied injected regression exercises that boundary; this review did not execute it. Is this the best way to solve the issue? Yes, reporting bounded facts at the existing catch is a focused repair that preserves response compatibility and avoids duplicating diagnostic ownership. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0845ecda906f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
What Problem This Solves
Fixes: Telegram release QA loses the forwarding cause when the local Test Server proxy encounters a request, lease, upstream-fetch, or response-stream failure.
User Impact
User impact: no end-user behavior changes; release operators get bounded failure phase, Bot API method, built-in error class, and allowlisted Node/Undici code in retained logs instead of an unactionable generic 502 alone.
Why This Change Was Made
The proxy's broad catch returned the correct generic response but discarded every exception. It now emits one structured stderr record at the owner boundary. Raw messages, URLs, paths, headers, bodies, tokens, arbitrary names, and arbitrary codes remain excluded so the log is safe to retain and publish.
The client-facing 502 stays unchanged. This intentionally improves evidence for the next occurrence; it does not claim the historical failure was a Telegram outage or repair an unproven network defect.
Production LOC delta: 0. The changed proxy is QA test support; test-support delta is +41 net lines and regression coverage is +37 net lines. The growth implements the diagnostic/security boundary and fixed failure-phase tracking.
Evidence
node --test .agents/skills/telegram-e2e-userbot/scripts/telegram-test-api-proxy.test.mjsfailed because the injected nestedECONNRESETproduced zero diagnostics.pnpm check:changedpassed all conservatively selected lanes (format, guards, full typecheck graph, lint, import cycles).Live failure injection was not used: reproducing a real transient network reset against Telegram would be nondeterministic and could not prove sanitization. The deterministic owner-boundary test exercises the exact catch path and asserts both retained facts and excluded secrets.