Skip to content

test(voice-call): reuse shared guards and deferred gates - #137262

Merged
steipete merged 1 commit into
mainfrom
codex/test-voice-call-shared-test-helpers
Sep 3, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-voice-call-shared-test-helpers

Conversation

@steipete

@steipete steipete commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Voice Call tests copied first-mock-call presence checks and simple Promise resolver setup. Reuse the existing focused SDK expectDefined and createDeferred helpers 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.

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.
@clawsweeper

clawsweeper Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review September 3, 2026 11:11
@openclaw-barnacle openclaw-barnacle Bot added channel: voice-call Channel integration: voice-call size: S maintainer Maintainer-authored PR labels Sep 3, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 3, 2026
@clawsweeper

clawsweeper Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 3, 2026, 7:19 AM ET / 11:19 UTC.

ClawSweeper review

What this changes

The 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
Reviewed head: c49a37d51a0f5ccbdc9b88088e566ffdb779b5a3

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-neutral test cleanup using existing exported helper contracts, with no actionable correctness or security finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR changes only tests; no user-visible runtime behavior is introduced for a real-behavior proof gate.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR changes only tests; no user-visible runtime behavior is introduced for a real-behavior proof gate.
Evidence reviewed 5 items Introduced scope: The verified merge-base-to-head diff modifies only six *.test.ts files under the Voice Call plugin; it has no production, package, configuration, or workflow changes.
Shared assertion contract: The existing plugin-SDK helper rejects only null/undefined and returns the original value, matching each removed first-call presence guard’s needed behavior.
Deferred gate contract: The existing plugin-SDK helper delegates to the canonical deferred primitive, exposing the same promise, resolve, and reject handles used by the replaced test gates.
Findings None None.
Security None None.

How this fits together

Voice 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -77. Total -77 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 6 59 136 -77
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 59 136 -77

Review metrics

Metric Value Why it matters
Production vs. test delta production 0, tests +59/-136 (net -77) The reduction is confined to repeated test guards and deferred-gate setup; runtime behavior and public contracts are unchanged.

Technical review

Best 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.

Labels

Label changes:

  • add P3: This is a bounded, test-only maintainability cleanup with no production behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR changes only tests; no user-visible runtime behavior is introduced for a real-behavior proof gate.

Label justifications:

  • P3: This is a bounded, test-only maintainability cleanup with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR changes only tests; no user-visible runtime behavior is introduced for a real-behavior proof gate.

Evidence

What I checked:

  • Introduced scope: The verified merge-base-to-head diff modifies only six *.test.ts files under the Voice Call plugin; it has no production, package, configuration, or workflow changes. (c49a37d51a0f)
  • Shared assertion contract: The existing plugin-SDK helper rejects only null/undefined and returns the original value, matching each removed first-call presence guard’s needed behavior. (src/plugin-sdk/expect-runtime.ts:2, a6dc9a744284)
  • Deferred gate contract: The existing plugin-SDK helper delegates to the canonical deferred primitive, exposing the same promise, resolve, and reject handles used by the replaced test gates. (src/plugin-sdk/extension-shared.ts:151, a6dc9a744284)
  • Boundary coverage remains intact: The concurrency test still starts the real local webhook server, holds eight body reads, verifies the ninth request is rejected, and releases the same pending requests; the runtime request handler still owns that limiter before body reading. (extensions/voice-call/src/webhook.test.ts:2057, c49a37d51a0f)
  • Current-main and history check: Current main still has the pre-cleanup first-call helper in the realtime-handler test, while prior merged history includes the broad shared-test-helper migration in commit 8616c0c. (extensions/voice-call/src/webhook/realtime-handler.test.ts:3, 8616c0c37400)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete steipete self-assigned this Sep 3, 2026
@steipete
steipete merged commit a590cc3 into main Sep 3, 2026
164 of 173 checks passed
@steipete
steipete deleted the codex/test-voice-call-shared-test-helpers branch September 3, 2026 11:57
@steipete

steipete commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 3, 2026
* 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
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 4, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: voice-call Channel integration: voice-call maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant