Repository navigation
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. |
|
Codex review: needs maintainer review before merge. What this changesThis PR uses monotonic timestamps to preserve the browser action download collection window across wall-clock corrections. Example: Date.now jumps forward 10 seconds while first.txt is saving and second.txt starts within the 250 ms quiet window.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR narrowly fixes a demonstrated download-reporting bug still present on current main, with no actionable findings; exact-head CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe browser plugin observes Playwright download events, saves files under managed paths, and returns action-scoped download metadata through the browser HTTP bridge. flowchart LR
A[Browser action] --> B[Playwright page]
B --> C[Download event owner]
C --> D[Managed file save]
C --> E[Monotonic quiet window]
D --> F[Action download metadata]
E --> F
Technical reviewBest possible solution: Keep both quiet-window readings on performance.now within the existing capture owner and land after the required exact-head checks pass. Do we have a high-confidence way to reproduce the issue? The supplied corrected Gateway/Chromium reproduction demonstrates the failure and successful repair with clock-step and no-step controls; current-main source retains the responsible wall-clock calculation. Is this the best way to solve the issue? This is the smallest complete fix: replace the timestamp producer and elapsed-time reader together, preserving the existing owner, timing limits, and save lifecycle. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c4f34cb7bb71. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +1, Tests +3. Total +4 across 4 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (3 earlier review cycles)
Reviewed October 28, 2026, 11:38 PM ET / October 29, 2026, 03:38 UTC (Revision 4). |
…lock Ref: BUG-228-browser-action-download-drain-deadline-wall-clock (local finding)
f401e43 to
c124cf9
Compare
|
🦞👀 Re-review progress:
|
|
🦞👀 Re-review progress:
|
Corrected runtime reproduction — supersedes NO-REPROThe initial fallback-timer run did not exercise the bug. The final probe observes the actual compiled download timestamp assignment, logs its clock reading, then steps only the Gateway process's Built Gateway, Gateway-owned browser HTTP bridge, real Chromium 156.0.8078.47, and real downloads saved under managed paths. The page starts first.txt 100 ms after the click; the fixture releases the second download 20 ms after observing the first quiet-window elapsed-time read. This keeps the sibling inside the quiet window instead of depending on a drifting page timer. The step runs after the first download event timestamp while its managed save is pending. No production source or built artifact is patched by the harness. Final observed results: The contributor's fix uses Focused verification in the isolated container: browser session suite 27/27 passed. Oxfmt check passed for all four changed browser files. Whole-PR delta against merge base: production +3/-2 (including the monotonic timestamp comment); tests +9/-6, test count +0. This targeted reproduction supersedes the initial NO-REPRO conclusion. Thanks to @SunnyShu0925 for the report and original fix; their commits are preserved. No merge performed. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Landed in 12c6ec4. Thanks @SunnyShu0925. Browser downloads are no longer missed when the wall clock jumps. |
…lock (openclaw#186850) fix(browser): keep the download quiet window on the monotonic clock The browser plugin measured the download quiet window with Date.now, so a forward wall-clock step while a download was in progress ended the window early and a following download was missed. The window now uses performance.now(), as the other extension budgets do since openclaw#186484. Evidence: built Gateway with real Chromium over the browser HTTP bridge. A process-local +10 s Date.now step was placed between the window's timestamp write and its elapsed-time read, and logs confirm the order. Main missed the second download (twice); with this change both files were captured (twice). No-step controls captured both on each ref, and the system clock was not touched. Details: openclaw#186850 (comment). Thanks @SunnyShu0925. Co-authored-by: SunnyShu <0668000539@local> Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
A wall-clock correction during browser action download collection can end its 250 ms quiet window early and omit sibling downloads from the action result.
What Changed
performance.now()directly for both the download event timestamp and elapsed-time calculation. No local clock helper or plugin SDK export.Thanks to @SunnyShu0925 for the report and original fix; their commits are preserved.
Evidence
Built Gateway / real Chromium browser HTTP bridge evidence. The targeted process-local clock probe logs the timestamp write, a +10-second Date.now step, and the subsequent elapsed-time read. No system-clock changes.
Focused browser session suite: 27/27 passed in the isolated container. Formatting check passed for all four changed browser files. Production delta against merge base: +3/-2 including the timestamp comment; test lines +9/-6, test count +0.
Merge Danger
Two-way door: reverting fully restores the previous timing behavior. No persisted state, configuration, schema, permissions, or public API changes. Blast radius is the quiet-window collection of sibling downloads started by browser actions.