ci(guards): make every scripts/check-*.ts prove it actually runs - #9945
Conversation
Refs #9860 (item 3). Found by writing the checker: `test:ci` called `npm run publishable-deps:check` and no such npm script existed. So the documented one-command local gate -- CLAUDE.md's own non-negotiable -- died with "Missing script", and check-publishable-deps.ts had never run despite being correct and passing. Both are fixed here: the script is defined, and the guard below catches the class. A checker that is wired into nothing guards nothing while looking exactly like a guard, which is worse than not writing it, because its presence in the tree reads as coverage. Per #9860's bar, this computes the fact rather than remembering it. It does not hold a list of wired checkers; it resolves where each one runs, from the three places a checker can legitimately live: transitively reachable from test:ci, referenced by a workflow, or imported by a sibling script as a shared module. Anything in none of the three fails with the specific fix. Two entries are allowlisted with reasons -- both need a token and a network the local gate does not assume. It also verifies test:ci references no npm script that does not exist, which is the specific hole that hid the missing one above. Two false positives were fixed while building it, both of which would have reported correctly-wired checkers as dead: npm lifecycle hooks (a checker wired as `pretest` is never named by any `npm run`), and `--workspace` invocations (which resolve against the workspace, not the root).
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-30 19:40:04 UTC
Review summary Nits — 5 non-blocking
Concerns raised — review before merging
📋 Copy for AI agents — paste into your coding agentDecision drivers
Context & advisory signals — never blocks the verdict
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. Decision record
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
loopover-ui | c39228f | Commit Preview URL Branch Preview URL |
Jul 30 2026, 07:16 PM |
Bundle ReportBundle size has no change ✅ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9945 +/- ##
=======================================
Coverage 91.87% 91.87%
=======================================
Files 928 928
Lines 113657 113657
Branches 27406 27406
=======================================
Hits 104427 104427
Misses 7931 7931
Partials 1299 1299
Flags with carried forward coverage won't be shown. Click here to find out more. |
Refs #9860 (item 3). One item, per that issue's own "not one big PR".
What writing this found
test:cicallednpm run publishable-deps:check— and no such npm script existed.Two consequences, both live on
maintoday:npm run test:ci, the documented one-command local gate and CLAUDE.md's own non-negotiable feat(scoring): add situational score projections #3, dies withMissing script. Anyone following the contributor skill hits it.scripts/check-publishable-deps.tshas never run, despite being correct and passing when invoked directly.That is precisely #9860's thesis — a hand-maintained ~50-command chain that nobody re-derives — so the missing script is defined here and the class is now guarded.
The guard
A checker wired into nothing guards nothing while looking exactly like a guard. That is worse than not writing it, because its presence in the tree reads as coverage.
Per #9860's bar (compute the fact, don't remember it),
check-checkers-wired.tsholds no list of wired checkers. It resolves where each one actually runs, from the three places a checker can legitimately live:test:ci(through aggregate scripts, and through npm lifecycle hooks)Anything in none of the three fails, with the specific fix in the message. It also verifies
test:cireferences no npm script that does not exist — the exact hole that hid the missing one above.ALLOWED_UNWIREDhas two entries, each with a reason:check-changelog.ts(needs a release-please branch the local gate never produces) andcheck-roadmap-issue-drift.ts(reads live GitHub issues, so it needs a token and network). Everything else is detected, never listed.Two false positives fixed while building it
Both would have reported correctly-wired checkers as dead, and a checker that cries wolf gets muted:
check-node-version.tsis wired aspretest/preui:test. Nothing ever saysnpm run pretest; npm runs it aroundtest.--workspaceinvocations —npm run build --workspace @loopover/engineresolves against the workspace, so reading it as a root reference both misses the target and reports a phantom missing rootbuild.Starting point was 11 apparently-unwired checkers; after resolving real homes, 5 were genuinely suspect and exactly 1 (
check-publishable-deps.ts) was truly dead.Validation
checkers-wired:check,publishable-deps:check,import-specifiers:check,dead-source-files:check,turbo-inputs:check,coverage-boltons:check,docs:drift-check,typecheckall pass.dead-exports:checkfails on this branch for a pre-existing reason onmain, not from this change — two unreferenced exports my merged #9938 introduced. Fixed separately in #9944, which should land first.