Repository navigation
feat: add config-health — runtime config integrity monitoring #2496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2f454e7
72bfc70
b3e3238
fc22fc2
a10cb91
80ca83b
ab66f9f
fb1b5c0
f36e5d5
e83576f
95bf86c
76398ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "hooks": { | ||
| "SessionStart": [ | ||
| { | ||
| "id": "config-health:session-start", | ||
| "matcher": ".*", | ||
| "hooks": [ | ||
| { | ||
| "type": "command", | ||
| "command": "python3 \"${CLAUDE_PLUGIN_ROOT}/scripts/config-health.py\" --startup", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If the install directory contains shell expansion characters, this command can point Python at the wrong script. ArtifactsFull executed reproduction script — local collector file
Hook output with python3 available — local collector file
Hook output with only python available — local collector file
Executable path-expansion reproduction
Direct invocation control with literal dollar-client path
Generated startup command with literal dollar-client path
Complete reproduction run and assertions
Prompt To Fix With AIThis is a comment left during a code review.
Path: manifests/install-assets/config-health-hooks.json
Line: 10
Comment:
**Install paths change at startup**
If the install directory contains shell expansion characters, this command can point Python at the wrong script. `materializeManagedHooks` inserts the root unchanged inside double quotes, which still allow expansion. In an executed fixture with a literal `install-$client` directory and `client` unset, the generated command tried to open `install-/scripts/config-health.py` and exited 2 instead of running the existing monitor. Direct invocation of the same installed script succeeded. Encode the root or escape it for the shell before inserting it.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly. |
||
| "timeout": 10 | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a host exposes Python 3 only as
python, this new SessionStart command cannot launch the monitor because it hardcodespython3. Installation can succeed, but ordinary sessions get a startup error instead of configuration checks. Executing the materialized command with only a workingpythonon PATH failed before the monitor ran; invoking the same installed script throughpythonsuccessfully reported the seeded configuration problem. Resolve an available Python 3 interpreter or provide a version-checked fallback.Artifacts
Full executed reproduction script — local collector file
Hook output with python3 available — local collector file
Hook output with only python available — local collector file
Executable path-expansion reproduction
Direct invocation control with literal dollar-client path
Generated startup command with literal dollar-client path
Complete reproduction run and assertions
Prompt To Fix With AI