Skip to content

refactor(voice-call): simplify notify test lookup helpers - #138246

Merged
steipete merged 1 commit into
mainfrom
codex/test-voice-notify-presence-guards
Sep 5, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-voice-notify-presence-guards

Conversation

@steipete

@steipete steipete commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

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 expectDefined helper and reuse the existing HarnessManager type. 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 fd9adb5af2c2b7c40a939a4ece3c9acf92a6feae source 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.

Keep domain lookup helpers and all lifecycle assertions while reusing
expectDefined and the existing HarnessManager type.
@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added channel: voice-call Channel integration: voice-call size: XS maintainer Maintainer-authored PR labels Sep 4, 2026
@steipete
steipete marked this pull request as ready for review September 4, 2026 12:05
@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 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 4, 2026, 4:46 PM ET / 20:46 UTC.

ClawSweeper review

What this changes

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

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, net-negative test refactor that preserves the existing lookup and lifecycle scenario coverage.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR changes only fixture-based test helpers; the external-contributor real-behavior proof gate does not apply.
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 fixture-based test helpers; the external-contributor real-behavior proof gate does not apply.
Evidence reviewed 5 items Introduced hunk: The verified parent-relative diff changes only the two local lookup helpers, preserving their domain-specific messages and delegating their optional results to the shared assertion.
Assertion contract: The shared helper throws only for null or undefined and returns the original value with its narrowed type.
Lookup owner contract: Both manager methods return CallRecord or undefined, so the replacement assertion has the same meaningful absence condition for their object-valued results.
Findings None None.
Security None None.

How this fits together

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

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -11. Total -11 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 7 18 -11
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 7 18 -11

Review metrics

Metric Value Why it matters
Production versus test LOC production +0, tests -11 net The complete introduced diff is confined to an existing test file and removes repeated assertion mechanics without changing production code.

Technical review

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

Labels

Label justifications:

  • P3: This is a small test-only maintainability refactor with no production or user-visible 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 fixture-based test helpers; the external-contributor real-behavior proof gate does not apply.

Evidence

What I checked:

Likely related people:

  • steipete: 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-04T12:13:25.156Z sha 9abba1b :: needs maintainer review before merge. :: none

@sylvesterkaczmarek sylvesterkaczmarek left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean test-only cleanup. expectDefined preserves narrowing and failure context; retaining the two domain helpers keeps the test intent readable.

@steipete steipete self-assigned this Sep 5, 2026
@steipete
steipete merged commit e94fbda into main Sep 5, 2026
172 checks passed
@steipete
steipete deleted the codex/test-voice-notify-presence-guards branch September 5, 2026 04:00
@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 5, 2026
…38246)

Keep domain lookup helpers and all lifecycle assertions while reusing
expectDefined and the existing HarnessManager type.
vincentkoc added a commit to LiuwqGit/openclaw that referenced this pull request Sep 5, 2026
* 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)
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: XS 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.

2 participants