Skip to content

draft: combine per-chat Playwright ownership with transactional MCP hot reload - #12

Draft
AKzar1el wants to merge 120 commits into
mainfrom
fix/per-chat-playwright-hotreload-20261122
Draft

AKzar1el wants to merge 120 commits into
mainfrom
fix/per-chat-playwright-hotreload-20261122

Conversation

@AKzar1el

@AKzar1el AKzar1el commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Purpose

Safely combine the existing per-chat Playwright isolation implementation with transactional MCP hot reload, without replacing the operator's active Codexify process or reverting either feature.

Change summary

  • Retain ScopedPlaywrightPool and route direct/catalog/gateway calls using trusted durable task identities. Missing owner fails closed rather than falling back to the shared browser peer.
  • Use an owner-scoped discovery/transport connection for each Playwright MCP source in hot-reload generations, while preserving pinned in-flight calls.
  • Preserve server-bound authorization handling and browser context restrictions in the hot-reload tool registry.
  • Reject hot reload of a scoped browser source until a controlled quiescent handover is implemented; other MCP sources continue to support transactional hot reload.
  • Add a two-owner stdio integration regression: no-owner denied, owners A/B receive independent child PIDs, and each retains its own process; add scoped-source reload preservation test.

Verification so far

  • Windows cargo fmt --all: passed.
  • Windows cargo check --locked --offline --jobs 1: passed (only existing platform-specific unused warnings).
  • Local cargo test --lib playwright_sessions:: not completed: stopped only the new test compiler when free RAM fell below 400 MB, to protect running agents.
  • Please use this draft PR's hosted CI to validate the combined Rust tests/build before merge or installation.

Deployment safety

Not installed or activated on the live operator machine. Active Codexify service, 12 prompt-runner schedules, authenticated tabs and other workers were left unchanged. Never auto-replay uncertain application forms. This integration branch depends on the features in devnoname120#31 and the existing scoped branch; it is intended for staged validation before a guarded native service handover.

Final validation — 22 Nov 2026

  • Source commit: bf04c4f5851724d4acc283f1d646d4c3f14ffd65 on fix/per-chat-playwright-hotreload-20261122.
  • Passed: Scoped ownership + hot reload CI, including Rust formatting, per-chat Playwright session tests, transactional hot reload tests, and real two-owner stdio process separation.
  • Passed: Windows preview binary build, exact-head release build and CLI self-probe. Artifact: codexify-pr12-perchat-hotreload-windows-preview.
  • SHA-256 of Windows executable: ac052adddbdbb67f1bb420fdb4307e842a8c5ccf6b18cfb34c56dd80d7eda092; verified against artifact manifest, and SOURCE_COMMIT.txt matches the above source SHA. Candidate staged separately on operator PC, not installed.
  • Safety: Original Codexify and Playwright service PIDs remained unchanged; browser profiles, other workers, schedules and authenticated tabs not modified. A service switchover is deferred until active workers can be quiesced safely and the extension Profile 3 connection can be independently confirmed. Do not merge/deploy based solely on a CI-green compile; run live two-client/profile canary after guarded switchover, do not replay uncertain application forms.
  • Important: This draft is an integration/staging branch and is not an upstream release.

AKzar1el and others added 30 commits November 18, 2026 00:06
AKzar1el and others added 30 commits November 20, 2026 04:25
Report queued manual refresh despite an older durable schema failure, avoid claiming permissions were verified, and log only safe typed connector-conflict categories.
Expose private authenticated lease diagnostics, prevent repeated handoff navigation from starving connector maintenance, and provide verified rollback-safe browser archive activation.
Show current manual refresh readiness in health and reject unsigned-in or unavailable browser sessions rather than treating them as refreshable. Cover action ownership and slot checks with regression cases.
Use an independent on-demand launcher, verify exact stale process ownership before any forced stop, and defer replacement while live tool child commands are still running.
Use the existing independent maintenance task to restart safely after user authorization, retaining browser Send gates, hash backups and rollback.
Use private browser lease evidence instead of native health to rule out active Sends after scheduler shutdown; read-only handoffs no longer invalidate the already-authorized native restart.
…stop

Stop and restart now surface scheduler errors, wait for the exact installed native processes to exit, and refuse duplicate starts when a supervisor/listener remains.
Extract actual Rust generator code with standalone rustc, parse the output PowerShell, and mock nine stop/restart scenarios without touching the native task.
Reject direct elevated wrappers that can die with the native job and provide an on-demand highest-privilege Scheduled Task launcher with source freshness, SHA, browser and task gates.
Require clean source and healthy native service, start only with 5GB free RAM, monitor and abort own Cargo/Rust compiler below 1.75GB, preserve installed executable.
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