fix(validate): don't report uninitialized submodules as broken links#47
Open
ernanibmurtinho wants to merge 1 commit into
Open
Conversation
validate.sh counted links into not-yet-checked-out ext/ submodules as "Broken link" failures, so a normal 'git clone' + 'bash validate.sh' reported 132 failures and exit 1 on a valid repo. CI never caught it because CI checks out with submodules: recursive. Add a SKIP state for checks that depend on an uninitialized submodule: - links/dirs under an EMPTY ext/ submodule -> SKIP (not counted as FAIL) - a broken link into an INITIALIZED submodule -> still FAIL (drift check preserved) - summary reports the skip count + a hint to run 'git submodule update --init --recursive' (or ./install.sh) Additive, one file; no behavior change for the recursed (CI) case.
|
@ernanibmurtinho is attempting to deploy a commit to the STBR TRUE Team on Vercel. A member of the Team first needs to authorize it. |
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
On any clone that hasn't recursed the 18
ext/submodules,validate.shreports 132 failures and exits 1 — even though the config is valid. 114 of those areBroken link -> ext/<sub>/...(links pointing into submodules that aren't checked out) and 18 areext/<sub> is initializedfails. The validator can't distinguish submodule not initialized yet (a normal setup state) from config genuinely broken (a real error), so it fails loudly on a good repo.CI never catches this because CI checks out with
submodules: recursive. The people who hit it are contributors and users running the kit's own validator after a normalgit clone. A validator that cries wolf trains people to ignore it.Repro
Proof it's a false positive:
git submodule update --init .claude/skills/ext/solana-dev, then re-run — every one of that submodule's "broken" links now resolves.The fix
A third state — SKIP — for checks that depend on an uninitialized submodule:
ext/<name>/dir under an empty submodule ->SKIP, not counted toward exit-1FAIL(the drift check that actually has value is fully preserved)git submodule update --init --recursive(or./install.sh)Additive, one file, no behavior change for the recursed (CI) case — CI stays green.
Verified (three states)
Net: green on a valid clone, red only on real breakage — usable outside CI's recursive checkout and trustworthy as a contributor pre-flight.