Stop the version check from silently not running - #41
Merged
Conversation
`python scripts/check_version.py` appeared in SKILL.md and seven guides. It cannot run on a bare Homebrew macOS install, which has no `python`, and fails with `command not found` — a non-fatal shell error easily mistaken for noise, leaving the check skipped entirely. `python3` is not the fix: it is absent inside a Windows virtual environment, and on Windows either name can resolve to a Microsoft Store alias stub that opens the Store instead of running the script. No interpreter name is portable, which is the same defect TestInstallCommands already pins for `pip` — an ambiguous name in front of the thing you meant to run. So the guides now name the script by path and tell the caller to use the interpreter that will run idc-index, and to confirm the "meets pinned minimum" line rather than assume the command ran. The idc-index setup snippet repeats the check in Python, where it cannot be skipped or fail to launch: the interpreter that imports idc_index is by construction the one that will query. This matters because the failure it guards is silent. Identifier values are renormalised between releases while the reported data version is not: 0.12.3 and 0.12.5 both serve v24, but spell the Pan-Cancer nuclei segmentations Pan-Cancer-Nuclei-Seg-DICOM and pan_cancer_nuclei_seg_dicom respectively. A query written against the wrong one returns zero rows rather than raising, so it reads as "no such data" instead of "your index is stale". The stale-index output now says that instead of only reporting the version gap. Also bumps the version pins, which 1.8.2 left at 1.8.1. Both agreed with each other, so the existing sync tests passed while every current checkout reported "Skill 1.8.2 available (you have 1.8.1)". They now track the CHANGELOG too. Found reviewing a pull request against IDC-Tutorials: the review ran against a stale 0.12.3, got zero rows, and reported a working notebook as broken. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
The bug
python scripts/check_version.pyappeared inSKILL.mdand seven guides. On a bareHomebrew macOS install there is no
python, so the check fails withcommand not found— a non-fatal shell error, easily read as noise, leaving the version check skipped
entirely.
python3is not the fix: it is absent inside a Windows virtual environment, and onWindows either name can resolve to a Microsoft Store alias stub that opens the Store
instead of running the script. No interpreter name is portable. That is the same defect
TestInstallCommandsalready pins forpip— an ambiguous name in front of the thingyou meant to run — so this extends an existing rule rather than adding a new one.
Why it matters
The failure it guards against is silent. Identifier values are renormalised between
idc-indexreleases while the reported IDC data version is not: 0.12.3 and 0.12.5 bothserve
v24, but spell the Pan-Cancer nuclei segmentationsPan-Cancer-Nuclei-Seg-DICOMand
pan_cancer_nuclei_seg_dicomrespectively. A query written against the wrong onereturns zero rows rather than raising, so it reads as "no such data" instead of "your
index is stale".
get_idc_version()cannot tell them apart — the package version is theonly signal.
Found while reviewing IDC-Tutorials#112:
the review ran against a stale 0.12.3, got zero rows, and reported a working notebook as
broken.
check_version.pywas correctly designed and correctly pinned at 0.12.5 — it wassimply never reached.
The fix
Two layers, because prose alone is skippable:
to use the interpreter that will run
idc-indexand to confirm themeets pinned minimumline rather than assume the command ran.import idc_index. Thisis the part that actually closes the hole: it cannot be skipped and cannot fail to
launch, because the interpreter that imports the package is by construction the one
that will query.
Also here:
version gap, which reads as housekeeping.
idc-indexis "installed and current". 1.8.0demoted this from a standalone CRITICAL — run this FIRST step into the routing list,
where an agent that already has
idc-indexreads it as a satisfied precondition.agreed with each other, so the sync tests passed while every checkout reported
"Skill 1.8.2 available (you have 1.8.1)".
Tests
Two regression tests, both verified to fail when the defect is reintroduced:
TestInterpreterCommands— scansSKILL.md,references/*.mdandscripts/*.pyfor aninterpreter name in front of
scripts/. Deliberately skipsCHANGELOG.md, whosedescriptive mention of the old command would otherwise trip it.
test_skill_version_matches_changelog— pinsSKILL_VERSIONto the newest CHANGELOGheading, the gap that let 1.8.2 ship desynced.
Offline suite green (35 passed). The new Python guard was checked against real installs:
raises on 0.12.3, passes and prints
v24on 0.12.5, and tolerates0.13.0rc1,0.12.5.post1and short1.0.Two things for the maintainer
SKILL.mdis now at exactly 500/500 lines. It was already at 495, andSYNC.md:42records the 500-line cap as a vendoring contract, so I moved the detailed rationale into
references/cli_guide.mdrather than raise it.TestLineBudgetpasses, but there iszero headroom — you may prefer to rebalance something out of
SKILL.md..venvhas idc-index 0.12.2, belowthe pinned 0.12.5, so
tests/test_snippets.pyvalidates against an index two releasesbehind what the skill requires. CI is unaffected —
tests/requirements-test.txtpins0.12.5.
🤖 Generated with Claude Code