t1435: keep pulse sessions fresh and canonical#4129
Conversation
Prevent supervisor pulse runs from reusing persisted OpenCode sessions so each cycle executes against fresh pre-fetched state instead of stale conversational context. Also ensure setup keeps autonomous pulse services pinned to the canonical main repo path when deployed from a linked worktree, so auto-updated machines do not supervise feature worktrees by accident.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughFixes pulse session reuse causing dispatch stalls by preventing pulse runs from persisting or retrieving sessions. Adds session clearing for pulse role, updates worktree path resolution in setup configuration, and adds test coverage to verify pulse runs don't reuse sessions. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Wed Mar 11 05:02:55 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
…alse repos PULSE_DIR defaulted to ~/Git/aidevops, causing the host app to associate all supervisor pulse sessions with that project — even when it had pulse:false in repos.json. This created 155+ orphaned sessions in ~36h. Root causes: 1. pulse-wrapper.sh hardcoded PULSE_DIR to ~/Git/aidevops (line 214) 2. setup.sh explicitly set PULSE_DIR to the aidevops repo path in both launchd plist and cron job environment variables 3. Session reuse was intentionally disabled for pulse role in PR #4129 (headless-runtime-helper.sh clears session ID each cycle to avoid stale context), so each cycle creates a fresh session — by design Fix: - Change PULSE_DIR default to ~/.aidevops/.agent-workspace/ (neutral path not associated with any managed repo) - Update setup.sh launchd plist and cron job to use the neutral path - Add mkdir -p for PULSE_DIR to ensure the directory exists - Document why session reuse is disabled (stale context prevention) The supervisor is a framework-level process, not a project-level one. Using a neutral workspace path means pulse sessions are filed under the framework workspace rather than polluting any specific project's session list. Closes #5136
…alse repos (#5137) PULSE_DIR defaulted to ~/Git/aidevops, causing the host app to associate all supervisor pulse sessions with that project — even when it had pulse:false in repos.json. This created 155+ orphaned sessions in ~36h. Root causes: 1. pulse-wrapper.sh hardcoded PULSE_DIR to ~/Git/aidevops (line 214) 2. setup.sh explicitly set PULSE_DIR to the aidevops repo path in both launchd plist and cron job environment variables 3. Session reuse was intentionally disabled for pulse role in PR #4129 (headless-runtime-helper.sh clears session ID each cycle to avoid stale context), so each cycle creates a fresh session — by design Fix: - Change PULSE_DIR default to ~/.aidevops/.agent-workspace/ (neutral path not associated with any managed repo) - Update setup.sh launchd plist and cron job to use the neutral path - Add mkdir -p for PULSE_DIR to ensure the directory exists - Document why session reuse is disabled (stale context prevention) The supervisor is a framework-level process, not a project-level one. Using a neutral workspace path means pulse sessions are filed under the framework workspace rather than polluting any specific project's session list. Closes #5136



Summary
setup.shresolve the canonical main worktree forPULSE_DIRso auto-updated machines do not repoint pulse at feature worktreesCloses #4128
Summary by CodeRabbit
Bug Fixes
Tests