Skip to content

Verify daemon identity before session-cli restarts it#78

Closed
benvinegar wants to merge 1 commit into
mainfrom
fix/trusted-daemon-restart
Closed

Verify daemon identity before session-cli restarts it#78
benvinegar wants to merge 1 commit into
mainfrom
fix/trusted-daemon-restart

Conversation

@benvinegar

@benvinegar benvinegar commented Mar 23, 2026

Copy link
Copy Markdown
Member

Summary

  • persist a per-daemon identity record and expose an instance id in /health
  • only restart the daemon when the health payload matches a trusted Hunk-managed daemon record
  • keep compatibility with already-running legacy daemons by verifying the target pid still looks like a hunk ... mcp serve process on Linux

Testing

  • bun run typecheck
  • bun run lint
  • bun test test/daemon-record.test.ts test/mcp-server.test.ts test/session-commands.test.ts
  • bun test test/session-cli.test.ts -t "list/get/context expose live Hunk sessions through the daemon"
  • bun test test/mcp-e2e.test.ts -t "a live Hunk session auto-starts the daemon and renders CLI comments inline"

@benvinegar

Copy link
Copy Markdown
Member Author

Closing this stale MCP-era branch. The code it touched (src/mcp/*) has since been removed/replaced by the session broker + hunk-session stack, and daemon hardening/restart behavior has moved through later PRs including #329, #332, #333, #409, and #424. If we still want stricter restart identity checks, it should be a fresh patch against src/session-broker/* / src/session/* rather than rebasing this branch.

This comment was generated by Pi using OpenAI GPT-5

@benvinegar benvinegar closed this Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant