Repository navigation
Harden the browser companion and support parallel action pages - #22
Conversation
Adds an optional pool of up to four fixed ChatGPT pages in one private Chrome profile (one action per conversation; maintenance drains every page; shared 429 back-off and Send spacing), with optional health fields describing capacity. The companion still defaults to one page. Also recovers orphaned Windows Chrome, normalizes renderer priority, waits for editor hydration instead of treating a missing editor as sign-out, journals owned unsent drafts, bounds read-only DOM observations and passive health polls, persists Retry-After across restarts, and adds optional Simplified and Bones presentation levels. Upstream's admission, pairing-window reservation, chat-mode, conversation-limit and transcript rate-limit handling are kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
devnoname120
left a comment
There was a problem hiding this comment.
Reviewed 1105978, including pooled admission/idempotency, shared navigation/Send budgets, page ownership, draft handling and packaging. Requesting changes for reproducible regressions.
The strongest blocker is the connector-selection caret regression: the existing native pairing test passes on main and fails on this head before Send. In an isolated control, restoring the caret to the composer end immediately after the new row click makes the same test pass; that temporary diagnostic change was reverted. A second native regression prematurely times out maintenance requests queued behind a healthy connector refresh. Please repair these before merging the reliability/pool changes.
Validation: bun test ./tests: 305 passed, 163 skipped, 2 failed (new package staging tests on macOS). Typecheck, build and all four boundary tests passed. The native chrome-surface and conversation-approval suites passed (44 tests); the pairing suite's first failure causes cascading failures, so I do not count the later cascade as independent defects. Separately reran the first pairing case: main passes, this head fails, the caret control passes. The account-settings suite passes all 7 tests on main; this head reproduces the same maintenance failure seen in CI. Current CI also reports two billing-plan assertion failures that must be reconciled.
Recommendation: not ready. The ownership/retained-cleanup work is substantial and has meaningful tests, but the common pairing path regresses and the native browser tests need to be green.
- After clicking the connector row, place the composer caret after the retained chip. A pointer click left it at the typed query, so the prompt was inserted before the chip. - A window operation queued behind a predecessor no longer expires while that predecessor is still within its own budget (connector refresh can legitimately outlast a plan or reveal request). It still expires once the predecessor overruns. - Package staging accepts either spelling of a linked scratch directory (macOS /var -> /private/var) and still rejects an escaped real parent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for the detailed repro. Fixed in 810adf7: [P1] Connector caret
[P2] Queued maintenance deadline
[P2] Package staging path namespace
Validation: I couldn't run the native Chrome suites meaningfully here. On Windows, unmodified |
The browser companion's unconfigured spacing between conversation loads goes back to the upstream 180 seconds. Lane tests now configure the one-second interval they exercise explicitly, a new test pins the default, and the timing tests run on a frozen clock so they are not load-dependent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Follow-up review addressed in 79257c9:
Bun suite on Windows: 312 pass, 161 skipped (live browser), 0 fail. |
|
Independent Windows operator data for reviewing the new browser lanes (not a test of this PR's branch): I run a Codexify 2.3.29 installation on Windows with ten independently paired long-running revenue goals, one shared browser-action queue, and existing hourly source workers. During a first-goal-turn burst today, the current single-window companion repeatedly produced Resource snapshot while failures were occurring: Windows host 16 GB RAM, ~1.25 GB free, 29 Chrome processes using ~4.4 GB working memory. Those numbers suggest memory pressure but do not prove causation. The main Codexify service and companion authentication stayed healthy. I independently staged a very small alternative experiment: extend the browser's per-verified-stage idle deadline from 30s to 75s and exercise a simulated 52s navigation/connector stage. The targeted test, TypeScript check and bundle pass; the complete timeout/Send-uncertainty suite did not finish, so that candidate is deliberately NOT deployed or submitted upstream as a fix. For evaluating #22, I would particularly value a 10-conversation low-memory soak measuring per-lane Send acceptance, browser RSS, retry attempt count and whether |
devnoname120
left a comment
There was a problem hiding this comment.
Re-reviewed 79257c9. The original connector-caret, queued-maintenance and macOS staging fixes are present. The existing native pairing regression now passes, the offline suite has 311 passed / 163 skipped / 0 failed, and typecheck/build pass. The three-minute unconfigured navigation fallback is restored.
The native account-settings suite remains red: this head has 2 passed / 3 failed, while main at e90f4e9 passes all 7 of its account-settings tests on the same macOS host/private Chrome. The maintenance test now reaches the final signed-out case, but returns unavailable instead of authentication_required. Both rewritten direct billing tests also expect an empty plan despite the helper's existing verified-session-tier fallback returning Pro; both failures reproduce in an isolated rerun. Please correct the authentication distinction and reconcile the tests with the intended billing contract rather than weakening the verified-tier fallback to satisfy an assertion.
The original blockers have improved, but this current native browser gate still fails. Keep this open. No authenticated production soak or Windows deployment was performed.
devnoname120
left a comment
There was a problem hiding this comment.
Implemented the remaining findings and the additional native CI regressions directly on this branch. Confirmed sign-out is preserved through health errors, verified-tier billing fallback is retained with corrected expectations, and creation-only same-document URL assignment preserves Send evidence while switches between existing conversations still invalidate it. The captured Stop fixtures retain protection for unrelated drafts. Validation: 312 offline tests; all six native account-settings cases; ordinary pairing; all four captured Stop scenarios; five native creation, re-pairing, draft-preservation and cross-conversation cases; typecheck and build pass. Also applied the shared Linux lint correction. Final hosted checks are running; the earlier failing run is superseded.
Summary
Split out of #20, as requested. This PR covers the browser companion (TypeScript) plus the small native protocol change it needs. It is based on current
main(v2.3.29) and merged with upstream's recent companion work, so there are no conflicts.Changes
Parallel action pages (protocol)
browser-pool.tscan run up to four fixed ChatGPT pages in one private Chrome profile. Each conversation has at most one action at a time.actionCapacity,availableActionSlotsandactiveActionIds. A companion that leaves them out behaves exactly as before.GET /v1/health?ready=1waits for fresh proof that a session is idle. Ordinary health stays bounded and passive.companion.rs) validates the new fields.Windows Chrome
windows-chrome-recovery.tsrecovers an orphaned or stale Chrome left on the private profile.windows-priority.tsnormalizes renderer process priority.renderer-memory.tsbounds renderer memory on long sessions.shutdown.tsadds an orderly shutdown.process_is_aliveon Windows now waits on the process handle. Before, an exited process whose handle was still open counted as alive.Send reliability
conversation-readiness.ts: waits for ChatGPT's editor to hydrate after navigation (long chats can take a while). A missing editor is not treated as a sign-out.editor-recovery.ts: refreshes a stuck editor once before Send, if the opt-in recovery setting is enabled.draft-recovery.ts: journals our own unsent drafts, so a retry can reclaim them without discarding anything the user typed.stop-controls.ts: verifies the Stop and End-turn controls.submission-network.ts: optional network proof of a Send.approval-monitor.ts: watches for tool-approval cards.Retry-Aftersurvive a companion restart. Upstream's transcript-load rate-limit detection (conversation_load_rate_limited) is kept alongside them.Lighter, cheaper page observation
observation.tsbounds read-only DOM reads, andbrowser-window.tsadds a short-lived passive health cache. Together they stop polls from competing with an action for Chrome's main thread.minimal-page.ts,presentation*.ts: optional Simplified and Bones presentation levels (off by default).Merged with upstream
refresh-pairing,release-pairing), chat-mode compatibility, conversation-limit detection, model-picker refactor and stage diagnostics are all kept.Testing
bun test ./tests(Bun 1.4.0, Windows 11): 309 pass, 0 fail. The other 161 tests need a live Chrome and are skipped by design.tsc --noEmit: passes.cargo check --all-targetson this branch alone: passes.🤖 Generated with Claude Code