Conversation
|
Reporter of #394 here — verified: the ensure hooks now mirror Two notes:
Branch is based on v0.1.59; |
|
@NyxSpecter4 thanks for the review. Pushed both fixes:\n\n1. The shell test now runs the hook from |
6670848 to
7cd3668
Compare
NyxSpecter4
left a comment
There was a problem hiding this comment.
As the reporter of #394, I took another look at the updated head (7cd3668):
- Shell regression test — ran
tests/ensure-monk-agent-kill-stale-pid.shon Ubuntu (sh= dash): passed. Stale process killed, replacement recorded in the PID file and running. Thefake_bincwd fix resolves the harness issue I flagged. - PowerShell — code review only, since I have no Windows runner here:
Stop-StaleAgentnow falls back to$OldProcess.ProcessName -like 'monk-agent*'when the OS provides no process path, matching the POSIX side'scomm=guard. A bare PID is never killed. I could not execute the.ps1test in this environment, so that one remains unverified by me. - Rebase — branch is based on
v0.1.60(8d8efce); the diff is exactly the four hook/test files (356 insertions, no unrelated changes).
Both notes from my earlier review are addressed, and the PID-reuse guard is preserved on both platforms. Approving from the reporter's side — merging is of course up to the maintainers. Thanks for the quick turnaround on both points.
|
Both fixes verified: Ran |
NyxSpecter4
left a comment
There was a problem hiding this comment.
Approving: both requested fixes verified in code; tests/ensure-monk-agent-kill-stale-pid.sh run on Linux/dash -> exit 0, "stale PID kill test passed". Note: .ps1 regression statically reviewed only (no pwsh available here); Stop-StaleAgent path-match + name-fallback logic is sound.
7cd3668 to
3b2b54f
Compare
3b2b54f to
70bee9a
Compare
70bee9a to
9f0fc2f
Compare
Closes #394
The PreInvocation ensure hooks (
.antigravity-plugin/hooks/ensure-monk-agent.ps1and.sh) now kill a stalemonk-agentprocess recorded in their PID file before spawning a replacement, matching the cleanup already performed byscripts/start-monk-agent.{ps1,sh}.Stop-StaleAgentand calls it after the PID file path is resolved.stop_stale_agentand calls it before starting the binary.