Skip to content

fix: stop status calling a working interpreter dead (1.0.6) - #12

Merged
abullard1 merged 2 commits into
mainfrom
fix/probe-false-alarm-1.0.6
Aug 17, 2026
Merged

abullard1 merged 2 commits into
mainfrom
fix/probe-false-alarm-1.0.6

Conversation

@abullard1

Copy link
Copy Markdown
Owner

Follow-up to #11. No user report; found by auditing what 1.0.5 shipped.

1.0.5 taught /claude-bionify:status to warn when the hook cannot start. It gets that
backwards 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])" and
parse_version read the whole stdout stream, taking the first two tokens. Anything printed
ahead of the probe's own line shifts them:

stdout parsed
3 13 (3, 13)
conda banner\n3 13 None

A sitecustomize.py that prints, a conda activation banner, or a corporate wrapper is enough.
starts() then returns False for a healthy interpreter and status announces the opposite of
the 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.py and so silent 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.
  • An unreadable hooks.json left status silent, which is the 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.

Verification

Windows 11 VM with python.org Python, so python3 is the Store stub and py is real:

Check Before After
Healthy interpreter that prints a banner reported dead reported working
python3 (Store stub) rejected rejected
py -3 accepted accepted
Hook end to end **alp**ha **bra**vo unchanged
Corrupt hooks.json silent warns
hooks.json as a list silent warns

Test plan

  • 127 passed, 2 skipped, 93.6% coverage (gate 80%)
  • Each of the three fixes fails a named test when reverted
  • Verified on Windows 11 and on Linux
  • claude plugin validate --strict, ruff clean

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
Copilot AI lite review requested due to automatic review settings August 17, 2026 07:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@abullard1
abullard1 merged commit 4c44155 into main Aug 17, 2026
7 checks passed
@abullard1
abullard1 deleted the fix/probe-false-alarm-1.0.6 branch August 17, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants