Problem
moli serve currently has no client-controlled graceful whole-server shutdown path through CDP. Browser.close is not present in BrowserAction, so the Cairn dedicated-browser adapter waits for the command, times out, and terminates its owned child process. That now recovers safely with #679, but it still skips orderly owner/checkpoint/profile teardown and reports graceful=false.
A persistent-profile synthetic lifecycle built from merged #677 plus #679 can reopen after forced termination, but abnormal termination should remain fallback, not the normal controller contract.
Desired behavior
A valid Browser.close sent on the browser-level CDP websocket should:
- produce the normal empty success response;
- flush that response to the requesting frontend;
- stop accepting new protocol connections;
- shut down all CDP owners/target frontends and join checkpoint workers;
- return from
ProtocolServer::serve() so profile/storage guards drop normally;
- exit
moli serve with status 0.
Target/page websocket clients must not gain process-shutdown authority merely by sending a Browser-domain string. Invalid params/session routing should fail without shutting the server down. Repeated close requests should be idempotent.
Acceptance
I am preparing a focused implementation/probe. This is independent from #666/#677 directory durability and #678/#679 abnormal-owner lock recovery.
Problem
moli servecurrently has no client-controlled graceful whole-server shutdown path through CDP.Browser.closeis not present inBrowserAction, so the Cairn dedicated-browser adapter waits for the command, times out, and terminates its owned child process. That now recovers safely with #679, but it still skips orderly owner/checkpoint/profile teardown and reportsgraceful=false.A persistent-profile synthetic lifecycle built from merged #677 plus #679 can reopen after forced termination, but abnormal termination should remain fallback, not the normal controller contract.
Desired behavior
A valid
Browser.closesent on the browser-level CDP websocket should:ProtocolServer::serve()so profile/storage guards drop normally;moli servewith status 0.Target/page websocket clients must not gain process-shutdown authority merely by sending a Browser-domain string. Invalid params/session routing should fail without shutting the server down. Repeated close requests should be idempotent.
Acceptance
Browser.closesuccess before websocket close;I am preparing a focused implementation/probe. This is independent from #666/#677 directory durability and #678/#679 abnormal-owner lock recovery.