Post-change deployment procedures
Detection
Globally linked packages
- Check npm global links: run
npm ls -g --depth=0and look for entries with->pointing to a local path. - If the changed repo matches a globally linked package, proceed to rebuild.
Running services and scheduled tasks
- Check for running processes associated with the repo (service names, PM2/systemd/Windows service entries).
- Check for scheduled tasks (cron, Windows Task Scheduler) referencing the repo.
Rebuild and verify
npm-linked packages
- Run the repo's build command (e.g.,
npm run build,tsc). - Verify the rebuilt output: run the CLI's
--versionor a smoke command. - Report the verified version.
Services and daemons
- Rebuild the service component.
- Restart using the service manager (PM2 restart, systemctl restart, etc.).
- Verify with deterministic evidence:
- New PID (compare before/after).
- Port check (verify listening).
- Service status query.
- Log entry showing updated behavior/version.
- Report the verification evidence.
Completion gate
Do not claim completion until the running instance reflects the changes. Include verification evidence in the final response.