Skip to content

refactor(openrouter): simplify music stream test fixture - #150495

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/test-audit-openrouter-music-fixture-20260917
Sep 17, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/test-audit-openrouter-music-fixture-20260917

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

Related: #139428

What Problem This Solves

The OpenRouter music tests carry optional stream-fixture branches that none of their callers use.

User Impact

No user-visible change. Production code, all 27 selected test cases, and their assertions remain unchanged.

Why This Change Was Made

Require the audio value every caller already supplies and always append the completion event. Keep optional transcripts, event order, and the existing fixture construction, while removing four redundant completion arguments.

Evidence

  • The normal provider configuration passed all 26 unit cases and the private-destination transport case before and after the edit, with identical ordered case identities and outcomes.
  • Selected local checks: 17 passed, one exact formatter result reused, and two deferred to CI. The retained installation has a known Clack version mismatch affecting the extension-test compiler and normal lint declaration preparation; local-all-pass is false.
  • Fresh scoped review found no actionable defects. The patch removes 10 support lines without changing cases or assertions.
  • The first head's current-lock CI passed all 27 selected cases, extension-test compilation, the OpenRouter type-aware lint shard after normal declaration preparation, and package-boundary compilation including OpenRouter. This is hosted candidate proof, not a hosted before/after pair. No live vendor API proof is claimed.
  • The first run's architecture job failed on an inherited Slack static import cycle, and its lint job failed on an inherited unbound Slack approval callback. Full-format checking was not reached. Both defects were fixed on canonical main by PR111148, commit a13ecd23; PR150482 closed unmerged as superseded.
  • The second head's CI passed all 27 selected cases, the actual extension-test compiler, normal SDK declaration freshness, the OpenRouter type-aware lint shard, all other extension/script lint shards, full formatting, and package-boundary compilation including OpenRouter. Declaration freshness is not a new emission; this is scoped hosted candidate proof, not a full lint-pipeline or hosted before/after claim.
  • Its provider-config job failed only an inherited Qwen clock-dependent assertion: 119999ms observed versus exactly 120000ms expected. Generation resolved before the assertion; the shared deadline correctly subtracts elapsed time.
  • Canonical PR150523, followed by PR82290, corrected that Qwen test with observed-budget bounds and deterministic clock/expiry coverage. This branch now incorporates the verified canonical correction with the identical OpenRouter patch. No Qwen or Slack edits are part of this PR's diff.
  • Current-head CI on 5bd442fb29b25996263c3f28a58722e7b5529668 has passed all 26 OpenRouter unit cases, its transport case, and all 28 corrected Qwen cases. The frozen-lock checkout also passed the actual extension-test compiler, emitted 9,762 SDK declarations, passed the OpenRouter and other extension/script type-aware lint shards, full formatting, and package-boundary compilation including OpenRouter. This is hosted candidate proof, not a hosted before/after pair or a full lint-pipeline claim.
  • The same-head completed review has no findings. Current-head CI completed successfully: 31 successful jobs, 19 skipped, with the required gate green. Historical local-all-pass remains false. Both failed runs stay recorded; neither failed job was retried unchanged and no guard was weakened.

@vincentkoc vincentkoc self-assigned this Sep 17, 2026
@clawsweeper

clawsweeper Bot commented Sep 17, 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.

@vincentkoc
vincentkoc marked this pull request as ready for review September 17, 2026 01:51
@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 17, 2026
@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 17, 2026, 12:14 AM ET / 04:14 UTC (Revision 4).

ClawSweeper review

What this changes

Simplifies the OpenRouter music test fixture by requiring audio and always adding the completion event, preserving existing scenarios and assertions.

Merge readiness

✅ Ready for maintainer review

This remains a useful, narrowly scoped cleanup with no actionable defects found. Current main retains the redundant fixture branches, and the linked test-audit campaign supports the work.

Priority: P3
Reviewed head: 5bd442fb29b25996263c3f28a58722e7b5529668

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving cleanup with clear campaign context and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored PR changes only synthetic stream construction; production music generation is unchanged, and the external-contributor runtime-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: The MEMBER-authored PR changes only synthetic stream construction; production music generation is unchanged, and the external-contributor runtime-proof gate does not apply.
Evidence reviewed 7 items Introduced change and fixture equivalence: The pinned introduced diff changes only the local helper and four calls. Every previous call supplied nonempty audio and done: true, so their generated event contents and order remain equivalent.
Independent negative coverage remains: Read the complete test module: transcript-only chunks, interrupted streams, provider errors, stalled streams, and media limits use separate fixtures and retain their assertions.
Current main still needs the cleanup: Comparison with fetched main shows the same fixture-only change and no production-provider difference. No merged replacement for this cleanup is established by the related context.
Findings None None.
Security None None.

How this fits together

OpenRouter's music provider converts streamed audio and transcript events into generated music assets. The changed test helper supplies synthetic streams to exercise that provider's decoding, completion, and cleanup behavior.

flowchart LR
  A[Test audio and transcript] --> B[Stream fixture]
  B --> C[Audio event and completion event]
  C --> D[OpenRouter music provider]
  D --> E[Generated audio and lyrics]
  E --> F[Existing assertions]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -10. Total -10 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 16 26 -10
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 16 26 -10

Review metrics

None.

Technical review

Best possible solution:

Keep the existing local fixture focused on its actual callers while preserving independent malformed, incomplete, and stalled-stream coverage.

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

Not applicable: this is fixture cleanup, not a reported runtime bug; source inspection confirms all affected callers already supplied audio and completion.

Is this the best way to solve the issue?

Yes: narrowing the existing helper removes unused flexibility without creating another abstraction or weakening the retained scenarios.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This is test-support cleanup with unchanged production behavior and retained assertions.
  • 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 MEMBER-authored PR changes only synthetic stream construction; production music generation is unchanged, and the external-contributor runtime-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)
  • Alix-007: 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 (3 earlier review cycles)
  • reviewed 2026-09-17T02:03:04.337Z sha f96600de6aa6cddec7a1e61d31d8155a2154c9a5 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-17T02:24:30.972Z sha c259941c82cfec824192cbe2128fb89bfe6b06b0 :: blocked before merge. :: none
  • reviewed 2026-09-17T02:42:45.085Z sha c259941c82cfec824192cbe2128fb89bfe6b06b0 :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc force-pushed the refactor/test-audit-openrouter-music-fixture-20260917 branch from c259941 to 5bd442f Compare September 17, 2026 04:08
@vincentkoc
vincentkoc merged commit 08918c6 into main Sep 17, 2026
101 of 103 checks passed
@vincentkoc
vincentkoc deleted the refactor/test-audit-openrouter-music-fixture-20260917 branch September 17, 2026 04:30
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: openrouter 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