Feat/check cli#417
Merged
Merged
Conversation
Add the workspace dependency and tsconfig project reference so the cli package can call the nominal type-checker (checkProgram/checkCalls/ checkReturns) from @kernlang/check. Co-Authored-By: kern-agon <kern-agon@users.noreply.github.com>
`kern check [path]` runs the @kernlang/check nominal type-checker (declaration / call / return rules) over a file or directory, with an opt-in --with-semantics pass for @kernlang/core semantic validation. - Stable JSON contract (schemaVersion 1.0) under --json; ESLint-style grouped human output otherwise; --quiet prints only the summary. - Report-and-continue on parse errors: a bad file is excluded from type-checking but every other file still runs. - Deterministic diagnostic sort (file, category, rule, message). - Pure exitCodeFor(summary, strict): errors -> 1; warnings only -> 0 unless --strict; operational failures (bad path/flag) -> 2. - Discovery mirrors self-coverage SKIP_DIRS and drops *.kern directories (the repo has a .kern/ config dir) so the per-file read never hits EISDIR. Co-Authored-By: kern-agon <kern-agon@users.noreply.github.com>
Locks the schemaVersion 1.0 JSON shape, exit-code matrix (clean/0, return-violation/1, warnings+strict/1, operational/2), parse-failure continuation, build/ discovery filtering, opt-in --with-semantics, and returnChecksRun telemetry. Fixtures are generated into a tmpdir at runtime rather than committed: @kernlang/check's repo-wide ZERO-FP acceptance wall walks every committed .kern and pins the exact parse-failing / validator-rejected / checker- offender sets, so any committed bad fixture would break that read-only wall. Runtime generation keeps them out of the scanned corpus (mirrors the existing self-coverage.test.ts pattern). Co-Authored-By: kern-agon <kern-agon@users.noreply.github.com>
Co-Authored-By: kern-agon <kern-agon@users.noreply.github.com>
…guarantee Co-Authored-By: kern-agon <kern-agon@users.noreply.github.com>
- 'up to 85% fewer tokens / 7 LLMs verified' -> measured 69.5% vs generated Express TS and 81.4% vs both backends (gpt-tokenizer cl100k over the dual-target-clean example corpus; bench preserved outside the repo) - Quick Example used stale machine syntax (event= and missing state declarations) that silently compiles to BROKEN TypeScript on current main (empty state union, duplicate function names) — replaced with the test-suite syntax, which produces 40 valid lines, not '140+' Co-Authored-By: kern-agon <kern-agon@users.noreply.github.com>
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.
What
Why
How
Checklist
tsc -bpassespnpm testpassespnpm test:kernpassespnpm lintpasseskern review packages/ --recursivechecked