Repository navigation
refactor(tests): reuse Telegram deferred fixtures - #148501
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 14, 2026, 8:00 PM ET / September 15, 2026, 00:00 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR replaces repeated deferred-promise setup in Telegram tests with the existing shared SDK helper, without changing production behavior. Merge readiness✅ Ready for maintainer review This remains a useful, bounded cleanup: current main still contains the duplicated fixtures, and the replacement preserves the tested ordering and assertions. No actionable patch defect was found; maintainer-authored work also remains protected from automatic closure. Priority: P3 Review scores
Verification
How this fits togetherTelegram’s lifecycle tests pause asynchronous operations to check command synchronization, polling progress, and update-offset persistence. The shared deferred helper supplies the promise and release function used to control those pauses. flowchart LR
A[Telegram test scenarios] --> B[Shared deferred helper]
B --> C[Pause asynchronous operation]
C --> D[Check ordering and progress]
D --> E[Release promise]
E --> F[Verify completion and shutdown]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -18. Total -18 across 3 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Use the existing SDK deferred helper while retaining the current race, persistence, and shutdown assertions. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR consolidates test fixtures rather than reporting a runtime defect; the duplicate constructions are directly visible on current main. Is this the best way to solve the issue? Yes: the existing SDK helper supplies the same promise settlement contract without introducing another helper or changing the covered behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 969e7971308d. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
b4b6a77 to
a6c11c1
Compare
|
Merged via squash.
|
* commit 'd8e50a38fd1c4df6dd69bcbc155697c464e1be45': (23 commits) fix(cron): release queued reservations when activation fails (#141008) fix(gateway): reduce CPU work in session lists and searches (#148713) feat(gateway): add admin CPU profile diagnostics (#148004) fix(gateway): cap device-required probe cache to prevent unbounded growth (#147708) fix(ci): align Gateway E2E expectations (#148653) refactor(ai): remove unused overflow wrapper (#148719) feat: stage selected chat text as editable comments (#148649) fix(ci): admit reachable release refs with large histories (#148161) fix(agents): allow authorized email CLI actions (#148521) improve(agents): trim large tool results with less CPU (#148718) refactor(docker): share image version parsing (#148243) fix(ci): retain passing hosted checks after skipped duplicates (#148722) fix(update): report configuration failures during repair (#144819) refactor(imessage): share handle classification (#148229) fix(ui): keep the selected agent across Settings pages (#148667) test(telegram): reuse deferred fixture helper (#148501) fix(media): resize images before understanding (#122431) fix: preserve unfinished work during completed PR cleanup (#148704) refactor(migrate-hermes): reuse canonical config record coercion (#148645) perf(channels): reduce history worker metadata footprint (#148711) ...
What Problem This Solves
Telegram race and shutdown tests repeat deferred-promise construction already provided by the shared test helper.
User Impact
No user-visible change. Existing offset persistence, command synchronization, and polling lifecycle coverage remains intact.
Why This Change Was Made
Reuse the SDK's
createDeferredin three test files, preserving assertions, await points, and release → abort → await-run ordering. Production code is unchanged; test code shrinks by 18 lines.Evidence
All 134 cases passed before and after the fixture change. After rebasing onto the canonical CI repair in #148504, the same five complete suites passed again, with matching per-file case identities, order, and results. The normal runtime prerequisite rebuilt successfully on the refreshed candidate.
All 19 normal local changed checks passed on the refreshed candidate, including extension test types, all three dead-export scans, formatting, and type-aware lint. Fresh independent Codex review found no actionable P0–P2 findings.
The original CI failures came from the upstream Radius test boundary and are addressed by #148504; fresh exact-head hosted CI remains required before landing. These are fixture and regression checks, with no performance, universal scheduling, or live Telegram claim.