Skip to content

feat(tools): add a real typecheck step (bun build does not typecheck) - #1793

Open
xmasyx wants to merge 1 commit into
danielmiessler:mainfrom
xmasyx:feat/typecheck-step
Open

feat(tools): add a real typecheck step (bun build does not typecheck)#1793
xmasyx wants to merge 1 commit into
danielmiessler:mainfrom
xmasyx:feat/typecheck-step

Conversation

@xmasyx

@xmasyx xmasyx commented Aug 7, 2026

Copy link
Copy Markdown

Offered in #1614; you said yes to (1).

bun build bundles without typechecking, so a field that is read but never declared compiles cleanly and stays broken silently.

What it does. bun LIFEOS/TOOLS/Typecheck.ts runs tsc --noEmit over two roots: hooks/ + LIFEOS/TOOLS/, and LIFEOS/PULSE/**. Two passes rather than one wider include, because Pulse resolves against its own node_modules.

The configs are generated and deleted. No file named tsconfig.json ever lands at the install root. Bun reads that name at runtime, and one paths/baseUrl/jsx field in it would move the behaviour of every live hook and of the running Pulse server. The generated configs use a non-standard name and are removed in a finally, so runtime invariance is true by construction rather than by discipline. It also means no installer change: one file, nothing to deploy.

Exclusions are printed loudly. PULSE/Observability/** is a standalone Next.js app with its own deps and deserves its own pass; every run says so. Excluded does not mean healthy, it means not looked at. A missing Pulse dir prints skipped and counts as neither pass nor fail.

Verified both ways: exit 1 against this tree, exit 0 against a clean one, generated configs removed in both cases.

What it finds on current main

Reporting rather than fixing, to keep this PR to one file. Happy to send any of them separately.

Two of the four are ones you have already closed at my report, which is the useful part: the step re-derives them from the code alone, with no issue tracker involved.

Already reported and already fixed in your source — listing them because they are still in the published payload, and because they are what the step catches on a cold checkout:

Not previously reported:

  • LIFEOS/TOOLS/SecretScan.ts:228error.message on unknown; throws on a non-Error throw.
  • LIFEOS/TOOLS/ExtractTranscript.ts and SplitAndTranscribe.ts both import OpenAI from "openai" at top level, and openai is declared in no package.json reachable from LIFEOS/TOOLS/ (only skills/Art/Tools/). Those two fail at runtime on a fresh install, not just here.

Deliberate, and worth a decision rather than a silencer:

bun build bundles without checking types, so a field that is read but never
declared compiles cleanly and stays broken silently. Typecheck.ts runs
tsc --noEmit over two roots: hooks/ + LIFEOS/TOOLS/, and the Pulse server,
which needs its own pass because its dependencies live in its own tree.

The tsconfigs are generated into a non-standard filename and deleted at the
end of the run, so no file named tsconfig.json ever lands at the install
root, where Bun would read it at runtime and a single resolution field
would move live hook and Pulse behaviour.

Requested in danielmiessler#1614.
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