Repository navigation
2026-85: feat(procevent): commit other-tool-session-watch detector script - #85
Merged
Merged
Conversation
Record the unchanged executable script that is already armed and operating; this adds version control only.
Ivory2024
added a commit
that referenced
this pull request
Oct 7, 2026
…ript (#85) * feat(procevent): add other-tool-session-watch detector Record the unchanged executable script that is already armed and operating; this adds version control only. * no-mistakes(lint): Suppress SC2009 for intentional ps|grep in session watch script
Ivory2024
added a commit
that referenced
this pull request
Oct 7, 2026
…ript (#85) * feat(procevent): add other-tool-session-watch detector Record the unchanged executable script that is already armed and operating; this adds version control only. * no-mistakes(lint): Suppress SC2009 for intentional ps|grep in session watch script
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.
Intent
bin/fm-other-tool-session-watch.sh는 이전 세션에서 작성되고 이미 arm되어 돌고 있는 스크립트인데 한 번도 커밋이 안 됐다. codex/opencode/agy/cursor-agent/grok/kimi 중 하나의 새 프로세스를 감지해서fm-procevent-when.sh로 자기 자신을 재무장하는 역할이다. 내용 변경 없이 그대로 저장소에 커밋해라 - 이 파일은 firstmate의 공유 트래킹 자료(bin/)라 no-mistakes 경로로 들어가야 한다(direct-PR로 한 번 잘못 올렸다가 "PR must be raised via no-mistakes" CI에 걸려서 닫고 다시 디스패치하는 것).What Changed
bin/fm-other-tool-session-watch.sh, acheck/firescript that scans running processes for a new codex/opencode/agy/cursor-agent/grok/kimi session (excluding itself), tracking seen PID+start-time pairs instate/.other-tool-session-seen.fire, it prints newly detected sessions, records them as seen, then retires and re-arms itself viabin/fm-procevent-when.sh(60s interval, stable 1) so detection keeps running after each trigger.🤖 Generated with Claude Code
Risk Assessment
✅ Low: Pure addition of one already-running, already-armed script with no other changes; matches stated intent of recording it verbatim for shared tracking, only latent issue found is pre-existing and excluded from fix by the no-content-change constraint.
Testing
Drove check/fire end-to-end in an isolated /tmp copy against this machine's real running codex/opencode/agy processes (no synthetic ps data needed, since the live system already has them) and then against a manufactured new 'kimi' process; detection, state persistence, and the retire+arm re-wiring call into fm-procevent-when.sh all behaved correctly. No code change beyond the add-only commit; worktree left clean.
bin/fm-other-tool-session-watch.sh checkexit=0 andfireprinted real running codex/opencode/agy PIDs from this machine, writing them to state/.other-tool-session-seenSTUB fm-procevent-when.sh retire other-tool-sessionthenSTUB fm-procevent-when.sh arm other-tool-session --interval 60 --stable 1 --condition ... check --action ... firecheckafter fire returned exit=1 (no new sessions) while the same codex/opencode/agy processes were still running./kimiprocess;checkflipped to exit=0 andfirereported only the new kimi PID, not the previously-seen sessionsPipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/fm-other-tool-session-watch.sh:16- key = $2" "$3" "$4" "$5 takes only 4 of lstart's 5 space-separated tokens (weekday month day time year), so the year is dropped from the dedup key used in new_sessions(). Same truncation affects the key built at line 26. Pre-existing behavior of the already-armed script; intent explicitly requires committing it unchanged, so fixing this would violate the stated 내용 변경 없이 그대로 constraint.✅ **Test** - passed
✅ No issues found.
bin/fm-other-tool-session-watch.sh checkexit=0 andfireprinted real running codex/opencode/agy PIDs from this machine, writing them to state/.other-tool-session-seenSTUB fm-procevent-when.sh retire other-tool-sessionthenSTUB fm-procevent-when.sh arm other-tool-session --interval 60 --stable 1 --condition ... check --action ... firecheckafter fire returned exit=1 (no new sessions) while the same codex/opencode/agy processes were still running./kimiprocess;checkflipped to exit=0 andfirereported only the new kimi PID, not the previously-seen sessionsbash -n bin/fm-other-tool-session-watch.shmanual run ofcheck/fireagainst a disposable /tmp sandbox copy with a stubbed bin/fm-procevent-when.shmanual spawn of a fakekimiprocess to drive the new-session detection path✅ **Document** - passed
✅ No issues found.
🔧 **Lint** - 1 issue found → auto-fixed ✅
🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Push** - passed
✅ No issues found.