Merge main; use the shared chatShutdownDetacher for OpenCode and Codex
OpenCode and Codex chats implement Detach (called by chatManager.Close) instead of a parallel DetachSessions interface. Docs follow the Claude Code host and the systemd KillMode=process unit. The opt-in live restart check copies only the stage provider's login row into its scratch OpenCode database, builds the CLI for skill install and removes its scratch tree.
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
// A server restart detaches from the App Server without interrupting the
|
||||
// thread's turn; the next server's fresh connection still sees the turn in
|
||||
// progress, then completed, through the read-only turn list.
|
||||
func TestDetachSessionsLeavesTurnRunningForNextConnection(t *testing.T) {
|
||||
func TestDetachLeavesTurnRunningForNextConnection(t *testing.T) {
|
||||
var completed atomic.Bool
|
||||
var mu sync.Mutex
|
||||
var methods []string
|
||||
@@ -29,7 +29,7 @@ func TestDetachSessionsLeavesTurnRunningForNextConnection(t *testing.T) {
|
||||
if running, err := before.ProbeTurn(context.Background(), fixtureThread); err != nil || !running {
|
||||
t.Fatalf("turn not running before the restart: %v %v", running, err)
|
||||
}
|
||||
before.DetachSessions()
|
||||
before.Detach()
|
||||
after := modelTestChat(t, appServer)
|
||||
if running, err := after.ProbeTurn(context.Background(), fixtureThread); err != nil || !running {
|
||||
t.Fatalf("turn did not survive the restart: %v %v", running, err)
|
||||
|
||||
Reference in New Issue
Block a user