← Back to Pull requests

Add standalone browser commands with persistent sessions #925

Closed
unknown closed this pull request without merging on Oct 16, 2026 20:05 UTC
View on GitHub
unknown unknown commented on Oct 16, 2026 15:47 UTC
Author

Summary

Add a standalone phoenix-browser executable so coding harnesses can retain browser interactions, debugging evidence, and profiling state across shell commands without running the Phoenix server.

Changed

  • Reuse all 12 browser operations and schemas. open returns URL/title, interactive accessibility refs, and navigation-specific console errors; later observations revalidate the snapshot and expose partial failures.

  • Select explicit/environment sessions or default to the canonical Git worktree. A private daemon serializes operations, starts Chrome lazily, and owns explicit close and 30-minute idle cleanup. Close can interrupt work; cleanup failure retains exclusive ownership until repair and explicit retry. Failed startup kills and reaps the unready child.

  • Return human or JSON outcomes with daemon/browser identities, structured errors, artifact handles, semantic/size preflight, and eval --stdin. State loss is explicit; uncertain side effects are never automatically replayed. Typed images become verified files, and oversized profiling samples use saved artifacts.

  • Preserve console history and document ownership across navigation, detached frames, and isolated cross-origin child targets. Capture gaps fail visibly instead of silently omitting evidence.

  • Strengthen shared snapshot interactions: bounded CDP collection, private artifacts retired on document replacement, native-input guards that preserve causal activation, and shared input leases held through guard cleanup. Completed heap captures remain discoverable when diffing fails.
  • Validation

  • 26 executable integration tests passed with actual Chrome on macOS; Linux adds a non-UTF-8 filesystem-path fixture. Coverage includes the browser/profiling journey, session isolation, concurrent startup, cancellation, browser death, signals, idle expiry, and invalid input.

  • 16 executable unit tests (13 daemon and three CLI), four operation-boundary tests, nine console tests, 13 snapshot tests, heap failure regressions, and existing native browser journeys passed. An independent installed-CLI cross-origin probe retained all nine console entries across three navigations.

  • Owning all-target Clippy, repository formatting, AST/timing rules, Allium/spec checks, tasks, and dev-tool checks passed. Isolated installation passed help/schema/open/eval/close.

  • Codex completed review of 35ca4f4 with no findings; all earlier review threads are resolved. All hosted CI lanes, including the full Rust suite and musl production-feature check, passed in run 38956232725.

  • Broad local Rust testing stopped on an unchanged macOS SQLite controller fixture failure, independently reproduced and tracked as task 41017; that run is not claimed green.
  • Task 41016. macOS/Linux; no MCP, profile import, or cross-version daemon protocol guarantee. Installation and harness examples are in docs/phoenix-browser.md.

    Diff: 363 lines (+272 / -91) across 4 files Reviewer: scottopell Review duration: 257m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 363 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.353
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #925"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.7% (MEDIUM) · Higher = larger blast radius
    42.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.9% · Safe to merge
    16.9%