chore: add run.lock/PID freshness diagnostic for the sensor watchdog - #579
Open
essentialbit wants to merge 2 commits into
Open
chore: add run.lock/PID freshness diagnostic for the sensor watchdog#579essentialbit wants to merge 2 commits into
essentialbit wants to merge 2 commits into
Conversation
Formalizes the ad-hoc PID/PPID-matching check repeated by hand while investigating the confirmed-twice bug where run-sensor.sh's own 45-min MAX_RUN_SECS kill loop failed to fire. Read-only, never touches the protected run-sensor.sh itself -- surfaces RUNNING/OVERRUN_NOT_KILLED/ STALE_LOCK/MALFORMED_LOCK/NO_LOCK verdicts from run.lock + watchdog.log + ps. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/check_run_lock_freshness.py, a read-only diagnostic that formalizes the ad-hoc PID/PPID-matching check repeated by hand across cycles while investigating the confirmed-twice bug (2026-08-16) whererun-sensor.sh's own 45-minMAX_RUN_SECSkill loop failed to fire.run.lock+watchdog.log+ps -o etime=— never touchesrun-sensor.shitself (protected, user-fix-only per project standing policy).RUNNING,OVERRUN_PENDING,OVERRUN_NOT_KILLED(the bug signature),STALE_LOCK(orphaned lock, dead pid),MALFORMED_LOCK,NO_LOCK.Test plan
python3 -c "import ast; ast.parse(...)"— syntax check passesrun.lock— correctly reportedRUNNING, elapsed matchedpsLOCKpath) coveringSTALE_LOCK,MALFORMED_LOCK,NO_LOCKpaths — all verdicts correctfrom main import *still imports cleanly (no shared code touched)Self-directed tooling addition (empty eligible backlog + no conflicting PRs this cycle) — no consensus/outcome-recording needed per project policy for this PR class.
🤖 Generated with Claude Code