fix: Store session handle before manifest write in handle_resume#106
fix: Store session handle before manifest write in handle_resume#1062witstudios wants to merge 1 commit intomainfrom
Conversation
handle_spawn correctly stores the session handle BEFORE writing the manifest because ManifestWatcher in Swift fires on manifest write and immediately tries to attach. handle_resume had this ordering reversed, creating a race where the Swift app would try to attach before the session existed in the map. Also fixes the rollback path to remove the session from the map on manifest update failure, matching the pattern in handle_spawn. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ 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 |
Summary
handle_resume: The session handle was stored in the session map AFTER writing the manifest, buthandle_spawnexplicitly stores it BEFORE (with a comment explaining why). The Swift app'sManifestWatcherfires on manifest write and immediately tries to attach — if the session handle isn't in the map yet, the attach fails silently.handlevariable that had already been moved. The new code properly removes the session from the map and kills it, matchinghandle_spawn's rollback pattern.Test plan
cargo checkpassescargo test)🤖 Generated with Claude Code