Skip to content

test(browser): create probe body before starting frame requests - #23730

Merged
nwparker merged 1 commit into
mainfrom
nwparker/ci-wire-probe-document-body
Sep 29, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/ci-wire-probe-document-body

Conversation

@nwparker

@nwparker nwparker commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 0 0 0 0
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2 0

ELI5

Create the browser test page's body before its script tries to add frames to it.

What Changed

The identity probe's HTML now explicitly opens <body> before its bootstrap script. Previously the script ran in the head and relied on its first network request taking long enough for the parser to create an implicit body.

Why

CI failed with Cannot read properties of null (reading 'append') in the fallback-disabled control. An explicit body removes the parser/network race directly, without retries, longer timeouts, or changes to the identity assertions.

Linked Issue

CI failure: https://github.com/stablyai/orca/actions/runs/36498103658/job/109183790899

Visual Proof

N/A — test fixture HTML only; no product UI change.

Testing

  • Both browser identity suites pass under hidden Electron on macOS: 7 tests, including the clean and fallback-disabled cross-context controls.
  • Changed-code quality gate passes.
  • CI covers Linux and remaining repository checks.

Review

Only the shared probe document changes. Browser identity handling and all captured-context assertions are unchanged.

Agent skill upstream boundary

  • Not applicable.

Checklist

  • Small and focused; before/after, mechanism, and rationale explained.
  • Self-reviewed; cross-platform impact considered.
  • Local checks pass; remaining checks run in CI.

@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: b6707a51-24b6-428e-a858-34c73ebdb945

📥 Commits

Reviewing files that changed from the base of the PR and between 2aed2cf and d83e657.

📒 Files selected for processing (1)
  • src/main/browser/browser-session-ua-wire-probe-server.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The generated probe page now wraps its script in a body element. Previously, the markup placed the script after the title and ended after the script tag.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to d83e6

The change wraps the probe script in a body so body-dependent setup can run after the body is created. No merge-blocking impact is apparent.

Architecture Summary

Architecture risk: 🔵 Low · up to d83e6

The change affects 1 system.

Changed systems: src

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — src (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in src/main/browser/browser-session-ua-wire-probe-server.ts: The generated probe page now opens a <body> before its script; previously the script followed the title directly.
  • observed — Modified behavior in src/main/browser/browser-session-ua-wire-probe-server.ts: The generated page now closes the body after the script; previously it ended after the script tag.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: creating the probe body before frame requests start.
Description check ✅ Passed The description is complete and focused. It explains the change, cause, rationale, testing, visual proof, scope, and checklist status. It links the CI failure that motivated the change.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Low risk] Adds HTML body tags to a test probe page.

The PR appears safe to merge.

Summary

The shared browser identity probe now opens its body before running the bootstrap script, preventing frame insertion from encountering a null document.body.

  • Identity collection and cross-context assertions are unchanged.

Reviews (1) · Last reviewed commit: "test(browser): create probe body before ..."

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Explicit <body> in the probe fixture — probePage() now wraps its bootstrap script in <body>…</body>, so document.body exists before the script's async IIFE reaches the document.body.append(...) calls for the frame, cross-context frame, and Blob frame. The parser creates the body element on the <body> start tag, ahead of the following inline script, which removes the parser/network race outright — no assertion, retry, or timeout changes.

The sibling childPage() and desktopPeerPage() documents don't touch document.body, and no test pins the exact HTML string, so the change is correctly scoped to the one page that needed it.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@nwparker
nwparker merged commit 8bb78f0 into main Sep 29, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant