Skip to content

build: enable the remaining house gritlint packs (zero findings) - #23

Merged
ryanleecode merged 3 commits into
mainfrom
chore-gritlint-clean
Nov 25, 2026
Merged

ryanleecode merged 3 commits into
mainfrom
chore-gritlint-clean

Conversation

@systemfsoftware-bot

@systemfsoftware-bot systemfsoftware-bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What

Closes the gap left by #21: the house packs that were measured but not enabled are now enabled and clean.

gritlint check . exits 0 over 1,290 files with:

pack before now
ts-extensions 2,314 findings 0
tsconfig-roles 32 findings 0
typecheck-build-mode 1 finding 0
build-output-imports, cell-architecture, npm-provenance clean clean

ts-extensions

2,376 relative specifiers lose their .ts/.tsx/.mts extension across 609 files; the two allowImportingTsExtensions overrides are removed.

Three entrypoints are executed directly by a child process in tests and benchmarks. Bundler resolution handles extensionless specifiers, plain node does not, so those entries are bundled with esbuild before the child runs. This also removed a parse blocker in the benchmark worker ((typeof this.calls)[number] as an annotation), now a named BenchCall type.

tsconfig-roles and typecheck-build-mode

The 20 gated projects are solution roots (files: [], no include) with composite role configs, and every typecheck script is tsc -b. Before, the gate ran tsrs --noEmit -p tsconfig.json; a solution root would have made that check nothing, which is exactly what typecheck-build-mode exists to catch.

directory typecheck
13 packages, 5 tooling, scripts, examples/cold-start tsc -b
root tsc -b
docs astro sync && tsc -b --dry && tsrs --noEmit -p tsconfig.app.json
4 example workspaces the old gate never typechecked role configs only, no solution root

The four examples (browser-speed, sandbox, travel-planner, durable-bench) keep role configs but no solution root, the shape the pack documents as not judged. Their source predates this change with type and declaration-emit errors a composite build would surface, including a vendored benchmark tree with uninstalled dependencies; making them composite is a separate body of work, not a gate that silently checks nothing.

Fallout the split exposed, fixed rather than suppressed

  • scripts/ referenced effect-agent sources by path; it now references the project.
  • Package test projects include the shared test/fixtures files they import.
  • packages/platform-cloudflare/examples/scheduling.ts relied on a test file elsewhere in the program to merge THREADS/SCHEDULES into the global worker Env; it now declares the bindings it reads.
  • Worker code that evaluates DOM callbacks (browser-run-worker-proof) opts the DOM lib in per file instead of mixing it into the runtime role's lib.
  • Three browser files reference vite/client explicitly, replacing types a directory tsconfig used to supply.

Verification

command result
gritlint check . (six packs) exit 0, zero findings
tsc -b (20 gated projects) pass
tsc -b --dry docs pass
tsc -b tooling/browser-run-worker-proof pass
pnpm lint 0 warnings, 0 errors
vitest run on the suites the bundling change touches (crash, scheduling-crash, thread-transfer, background-workers) pass

Every enabled house pack is clean after this change: `gritlint check .`
reports zero findings over 1,290 files with `build-output-imports`,
`cell-architecture`, `npm-provenance`, `ts-extensions`, `tsconfig-roles`
and `typecheck-build-mode` enabled.

ts-extensions

2,376 relative specifiers lose their `.ts`/`.tsx`/`.mts` extension across
609 files, and the two `allowImportingTsExtensions` overrides are gone.
The repository already resolves extensionless specifiers through bundler
resolution, but a child process running TypeScript directly does not, so
the three process-killed test and benchmark entrypoints are bundled with
esbuild first.

tsconfig-roles and typecheck-build-mode

The 20 gated projects are solution roots (`files: []`, no `include`) whose
role configs (`tsconfig.app.json`, `tsconfig.test.json`,
`tsconfig.node.json`) are composite, and every `typecheck` script is
`tsc -b`. The gate now follows project references instead of invoking a
non-build `tsc` that checks nothing. The four example workspaces the
previous gate never typechecked keep role configs without a solution root,
the shape the pack documents as unhoused rather than inert.

Fallout the split exposed, fixed rather than suppressed:

- `scripts/` references the effect-agent project instead of reaching into
  its sources
- package test projects include the shared `test/fixtures` files they import
- platform-cloudflare's scheduling example declares the worker bindings it
  reads instead of relying on a test file elsewhere in the program to merge
  them into the global `Env`
- worker code that evaluates DOM callbacks opts the DOM lib in per file
  instead of mixing it into the runtime role's `lib`
- three browser files reference `vite/client` explicitly, replacing the
  type information a directory tsconfig used to provide

Verification: `tsc -b` passes for all 20 gated projects; `gritlint check .`
exits 0.
tsdown resolved `tsconfig.json` by default. That file is now a solution root
with `files: []`, so rolldown-plugin-dts ran tsgo over no input and every
package failed with `tsgo did not generate dts file`.

Each package now has a `tsconfig.build.json` that extends its app role,
clears `composite`/`emitDeclarationOnly`, keeps `noEmit`, and includes only
`src`. `tsdown` reads it explicitly. `tsconfig.build.json` is one of the
role names the pack allows and it is not referenced, so `tsc -b` ignores it.

Verified locally: `pnpm build` builds all 13 packages, the docs site and the
action, and `gritlint check .` still exits 0.
`source-resolution` is the last house pack, and it sat behind five
parameters because it names a conditions-based resolution contract. This
repository resolves workspace packages to source by exporting `src/`
paths directly, so the condition is additive: nothing in the tree declares
`@systemfsoftware/source`, and adding it changes no resolution today. It
makes the contract explicit for the next step that does declare it.

- `tsconfig.base.json` and `docs/tsconfig.app.json` list the source
  condition in `customConditions`.
- All eight `vitest.config.ts` files set it on both pipelines,
  `resolve.conditions` and `ssr.resolve.conditions`, with Vite's own
  defaults listed back in because setting the key replaces them.
- `packages/ui` publishes a dist-only `publishConfig.exports` map.
- `packages/pr-review-action` drops its unused `tsdown.config.ts`; the
  action is bundled by `scripts/build-action.ts`, so that config produced
  nothing but a publish map for artifacts that are never built.

All seven packs are enabled in `gritlint.json`: `gritlint check .` exits 0
over 1,303 files.
@ryanleecode
ryanleecode merged commit 673f18d into main Nov 25, 2026
6 checks passed
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.

2 participants