Skip to content

fix(validate): don't report uninitialized submodules as broken links#47

Open
ernanibmurtinho wants to merge 1 commit into
solanabr:mainfrom
ernanibmurtinho:fix/validate-uninitialized-submodules
Open

fix(validate): don't report uninitialized submodules as broken links#47
ernanibmurtinho wants to merge 1 commit into
solanabr:mainfrom
ernanibmurtinho:fix/validate-uninitialized-submodules

Conversation

@ernanibmurtinho

@ernanibmurtinho ernanibmurtinho commented Jul 8, 2026

Copy link
Copy Markdown

The bug

On any clone that hasn't recursed the 18 ext/ submodules, validate.sh reports 132 failures and exits 1 — even though the config is valid. 114 of those are Broken link -> ext/<sub>/... (links pointing into submodules that aren't checked out) and 18 are ext/<sub> is initialized fails. 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 normal git clone. A validator that cries wolf trains people to ignore it.

Repro

git clone https://github.com/solanabr/solana-ai-kit && cd solana-ai-kit
bash validate.sh    # -> "Results: 87 passed, 132 failed" ; exit 1

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:

  • a link target or ext/<name>/ dir under an empty submodule -> SKIP, not counted toward exit-1
  • a broken link into an initialized submodule -> still FAIL (the drift check that actually has value is fully preserved)
  • the summary prints the skip count + a one-line hint to run 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)

State Before After
Fresh clone, no submodules 132 FAIL, exit 1 0 FAIL, 132 SKIP, exit 0
One submodule initialized its links FAIL its links PASS (check activates)
Real broken link in an initialized submodule FAIL still FAIL, exit 1

Net: green on a valid clone, red only on real breakage — usable outside CI's recursive checkout and trustworthy as a contributor pre-flight.

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.
@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

@ernanibmurtinho is attempting to deploy a commit to the STBR TRUE Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant