Repository navigation
fix(pm-stack): restart ready-for-agent only on change - #4190
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 8 minutes. View limit details
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 95addedd46
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| else | ||
| echo "no package or unit changes detected; leaving ready-for-agent.service running" | ||
| service_action="unchanged" |
There was a problem hiding this comment.
Preserve pending restarts across failed installation attempts
If an active service is upgraded by install.sh clone but the subsequent Git clone/fetch fails, npm has already installed the pinned version while the old process remains running. On the next invocation, both on-disk comparisons match, so this branch skips the restart and reports the pinned version as running even though the old process still serves requests. This is reproducible with the stubbed harness by failing Git after npm succeeds; the retry succeeds without changing the service PID. Preserve a pending-restart marker until deployment completes, or otherwise verify that the running process corresponds to the installed package before taking the no-op path.
Useful? React with 👍 / 👎.
Summary
Adds an isolated stubbed-systemctl regression harness for package changes, unit changes, no-change reruns, inactive services, and first install.
Fixes #2513
Evidence
bash pm-stack/ready-for-agent/test-install.sh— all five scenarios pass.bash -n pm-stack/ready-for-agent/install.sh pm-stack/ready-for-agent/test-install.sh— passshellcheck pm-stack/ready-for-agent/install.sh pm-stack/ready-for-agent/test-install.sh— passgit diff --check— passMerge Danger
Door: two-way
Blast Radius: low — one installer and its isolated test harness.
Need help on this PR? Tag
@codesmith-botwith what you need.