Repository navigation
fix: stop status calling a working interpreter dead (1.0.6) - #12
Merged
Merged
Conversation
The probe prints its version on stdout and `parse_version` read the whole stream, so anything printed ahead of it shifted the tokens it wanted. A `sitecustomize` or a conda activation banner was enough to make a healthy Python 3.13 parse as no version at all, and `/claude-bionify:status` then announced that nothing was being bolded on a machine where it was. Read the last line instead. Confirmed on Linux and on Windows 11. Two smaller holes in the same path, both previously swallowed by the blanket handler in `control.py` and so invisible rather than fatal: `declared()` raised AttributeError on a hooks.json that was a JSON list, or that had non-dict groups or entries. Shape checks now yield no candidates instead, which is what every caller already expects. An unreadable hooks.json left status silent, which is the same failure class 1.0.5 set out to remove. It now says the configuration could not be read. Status still never raises and still exits 0. Claude-Session: https://claude.ai/code/session_011ZEJcomZuou2T23FGSBmdd
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.
Follow-up to #11. No user report; found by auditing what 1.0.5 shipped.
1.0.5 taught
/claude-bionify:statusto warn when the hook cannot start. It gets thatbackwards on some machines: it warns that nothing is being bolded when bolding works fine.
Cause
The probe runs
python -c "print(sys.version_info[0], sys.version_info[1])"andparse_versionread the whole stdout stream, taking the first two tokens. Anything printedahead of the probe's own line shifts them:
3 13(3, 13)conda banner\n3 13NoneA
sitecustomize.pythat prints, a conda activation banner, or a corporate wrapper is enough.starts()then returns False for a healthy interpreter and status announces the opposite ofthe truth. This is the inverse of the bug 1.0.5 fixed, introduced by the fix for it.
Fix
Read the last line the probe prints, not the whole stream.
Two smaller holes on the same path, both previously swallowed by the blanket handler in
control.pyand so silent rather than fatal:declared()raisedAttributeErroron ahooks.jsonthat was a JSON list, or that hadnon-dict groups or entries. Shape checks now yield no candidates.
hooks.jsonleft status silent, which is the failure class 1.0.5 set out toremove. It now says the configuration could not be read.
Status still never raises and still exits 0.
Verification
Windows 11 VM with python.org Python, so
python3is the Store stub andpyis real:python3(Store stub)py -3**alp**ha **bra**vohooks.jsonhooks.jsonas a listTest plan
claude plugin validate --strict, ruff clean