Repository navigation
fix(ci): wait for fragment navigation policy reports - #25017
Conversation
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
reportAfterActoption on the arm driver —openPreviewArmnow awaits the browser's nonce-scoped CSP report after the action, reusingpollReportsUntil/untilAborted/describePreviewFramerather than adding a new wait path. Placed aftersettleAfterMountand guarded on!actError.- Fragment-tap case waits on evidence — the
shownarm passesreportAfterAct: 'frame-src'and assertsshown.actErroris null, replacing the fixed 200 ms settle as the precondition for readingshown.reported.
The wait is sound: a srcdoc frame has no URL for frame-src to match, so no mount-time report can satisfy it — it only resolves on the refused fragment navigation, and the existing expect(shown.reported).toContain('frame-src') still pins the outcome. The hidden arm's absence assertion is unchanged and remains the documented absence arm to the shown presence arm.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe preview arm driver accepts an optional Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The test now waits for the fragment-navigation refusal report, which cannot be satisfied by an earlier matching report from this fixture. No concrete merge-blocking risk is evident; public CI is still pending. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |

ELI5
A mobile preview browser check could fail while the browser correctly blocked a fragment-link navigation. The check now waits for the browser’s policy report before reading it.
What Changed
The existing preview driver accepts a report to await after the click, using its existing report collector and test-abort diagnostics. The fragment-link case also checks that the click actually succeeded. The shipped content policy, preview component and hidden-link control keep their existing behavior and assertions.
Why
The previous check read a presence assertion after a fixed 200 ms settle. That does not establish whether an asynchronous policy report has arrived. Reusing the existing nonce-scoped report wait makes the browser’s actual report the precondition, instead of increasing a delay or weakening the assertion.
Linked Issue
Unblocks the mobile browser CI failure on #24790; refs #13287. This is a separate test-driver correction, with no additional OpenCode product scope.
Visual Proof
N/A — browser test synchronization only; no product UI or policy changes.
Testing
frame-srcreport. The click succeeded; the old driver read only image/font reports before the frame report was recorded.The CI browser was Chromium 154.0.8037.57; local Chromium was 154.0.8037.97. The delayed collection is a controlled reproduction of the presence-reading race, not a claim to reproduce CI’s exact network scheduling. An initial local WebKit run could not find the installed browser after HOME isolation; only that engine was rerun with its explicit existing cache path, followed by the full final-source suite.
Review
Two existing test files change. The driver reuses the current collector, nonce ownership, cancellation and failure diagnostics. Public CI passed: 15 successful checks and 17 intentional skips on the exact final head.
Agent skill upstream boundary
Notes
The change is confined to browser test synchronization. It adds no platform behavior, remote protocol or source-control assumptions.
Checklist