t5136: Fix pulse-wrapper.sh to use neutral PULSE_DIR, prevent session accumulation#5137
Conversation
…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
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Caution Review failedPull request was closed or merged during review 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 (2)
WalkthroughThe pull request decouples Pulse sessions from repository-specific paths by replacing the PULSE_DIR default from a managed repository location to a neutral workspace directory at Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
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: Tue Mar 17 01:36:28 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|



Summary
PULSE_DIRdefault from~/Git/aidevopsto~/.aidevops/.agent-workspace/— a neutral path not associated with any managed reposetup.shlaunchd plist and cron job to use the neutral workspace path instead of the aidevops repo directoryProblem
When a repo has
pulse: falsein repos.json, the pulse supervisor still ran FROM that repo's directory (viaPULSE_DIRdefault), creating 155+ orphaned "Supervisor Pulse" sessions associated with the wrong project in ~36 hours. Two root causes:PULSE_DIRdefaulted to~/Git/aidevopsin bothpulse-wrapper.sh(line 214) andsetup.sh(launchd/cron env vars). Sessions were filed under that project even withpulse: false.headless-runtime-helper.shclears session ID each cycle to prevent stale conversational context from contaminating dispatch decisions). Each cycle creates a fresh session by design.Fix
The supervisor is a framework-level process, not a project-level one. Using
~/.aidevops/.agent-workspace/as the working directory means pulse sessions are filed under the framework workspace rather than polluting any specific project's session list. Sessions are still created each cycle (by design), but they no longer accumulate under a managed repo.Note for existing installations: Users need to run
aidevops update(which re-runssetup.sh) to regenerate the launchd plist or cron job with the newPULSE_DIRvalue. Until then, the old env var from launchd/cron will override the new default inpulse-wrapper.sh.Closes #5136
Summary by CodeRabbit