agent-orchestrator/backend/internal/session
harshitsinghbhandari f03c7c8c88 fix(session): harden teardown/restore safety + drop dead reaction flag
Address PR #2 Copilot review comments on the merged LCM+SM lane:

- session: validate runtime handle + workspace path before Kill/Cleanup
  teardown; refuse (ErrIncompleteTeardownMetadata) or skip rather than
  hand empty args to a real adapter's Destroy (unsafe delete).
- session: reject Restore unless the session is terminal
  (ErrNotRestorable) so a live session can't spawn a duplicate
  runtime/workspace.
- ports: document SpawnConfig.OpenTerminal as reserved/not yet honored.
- lifecycle: remove the unread reactionConfig.auto field; note
  approved-and-green is notify-only (human decides to merge).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 14:21:47 +05:30
..
fakes_test.go test(session): cover spawn orphan-to-errored route and restore runtime rollback (review follow-ups) 2026-05-27 14:00:44 +05:30
manager.go fix(session): harden teardown/restore safety + drop dead reaction flag 2026-05-27 14:21:47 +05:30
manager_test.go fix(session): harden teardown/restore safety + drop dead reaction flag 2026-05-27 14:21:47 +05:30