fix(posture-check): name the repo in the divergence alert - #229
Merged
Conversation
The registry maps one unix user to several clones (recode-agent owns reCode, reDeploy and reDeFi), so a title keyed only on $user cannot say which checkout drifted. A real reDeFi alert was read as reCode, and the first move on receiving it was three manual git status runs to find the subject. Lead the title with the repo basename and put the absolute path on the first body line -- basenames can collide across agent homes, so the title is for triage and the body for certainty. Same relabel for the repo-missing alert, which had the identical ambiguity. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
robercano
approved these changes
Aug 8, 2026
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.
Problem
/etc/recode-agents.confmaps one unix user to several clones — on the current boxrecode-agentownsreCode,reDeployandreDeFi. The divergence alert titled itself with\$useronly:That name is identical for all three rows, so the title cannot say which checkout drifted, and the body (a
git status --porcelain+git diff --stat) carries no path either.This bit for real: a drift alert for
reDeFiwas read asreCode, and resolving it took three manualgit statusruns across the registry just to identify the subject. A tripwire that can't name its subject costs more than it saves.Change
examples/dedicated-server/bin/posture-check.sh— lead the title with the repo basename and put the absolute path on the first body line:Basename in the title, full path in the body: basenames can collide across agent homes, so the title is for triage and the body for certainty. The
repo missingalert gets the same relabel — it had the identical ambiguity.The fence-coverage alerts in section 2 are deliberately untouched: those are genuinely per-user, not per-repo.
Testing
bash -npasses./etc/recode-agents.conf; all three registry rows now produce distinguishable titles.recode-notificationstopic.Deploying
No
daemon-reloador restart needed.posture-check.serviceisType=oneshotwithExecStart=/usr/local/sbin/posture-check.sh, so systemd re-reads the file from disk each tick — unlike the long-livedpr-loop/claude-rcunits that pin their script in memory (issue #131).Already installed on the current box and verified against the built copy.
Not in scope
PATHS(line 19) is still".claude/scripts self", so drift under.claude/systemd— the units that decide how the loop runs — remains invisible to the tripwire. That gap is real and showed up in the same incident; leaving it for a separate change.🤖 Generated with Claude Code