feat(tools): add a real typecheck step (bun build does not typecheck) - #1793
Open
xmasyx wants to merge 1 commit into
Open
feat(tools): add a real typecheck step (bun build does not typecheck)#1793xmasyx wants to merge 1 commit into
xmasyx wants to merge 1 commit into
Conversation
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.
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.
Offered in #1614; you said yes to (1).
bun buildbundles without typechecking, so a field that is read but never declared compiles cleanly and stays broken silently.What it does.
bun LIFEOS/TOOLS/Typecheck.tsrunstsc --noEmitover two roots:hooks/+LIFEOS/TOOLS/, andLIFEOS/PULSE/**. Two passes rather than one widerinclude, because Pulse resolves against its ownnode_modules.The configs are generated and deleted. No file named
tsconfig.jsonever lands at the install root. Bun reads that name at runtime, and onepaths/baseUrl/jsxfield 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 afinally, 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 printsskippedand 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
mainReporting 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:
hooks/ISACloseGate.hook.ts:59—.filter(unitIsClaimable)hands the array index to the optional second parameter. Filed as ISACloseGate passes unitIsClaimable to .filter(), so its opts parameter receives the array index #1766, closed 6 Aug.LIFEOS/PULSE/modules/hooks.ts:142— the returned object is missingstats, which its own declared type requires. Filed as hooksHealth() returns a flattened object that does not match its declared { status, stats } type #1765, closed 6 Aug.Not previously reported:
LIFEOS/TOOLS/SecretScan.ts:228—error.messageonunknown; throws on a non-Error throw.LIFEOS/TOOLS/ExtractTranscript.tsandSplitAndTranscribe.tsbothimport OpenAI from "openai"at top level, andopenaiis declared in no package.json reachable fromLIFEOS/TOOLS/(onlyskills/Art/Tools/). Those two fail at runtime on a fresh install, not just here.Deliberate, and worth a decision rather than a silencer:
LearningPatternSynthesis.ts:632→../../test/lib/hook-replay, andpulse.ts:146→./Assistant/module. Both are optional imports guarded byexistsSyncwith a comment saying so (Pulse Assistant tab has no backend: pulse.ts imports missing ./Assistant/module, plus /da vs /assistant naming drift #1419). Correct code that simply cannot resolve in the public payload. If you want this green as a gate, those two need ambient declarations or an explicit allowlist. I left the call to you rather than shipping a suppression mechanism.