fix(issue): auto startup never invokes stale_crash_lock auto-fix despite fixable:true marker#6244
Conversation
bootstrap now auto-clears stale dead-PID crash lock state before session lock acquisition.
remote session check now clears stale dead-PID lock state instead of leaving it behind.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds startup stale-crash-lock probing/clearing to ChangesStale Crash Lock Auto-Fix in Bootstrap and Remote Session Checks
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
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 docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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 |
🔴 PR Risk Report — CRITICAL
Affected Systems
File Breakdown
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/resources/extensions/gsd/tests/auto-remote-session-lock-cleanup.test.ts`:
- Around line 44-45: The test uses a hard-coded PID (99999) in setWorkerPid
which may be a real process on some systems; replace this with a PID proven to
be dead by probing for ESRCH first: write a small helper in the test that
attempts process.kill(candidatePid, 0) (or equivalent) in a loop until it throws
ESRCH (or use try/catch to detect ESRCH), then call setWorkerPid(workerId,
deadPid) and expireWorker(workerId) using that deadPid; reference the existing
functions setWorkerPid and expireWorker when making the replacement so the test
no longer relies on a possibly live static PID.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 550f01d1-188f-4172-8d7b-ac4c1f923af0
📒 Files selected for processing (4)
src/resources/extensions/gsd/auto-start.tssrc/resources/extensions/gsd/auto.tssrc/resources/extensions/gsd/tests/auto-remote-session-lock-cleanup.test.tssrc/resources/extensions/gsd/tests/start-auto-detached.test.ts
|
🤖 Dispatched Agent prompt (click to expand) |
|
Addressed in commit
Inspected this item and found the actionable part was stale-lock test robustness; I updated the stale PID test to use an ESRCH-proven dead PID and validated the related tests pass. |
|
Addressed in commit
Performed targeted Auto Engine verification for the touched risk areas by running stale-lock cleanup and auto-start/bootstrap guard tests; both suites passed, including checks around startup trigger ordering and safe continuation behavior. |
|
Addressed in commit
Validated the single inline finding and applied a minimal fix in the specified test file only, then ran focused test verification to confirm behavior remains correct. |
|
Tip For best results, initiate chat on the files or code changes.
If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! |
|
🤖 Dispatched Agent prompt (click to expand) |
|
Addressed in commit
Validated the previously acknowledged test-only fix is present in the branch and re-ran the focused stale-lock cleanup test to confirm behavior remains correct. Verification passed cleanly with no additional code changes required. |
Summary
Bugs Addressed
Verification
Related Issue
Repo
gsd-build/gsd-2Branch
issue/5666-auto-startup-never-invokes-stale-crash-l-1778944509Summary by CodeRabbit
Bug Fixes
Tests