Repository navigation
fix: avoid remote audio downloads for waveform decoration - #156307
vincentkoc wants to merge 1 commit into
Conversation
|
🦞👀 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. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs changes before merge. Reviewed October 3, 2026, 1:30 AM ET / 05:30 UTC (Revision 11). ClawSweeper reviewWhat this changesThe Control UI audio player limits new waveform decoding to browser-held audio, updates regression coverage, and makes the media-header helper private. Merge readiness⛔ Needs changes before merge - 1 item remains The fix remains useful: current main still downloads remote audio for waveform decoration. The pinned patch has no discrete correctness finding and has convincing browser proof, but the public branch remains conflicted and the corrected integration is unpublished. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI turns chat audio attachments into inline players. Its source controller prepares playback, while the audio component adds playback controls and optional waveform decoration. flowchart TD
A[Chat audio attachment] --> B[Playback source controller]
B --> C[Native audio playback]
B --> D[Waveform cache lookup]
D --> E[Browser-held audio check]
E -->|Local bytes| F[Bounded waveform decoding]
E -->|Remote source| G[Plain seek controls]
F --> H[Waveform seek controls]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -2, Tests +75. Total +73 across 3 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep waveform decoration limited to browser-held bytes while preserving current main's shared header export, native playback, cache ownership, and media recovery behavior. Do we have a high-confidence way to reproduce the issue? Yes, the source establishes the path: a visible audio card with eligible duration metadata can fetch its remote source for waveform decoding before play. The supplied Chromium comparison demonstrates that component behavior; this review did not execute current main. Is this the best way to solve the issue? Yes, restricting decoration at the audio-player owner is a narrow repair that preserves native media loading. The final integration must retain the shared header export needed by current-main callers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9c4a75fa73fa. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (10 earlier review cycles; latest 8 shown)
|
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
What Problem This Solves
Fixes: opening chat downloads remote audio in full just to draw a waveform, before the user chooses to play it.
User Impact
Remote audio keeps its native play, pause and seek controls without the extra waveform-only download. Browser-held blob/data audio still gets a waveform, and already-retained peaks are reused.
Why This Change Was Made
Waveform decoration now uses only browser-held bytes. Source/authentication identity, transcode readiness, bounded decoding and retained Blob cleanup stay with their existing owners.
Original published-head delta: production +8/-10 (net -2), tests +175/-100. That historical version makes the header helper private. The unpublished current-main integration below preserves its export for newer callers.
Provenance: the remote waveform read was introduced in 116115 (
d60436a4), authored and merged by @steipete. Native playback is not removed or delayed by this fix.Evidence
The following completed proof is bound to original published head
fb4a15436de00dae96cd8b3f7c14ffe28a6ad668, not the new committed integration.checks-ui (1/3),(2/3), and(3/3)jobs span 285s, 335s, and 312s respectively from job start to completion, including setup; these are elapsed job durations, not isolated test or CPU time.Before
Waveform decoration performs one extra full-body fetch.
After
The same playback controls use native media loading with no waveform-only fetch.
Current-Main Integration
Earlier signed integration
e1d3cd94bf7b1e25eb22a670488597e6bf3fa28cpreserves the original head and frozen mainbf2883a22e341cdc0cbbdd60fadfacf505b68c62as its parents, with tree953db3edd72db746adc65c6566c3fda6ee790357. It changes only the audio player and its tests relative to that main: production +7/-9, tests +125/-83. Main's newer fixture helpers, bounded reader, disconnect and superseding-player coverage remain intact.161173, commit
3a9edfe4350f258fe0d8c677e93d61857935c63a, introduced two additional production callers ofbuildChatMediaFetchHeadersin attachment availability and image loading. The original private-export change would break that integration, so the helper now remains byte-identical to main, including its export. Cache lookup still precedes the browser-held-source guard.Fresh source AutoReview found no actionable P0-P2 issue in the complete two-file diff. Its other metadata-only passes are not additional source reviews. Parent inspection also verified the helper and both main callers. This is source review, not runtime qualification.
The corrected candidate's first remote composition request was superseded in pending budget slot12 before any runner or test step. Source-backed admission investigation then justified one unchanged-candidate continuation: 37069887456 passed all29 owner/sibling tests (20 player,4 waveform,5 bounded-reader), with zero skips/failures and all18 source pins unchanged. Its aggregate remained failed because the subsequent formatter check found one test-fixture line wrap; no test failure was hidden.
The formatting-only follow-up completed the remote formatter, explicit two-path changed checks and diff check successfully. This includes the eight selected core-test type graphs, UI types, lint, guards and dead-export checks. The exact generated patch changes only one object-literal wrap in the player test (+3/-1), with production unchanged. It is committed as signed unpublished successor
8758eb9d0782833fe7733faef2590cb84378959b, treec1eb561c5fffda35020e6e5155340645cc5df20c. Parent verified the patch and18 final source pins. The29 behavioral passes remain pre-format evidence one1d3cd94, reused for this mechanical-only successor; they were not replayed or relabeled as a new test run. Both controllers joined and their exact leases completed. Backing Actions cancellation during successful native cleanup is not an application-proof failure.Current Native Candidate
The prior signed unpublished native candidate was
67db39c47f7ea745fa9003a5f7dc8fd0748a4833, treea850e27d7499ebd530be06b69eeba1b6a8b56ff3. It merges the prior88bf71bf99947f7769199d011a91dc238d249865correction with verified landed main5c894c71b889408c0bf583ae4aa08e36129ab3a4, preserving original PR ancestry. The complete two-file main-relative patch is byte-identical. All18 proof inputs are unchanged between main456 and5c;17 original receipt pins match, with only the already-reviewed package-file exclusion reorder differing. Parent and independent review support reusing the scoped proof under its original bindings, not relabeling it new-head execution.The first full native gate at
8758eb9dpassed the full build in6m45s, production/script/root typechecks, and core/script lint. Plugin lint failed atextensions/codex/src/session-catalog-index.ts(723 lines against700). Both that file and the lint configuration were byte-identical to frozen main. The aggregate remains failed, full tests did not start, and no passing gate stamp was written. The controller joined, the exact lease completed, and the failed log was preserved.Canonical 163806 already repairs that lint failure on main. The integration also contains main's staged UI validator fixture repair. No unrelated subsystem was patched in this PR. Parent and independent review verified the entire two-file waveform delta is byte-identical against the new main base;17 of18 prior proof pins are unchanged. The sole metadata difference only reorders an identical package-file exclusion, leaving dependencies, scripts and all other fields unchanged. Prior scoped proof is retained under its existing bindings, not rerun or relabeled as new-head proof.
The corrected-composition full gate finished FAILED through the same all-remote route. Full build passed in408.2s; production, scripts and root-test types passed in131.31s,43.97s and181.11s. Core lint failed only
src/gateway/worker-environments/bootstrap.ts(702 lines against700) and its test (1023 against1000); plugin/script lint passed. Full tests did not run and no passing gate stamp exists. The controller joined, exact lease completed and settled operation lock was recovered natively; the reporting-portal timeout was separate from the actual lint failure.The bootstrap failure above is historical and repaired by 163959, merged as 5c894c71. The new waveform candidate includes it without changing limits or its own patch. Its third full native remote gate37090935911 has now finished FAILED: full build passed in329.5s; production, scripts and root-test typechecks passed in126.40s,38.97s and161.42s; plugin and script lint passed. Core lint failed only
src/agents/subagents/spawn/subagent-spawn.production-boundary.test.tsat1,004 lines against1,000. Full tests did not run and no passing gate stamp was written. The failing test and lint configuration are byte-identical in this candidate, selected main5c and checked current-main checkpointa41db648dc3de4e1fd26d90ab2d1be179319678c. The test was last modified by 162176; its trusted-host-identity and lineage assertions must be preserved in the canonical size repair. The failed log is retained, controller joined, exact lease completed, and the settled operation lock was recovered natively. Portal reporting timeout is separate from the lint failure. That failed candidate review remains preserved unchanged. The canonical repair and successor admission are recorded below; no cap increase, assertion weakening or inherited-failure waiver. Public head remainsfb4a15436de00dae96cd8b3f7c14ffe28a6ad668.The current signed unpublished candidate is
711a4f2be70190b669d3f5eb0b826d3d19a5a4a0, tree60c2614248dd0be31247af9517838a25e6f32303, preserving the original67db39c4parent and incorporating canonical repair164002 / 5e6794cf. That repair landed with exact-head green CI, a complete39-case owner suite, unchanged lint limits, and no ClawSweeper findings. The waveform's full two-file patch and all18 compared proof inputs remain unchanged from main5c to5e; parent and independent source review admit normal remote gates without replaying the retained29-case/scoped proof. Historical failed gate results keep their original bindings.Full native remote qualification37094755221 ended failed/incomplete on October3. Build and full checks passed; five completed test groups passed30,961 cases with57 skips. Tooling had not completed, so its passing assertion rows and nested fixture summaries do not establish a full-suite pass. The check job attributes cancellation to
blacksmith-sh[bot]: Run Testbox was cancelled at05:15:19UTC, the job completed cancelled at05:20:06, and the native wrapper exited255. No formal assertion failure was captured, but no native success stamp exists. The cancellation reason is unknown; the one check-job log request returned404BlobNotFoundand was not retried or fetched through another route.The controller joined, exact lease completed, and the settled native operation lock was recovered and verified absent. Source head/tree and clean state stayed exact. The current correction review is NEEDS WORK / tests fail for this incomplete gate; retained scoped proof is not erased. No source push, local application execution or provider change occurred. Next: obtain Blacksmith's cancellation decision for this exact run/job/time, including the triggering threshold and last activity if idle-related, then complete supported missing qualification before publication and exact-head CI. No blanket proof replay, larger limits or gate waiver.
Remaining Before Merge
The original-head CI, attempt 2, failed when the docked-question Collapse action exceeded its 30-second click deadline in job108121461589. Cause and candidate involvement remain unproved. The isolated one-case result and seven-case ordered-prefix result do not recreate the original three-worker shard. Previous log/media retrieval stops remain respected; no alternate retrieval or timeout/assertion change was made.
Under the frozen test-failure policy, that bounded unresolved history remains documented rather than an additional root-cause approval gate. Current affected-test and changed-check proof is complete under the bindings above. Full native remote correction gates, native publication, refreshed head-stamped review and exact resulting-head required CI are still mandatory before squash. The original48-case and visual proof is not relabeled as integration proof.