herd: chat session file for daemon-signed-in sessions (RT-326) - #504
Conversation
Herd workers and shepherds signed in by the daemon had no session file, so every chat_* MCP tool refused them with 'no signed-in chat session' while Bash rt chat worked. An existing CLI-written file is kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. 5 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour. 📝 WalkthroughWalkthroughHerd start and resume now record shepherd session identity. Successful worker sign-in records worker session identity. Existing session files for the same handle remain unchanged; files for a different handle are updated while retaining their room. Read and write errors are logged as warnings. ChangesHerd session recording
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to Daemon-signed-in Herd sessions will now have chat identity files, while persistence failures remain non-fatal. No concrete release-impacting regression is established, so the change appears ready to merge subject to normal checks. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to Recording chat identity enables the intended tools, but the new files may remain usable for handle resolution after a session is signed out through the daemon. The downstream effect needs confirmation. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
…st start, resume and cleanup Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Herd workers and shepherds that the daemon signs in to chat had no local chat session file, so every
chat_*MCP tool refused them ("no signed-in chat session") while Bashrt chatstill worked through the CLI's derived-handle fallback.Herd handlers (
lib/daemon/handlers/herd.ts)recordChatSessionwrites the session file after the daemon'schat:sign-infor a spawned worker, and for the shepherd onherd:startandherd:resumeVerification: new tests in
herd-handlers.test.tsfor spawn, start, resume, stale handle and cleanup (RED first: no file after spawn);bun test lib/daemon lib/mcp3055 pass;tsc --noEmitclean.🤖 Generated with Claude Code
Summary by CodeRabbit