Repository navigation
Consolidate root scripts into one check runner and unify dependency pins (CL-7442) - #642
Merged
Merged
Conversation
Cover the runner excluding itself by resolved real path (a rename, a symlink) rather than by filename, and a discovered-checks roster kept in sync with an explicit expected list. Cover catalog-pins reading named catalogs (catalog:<name>), workspaces.catalog/workspaces.catalogs, and excluding vendor/intx manifests from workspace discovery.
…ype parse (CL-7442) The runner now excludes itself by resolved real path instead of by filename, so a rename or a symlink is still recognized as the runner. web-tailwind-utilities gains the same import.meta.main guard as every other check, so the runner discovers it instead of it running eagerly on import. catalog-pins now reads workspaces.catalog/workspaces.catalogs alongside the top-level catalog/catalogs fields, accepts catalog:<name> for named catalogs, parses package.json through an arktype schema instead of an `as` cast, and excludes vendor/intx/*/package.json from workspace discovery — those manifests are governed by VENDORED.md, not this repo's catalog.
TheGreatAxios
force-pushed
the
cl-7442-scripts-deps
branch
from
September 5, 2026 01:14
8b82b76 to
0dbb6b7
Compare
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.
Fixes CL-7442
What changed
One check runner.
check:structuralwas a hand-maintained chain of 18bun run check:Xinvocations plus 23 separate rootpackage.jsonscripts.scripts/checks/run.tsnow discovers everyscripts/checks/*.tsfile withan
import.meta.mainentry point (the same signal each check already usedto run standalone) and runs it, plus
generate-tsconfig-references.ts --check(named explicitly — it lives outsidescripts/checks/because itdoubles as the reference generator).
check:packages(packed-consumptionaudit) stays discoverable and independently runnable but is excluded from
the full run — it spawns a subprocess per workspace package and takes
minutes; it was never part of the full
check:structuralchain before thischange either (it lived under the now-removed
check:all), so thispreserves prior behavior rather than regressing CI wall-clock.
Run one check on its own:
bun run check:structural report-error. Forwardflags:
bun run check:structural report-error -- --write-baseline.CI's
structuraljob already invoked exactlybun run check:structural(see
scripts/ci-jobs.test.ts's "same list" assertion) — no CI or docsdrift possible now, since there's only one script to invoke.
Root script list, before → after (36 → 14):
Before (36): check, check:all, typecheck, lint, format, hooks:install,
prepare, build, test, test:e2e, dev, setup, setup:memory, reset,
check:structural, check:deletion, check:report-error, check:error-envelope,
check:killdates, check:packages, check:licenses, check:db-gate,
check:no-product-tenancy, check:browser-safe-subpaths, check:web-utilities,
check:tailwind-source, check:ui-vocabulary, check:react-ui-drift,
check:react-ui-pin, check:tool-package-pins, check:tool-package-freshness,
check:hub-git-safety, check:routine-target-inference,
check:tsconfig-references, build:sidecar-image, eval
After (14): check, typecheck, lint, format, hooks:install, prepare, build,
test, test:e2e, dev, setup, setup:memory, reset, check:structural,
build:sidecar-image, eval
check:allis gone too — nothing referenced it, and foldingcheck:packagesinto the runner (as an individually-invocable, opt-out-offull-run check) makes it redundant.
check:routine-target-inference: kept.apps/webandpackages/chat-uistill exist and the guarded pattern(
agents[0]?.definitionId) still appears live inpackages/chat-ui/src/composer.tsx— routines are not deleted, so thesubject this check guards is still live.
check:tool-package-pins/check:tool-package-freshness: kept as-is.CL-7402 has not landed (no matching commit on
origin/main), andworkflows/*— the subject both checks scan — still exists.Catalog. Added a
check:catalog-pinscheck (discovered by the samerunner) that fails when a dependency declared in the root
catalogispinned as a literal elsewhere instead of
catalog:. Fixed every drift itfound:
drizzle-orm—apps/hubpinned0.45.2literally; catalog said^0.45.1. Catalog bumped to^0.45.2;apps/hubnow usescatalog:.hono— 23 workspaces pinned^4.11.9literally instead ofcatalog:(root
overridesstill forces the resolved version to4.13.3, unaffected).postgres—apps/hubpinned^3.4.8literally; nowcatalog:.@types/react-dom— never catalogued; 9 workspaces split between^19.2.1and^19.2.2. Added to the catalog at^19.2.2; all 9 now usecatalog:.better-auth— not called out in the ticket's scan, but the samedrift class:
apps/hubpinned^1.4.18literally against a catalogentry of
^1.4.18. Nowcatalog:too (found by running the new checkagainst the real tree).
The 21 single-workspace dependencies — ruling
Recomputed on
origin/mainincluding the rootpackage.jsonas aworkspace for this purpose (root tooling deps are single-consumer by
construction): 22 external (non-
@corbits/@intx/@workbench)dependencies used by exactly one
package.json.@eslint/jseslintjitiprettierpuppeteer-corescripts/e2e/browser/walkthrough.tstypescript-eslint@logtape/logtapepackages/error-sink@phosphor-icons/reactpackages/icons@radix-ui/react-dialogapps/web@radix-ui/react-slotapps/web@tailwindcss/viteapps/web@vitejs/plugin-reactapps/webviteapps/webtailwindcssapps/websonnerapps/webapps/web/src/app.cssstyles its[data-sonner-*]DOM directly, andapps/web/test/react-ui-toast-mock.tsmocks it; not unusedbetter-authapps/hubcatalog:— auth library, plausible second consumer laterchat(npm package literally namedchat)packages/slack-tagimport type { StateAdapter } from "chat"indispatch.tsandthread-state.tscorbits-tagpackages/slack-tagcronstruepackages/workflowse2bpackages/e2b-sandbox-sidecartarpackages/tool-registry-publishcatalog:y-protocolspackages/presenceNo removals: every single-workspace dependency checked out as either
build/lint tooling that is inherently root-only, or a package's own reason
to exist. None were unused.
Fixed while touching this
scripts/checks/run.tsinitially discovered itself (run.tshas animport.meta.mainentry point) as a check, spawning an unboundedself-recursion the first time the full runner executed. Fixed by excluding
the runner by its resolved real path (
realpathSync), not its filename, soa rename or a symlink pointing at
run.tsis still recognized as therunner rather than slipping in as a discovered check — with regression
tests covering both cases (
scripts/checks/test/run.test.ts).web-tailwind-utilities.tsran itsmain()eagerly on import instead ofgating it behind
if (import.meta.main), so the runner never discovered itas a standalone check. Gave it the same entry-point guard as every other
check.
Added
scripts/checks/test/run.test.ts's explicitEXPECTED_CHECK_NAMESroster: the discovered-checks set is asserted equal to it, so a check
gaining or losing its
import.meta.mainentry point fails this test loudlyinstead of silently changing what CI runs.
catalog-pinsnow also readsworkspaces.catalog/workspaces.catalogs(bun accepts both root-level and
workspaces-nested catalog fields),accepts
catalog:<name>for a named catalog, parses eachpackage.jsonthrough an arktype schema instead of an
as PackageJsoncast, and excludesvendor/intx/*/package.jsonfrom workspace discovery — vendored manifestsare governed by
VENDORED.md, not this repo's catalog.Cleared several stale
bun run check:<name>references left over from thepre-consolidation script list (
packages/inbox/README.md,packages/inbox/src/client.ts,IMPLEMENTATION.md,docs/revendor-inventory.md,docs/workflow-model.md,scripts/generate-tsconfig-references.ts,VENDORED.md'scheck:killdatescells) and alignedscripts/checks/report-error.tsandits baseline header with
AGENTS.md'sbun run check:structural <name>phrasing.
AGENTS.mdnow states explicitly thatcheck:<name>in prosemeans
bun run check:structural <name>.Verified
bun run check:structural— all checks pass (ran to completion locally,including
catalog-pinswith the vendor/intx exclusion note).bun run typecheck— passes.bun run lint— passes (8 pre-existing unrelated warnings, 0 errors).bun test scripts/run-all.test.ts scripts/ci-jobs.test.ts— passes.bun installfrom the touched lockfile — resolves cleanly,bun.lockdiff is limited to the catalog/pin changes above.
Test plan
bun run check:structuralbun run typecheckbun run lintbun test scripts/checks/test scripts/run-all.test.ts scripts/ci-jobs.test.tsbun installwith no unintended lockfile drift