Repository navigation
test(voice-call): reuse shared guards and deferred gates - #137262
Conversation
Replace five copied first-call helpers and ten simple Promise gate setups with existing focused SDK helpers. Preserve all assertions and lifecycle ordering across the six test files. Production delta: 0. Test delta: -77 lines. Baseline and candidate: 241/241; full local changed-file checks passed; Codex P2 review found no issues.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 3, 2026, 7:19 AM ET / 11:19 UTC. ClawSweeper reviewWhat this changesThe branch replaces duplicated Voice Call test-only first-call assertions and manually captured Promise resolvers with existing plugin-SDK helpers across six test suites. Merge readiness✅ Ready for maintainer review Keep this maintainer-owned, protected test cleanup open. The introduced substitutions preserve the existing assertion and deferred-promise semantics, and current main does not yet contain the cleanup. Priority: P3 Review scores
Verification
How this fits togetherVoice Call webhook and realtime tests drive local HTTP/WebSocket carrier flows through the plugin’s server and bridge handlers, then assert lifecycle behavior. This PR changes only the assertion and synchronization utilities used by those tests, not the runtime handlers. flowchart LR
A[Carrier event fixtures] --> B[Voice Call test harness]
B --> C[Webhook and realtime handlers]
C --> D[Mock provider and bridge]
D --> E[Shared test helpers]
E --> F[Lifecycle assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -77. Total -77 across 6 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Land the focused helper migration after the exact-head checks finish; retain the existing boundary-level Voice Call scenarios and their lifecycle ordering. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR reports no production defect and changes only test utilities while preserving the existing exercised scenarios. Is this the best way to solve the issue? Yes. Reusing the already exported SDK helpers removes duplicated test setup without creating another abstraction or altering the Voice Call runtime boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a6dc9a744284. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* commit '13b1f71c7010baaf2394555198e2fc04bef03586': (283 commits) fix(ui): retire stale MCP feedback across context changes (#128490) fix(agents): clarify set-identity workspace output (#126320) fix(auth): preserve OAuth metadata during session SDK refresh (#127988) fix(agents): recover catalog worker after generation mismatch (#127712) fix(memory-wiki): reject out-of-range claim confidence (#125656) ci: remove redundant contract runs and costly test work (#137220) fix(release): assert the Codex CLI pin the candidate declares (#137136) test(voice-call): reuse shared guards and deferred gates (#137262) fix(cron): isolate scheduler-disabled shared-store writes (#131733) fix(telegram): surface allowed custom reactions in react guidance (#129817) test(infra): reuse the shared npm call presence guard (#137254) fix: generated images disappear after failed tool calls (#131226) fix(docs): match source anchor checks to published sections (#137157) fix(backup): preserve audit capture across slow snapshots (#130962) fix(release): preserve legacy gh log reads (#137016) fix(memory-core): make forget rewrites atomic (#131383) fix(agents): write settings atomically (#131431) fix(plugins): keep the memory indexing runtime with the selected slot owner (#131779) fix(ci): pin iOS screenshot evidence to workflow revision (#136334) test(logging): remove redundant stderr spy casts (#137238) ... # Conflicts: # scripts/e2e/lib/codex-release-package-assertions.mjs
…7262) Replace five copied first-call helpers and ten simple Promise gate setups with existing focused SDK helpers. Preserve all assertions and lifecycle ordering across the six test files. Production delta: 0. Test delta: -77 lines. Baseline and candidate: 241/241; full local changed-file checks passed; Codex P2 review found no issues.
Voice Call tests copied first-mock-call presence checks and simple Promise resolver setup. Reuse the existing focused SDK
expectDefinedandcreateDeferredhelpers across six test files. Keep domain assertions, abort and cancellation handling, request concurrency limits, disconnect grace periods, and teardown order intact.Production delta: 0. Test delta: +59/-136, net -77 lines. The unchanged baseline and candidate each passed all 241 cases across the six complete suites plus the outbound-helper sibling, with identical ordered case outcomes. Full local changed-file checks passed; independent Codex review through P2 found no actionable issues. Coverage uses mock providers and local HTTP/WebSocket paths.
Separate follow-up: provisional final transcript during bridge creation. Source-only inspection identified a conditional session-initialization question if a provider synchronously emits a final user transcript while its bridge is being created. This cleanup does not change that path; no runtime defect or live reproduction has been established.