Skip to content

test(discord): await the mark after clearing playback - #148268

Merged
steipete merged 1 commit into
mainfrom
codex/discord-pcm-mark-wait
Sep 14, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/discord-pcm-mark-wait

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Related: #148102

What Problem This Solves

The Discord continuous-playback clear/resume test polls recorded calls instead of waiting for the playback mark it needs to verify.

User Impact

No user-visible change. This is a maintainer-requested test follow-up needed to validate #148102; production playback is unchanged.

Why This Change Was Made

Resolve the existing deferred primitive from the heard mark callback, then assert the exact recorded marks. The wait retains the existing 1,000 ms budget, player Idle/non-Idle checks, terminal-error assertion, and unconditional fixture cleanup. It uses the real playback SDK and PCM encoder with the existing synthetic provider and signalling-only connection.

The failed CI job reported no recorded mark at its polling assertion. Its log does not establish why playback had not been observed. This change improves wait ownership; it does not claim a reproduced production bug or a proven cause for that CI failure.

Evidence

  • The existing resumes continuous output after the provider clears unplayed PCM case passed through the repository test wrapper: 1 passed, 11 skipped.
  • The scoped changed gate passed, including extension-test types, formatting, lint, and repository guards.
  • Independent P2 review found no actionable findings. Installed Vitest source confirms that this promise callback remains bounded by the same default 1,000 ms deadline.
  • No Discord sockets, devices, live providers, or additional playback scenarios were exercised.

@clawsweeper

clawsweeper Bot commented Sep 14, 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: discord Channel integration: discord size: XS maintainer Maintainer-authored PR labels Sep 14, 2026
@steipete
steipete marked this pull request as ready for review September 14, 2026 13:25
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The previous review run stopped before producing a review: its failure artifact records source_preparation / review_blobs_unavailable, ETIMEDOUT, and retryable: true for the current head. The reviewed candidate and proof in the PR body are unchanged.

@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 9:56 AM ET / 13:56 UTC (Revision 2).

ClawSweeper review

What this changes

The Discord playback integration test waits for resumed audio’s acknowledgment callback before checking which audio marks were recorded.

Merge readiness

✅ Ready for maintainer review

No actionable findings. This remains a useful, maintainer-requested test follow-up absent from current main; the callback wait preserves the existing deadline and assertions.

Priority: P3
Reviewed head: 0cd9e7f3fc8e279f709ef82e3d2ef8b3e373d703

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable test improvement with preserved assertions, verified timeout semantics, and reported targeted validation.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied MEMBER association exempts this maintainer-authored test-only PR from external contributor runtime proof; no authority boundary changes. The reported focused test exercises real playback with a synthetic provider and does not establish live Discord behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied MEMBER association exempts this maintainer-authored test-only PR from external contributor runtime proof; no authority boundary changes. The reported focused test exercises real playback with a synthetic provider and does not establish live Discord behavior.
Evidence reviewed 7 items Verified introduced change: The pinned base-to-head diff changes only synchronization in the existing clear/resume test. Exact acknowledgment history, player state checks, terminal-error assertion, and finally cleanup remain intact. The checkout is clean and diff whitespace validation passed.
Promise wait remains bounded: The changed vi.waitFor callback directly depends on Vitest's promise handling. The repository pins Vitest 5.0.0; its waitFor implementation tracks pending promises while retaining an independent timeout, whose default is also 1,000 ms.
Playback boundary and fixture: The fixture uses the production playback owner and actual Discord audio player with a synthetic provider and signaling-only connection. Its audio sink forwards mark callbacks to playback; output retirement discards cleared marks, while consumed PCM releases heard marks. This scenario does not execute a Codex harness or provider contract.
Findings None None.
Security None None.

How this fits together

Discord voice playback converts provider audio into playable packets and acknowledges marks once their audio is consumed. This integration test checks that clearing queued audio discards its mark while subsequent audio still completes.

flowchart LR
  A[Synthetic provider audio] --> B[Discord playback]
  C[Clear queued audio] --> B
  B --> D[PCM encoder and audio player]
  D --> E[Playback acknowledgment]
  E --> F[Bounded test wait]
  F --> G[Exact mark assertion]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +5. Total +5 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 7 2 +5
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 7 2 +5

Review metrics

None.

Technical review

Best possible solution:

Keep synchronization tied to the real playback acknowledgment while preserving exact mark checks, bounded failure, and unconditional cleanup.

Do we have a high-confidence way to reproduce the issue?

Not applicable to a claimed production bug: this is a test synchronization follow-up, and the earlier CI failure's cause remains unproven. Tests were not executed in this read-only review.

Is this the best way to solve the issue?

Yes. Reusing the existing deferred primitive connects completion to the observed playback event without extending the timeout, weakening assertions, or adding production seams.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 36a725a599bc.

Labels

Label changes:

  • add P3: This is a bounded test synchronization improvement 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: The supplied MEMBER association exempts this maintainer-authored test-only PR from external contributor runtime proof; no authority boundary changes. The reported focused test exercises real playback with a synthetic provider and does not establish live Discord behavior.

Label justifications:

  • P3: This is a bounded test synchronization improvement 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: The supplied MEMBER association exempts this maintainer-authored test-only PR from external contributor runtime proof; no authority boundary changes. The reported focused test exercises real playback with a synthetic provider and does not establish live Discord behavior.

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-14T13:50:21.283Z sha 0cd9e7f :: needs maintainer review before merge. :: none

@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 14, 2026
@steipete
steipete merged commit 9d3d31c into main Sep 14, 2026
163 of 164 checks passed
@steipete
steipete deleted the codex/discord-pcm-mark-wait branch September 14, 2026 17:08
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: discord Channel integration: discord 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.

1 participant