fix-chat-create-obsolete-daemon

Recover chat creation from obsolete project daemon

Metadata

Statusdone
Agent identityfbb2d89fe44d6b761bcb4b67748ab3d417f29df70a65f8d9403308f5bb2bab78
Created2026-08-01T06:58:21.490564352+00:00
Started2026-08-01T06:58:29.760098703+00:00
Completed2026-08-03T09:42:51.327516945+00:00
Tokens24122718 in / 47174 out

Description

Fix the attended TUI chat-create failure observed in /home/bot/jobs: a current TUI was correctly pinned to /home/bot/jobs/.wg, but that graph still had a 38-day-old live daemon process running an obsolete binary without the dedicated chat.sock. The compatibility fallback to the general IPC lane timed out; request-id reconciliation found no graph/runtime receipt, and the TUI showed chat creation did not produce a reconcilable graph commit; no chat/runtime residue was found. Restarting only that project daemon on the current binary immediately fixed creation and produced exactly one .chat-1 pinned to pi:zai:glm-5.2.

Make this failure self-explanatory and recoverable without cross-graph mutation. A current client/TUI must authenticate the explicit graph/service identity and detect an obsolete/unresponsive daemon before or after a lost create response. Prefer a safe idempotent same-request recovery: when policy permits and no ownership ambiguity exists, restart/reconnect the exact project daemon and retry the same request ID; otherwise show a precise wg --dir <exact> service restart action. Never silently connect to an inherited WG_DIR, never create in another graph, never allocate a duplicate chat, never kill an unverified/reused PID, and never claim success without the durable graph receipt. Preserve route-less attended Pi selection and existing chat/session history.

Validation

  • Candidate-binary test with current TUI/client + explicit graph + old/compat daemon lacking chat.sock; no generic unreconcilable error.
  • Lost response after commit returns the exact existing chat by request ID.
  • Lost response before commit either safely restarts/retries the same request or emits precise project-scoped recovery; zero residue/duplicates.
  • Inherited sibling WG_DIR cannot redirect graph, socket, receipt lookup, or restart target.
  • PID reuse/unverified legacy state cannot authorize killing an unrelated process.
  • Existing chats and route generation remain unchanged.
  • cargo fmt --check, focused chat IPC/TUI/service-identity tests, cargo check, cargo clippy.

Depends on

Required by

Messages 1 message (1 unread)

  1. #1fix-chat-create-obsolete-daemon2026-08-01T07:52:19.408709269+00:00read
    Validation complete: owned candidate-binary TUI obsolete-daemon smoke PASS; service unit suite 69/69 PASS; service_identity tests 2/2 PASS; cargo fmt/check/clippy PASS (repository-existing warnings only); cargo install --path . --locked PASS. Existing timeout-reconcile smoke reached all chat/IPC checks but its unrelated Ctrl+O footer-width assertion was clipped at 180 columns on rerun.

Log