Repository navigation
refactor(voice-call): simplify notify test lookup helpers - #138246
Conversation
Keep domain lookup helpers and all lifecycle assertions while reusing expectDefined and the existing HarnessManager type.
|
🦞👀 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 4, 2026, 4:46 PM ET / 20:46 UTC. ClawSweeper reviewWhat this changesThe branch replaces duplicated defined-value guards in two voice-call notify-test lookup helpers with the existing shared assertion helper and a named harness manager type. Merge readiness✅ Ready for maintainer review No blocking findings. The refactor preserves the declared lookup contract while using the canonical assertion helper; it remains open for normal maintainer handling because the target state identifies it as maintainer-authored. Priority: P3 Review scores
Verification
How this fits togetherVoice-call notify tests use a harness manager and fake provider to exercise active-call lookup, provider-ID mapping, retries, and teardown. The lookup helpers convert optional manager results into defined call records for those lifecycle assertions. flowchart LR
A[Notify test scenarios] --> B[Voice-call test harness]
B --> C[Harness manager]
C --> D[Active and provider call lookup]
D --> E[Shared defined-value assertion]
E --> F[Lifecycle assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -11. Total -11 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Retain the two domain-specific test helpers while sharing their defined-value assertion through the existing canonical utility. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR changes test-helper implementation rather than reporting a production failure. Is this the best way to solve the issue? Yes. The existing helper exactly handles the manager methods’ null-or-undefined return contract while avoiding duplicate test-only guard code. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against cbbe91d8f75a. LabelsLabel 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)
|
sylvesterkaczmarek
left a comment
There was a problem hiding this comment.
Clean test-only cleanup. expectDefined preserves narrowing and failure context; retaining the two domain helpers keeps the test intent readable.
|
Merged via squash.
|
…38246) Keep domain lookup helpers and all lifecycle assertions while reusing expectDefined and the existing HarnessManager type.
* refs/remotes/origin/main: fix(codex): reject stale control commands after session rollover (openclaw#138820) fix: normalize small Responses output budgets (openclaw#138828) test(voice-call): reuse presence guards in notify helpers (openclaw#138246) refactor(logbook): type reads and bound observation queries (openclaw#138816) fix(workboard): stop services before retiring SQLite stores (openclaw#138810) fix(ci): stabilize Control UI stream and recovery tests (openclaw#138776) fix(cli): share recorded gateway state path inspection (openclaw#138822) refactor(anthropic): replace Agent SDK with direct CLI transport (openclaw#138707) fix(agents): preserve per-turn settings and diagnostics (openclaw#138695)
What Problem This Solves
The voice-call notify tests repeat the same presence guard in their active-call and provider-call lookup helpers, which adds maintenance overhead to the test setup.
Why This Change Was Made
Keep the two domain lookup helpers and all nine call sites, but delegate their absence checks to the existing
expectDefinedhelper and reuse the existingHarnessManagertype. Call identifiers, provider mapping assertions, retry coverage, asynchronous gates and teardown remain in place.User Impact
No user-visible or production behavior changes. This changes one test file: +7/-18 lines, net -11; production delta is zero.
Evidence
The complete notify, lookup, manager harness and canonical expect suites passed before and after: 22 cases with identical per-file order, statuses and project selection. Proof used the fixed
fd9adb5af2c2b7c40a939a4ece3c9acf92a6feaesource and its own frozen dependency installation.The normal full LOCAL changed-file gate passed all 19 checks, including all three Knip scans. The diff-scoped cleanup pass and independent managed Codex P2 review found no actionable findings. This is fixture-based proof; no live carrier or provider API behavior is claimed.