Repository navigation
feat: carry diagnostic severity and codes through collected-error channel - #141
Closed
jonkwheeler wants to merge 4 commits into
Closed
jonkwheeler wants to merge 4 commits into
jonkwheeler wants to merge 4 commits into
Conversation
…nnel
CompileError gains an optional severity ('error' | 'warning') so consumer
compilers can publish warning-severity diagnostics; error() accepts it as
a trailing parameter. tsrx-tsc now prints collected diagnostics in tsc
convention — file(line,col): <error|warning> <code>: message — instead of
dropping the code, and a fatal .tsrx compile failure emits a valid stub
module under TSRX_TSC so sibling files keep their semantic diagnostics
(the raw-source fallback stays editor-only). The language server's
compile-diagnostic plugin maps severity 'warning' to real editor warnings.
Also pins the literal-key class-map emit contract: unknown keys reject
same-module and cross-module (TS2339/TS2551), and non-class-map apply
targets reject through the synthesized $class read.
|
@jonkwheeler is attempting to deploy a commit to the Ripple Team Team on Vercel. A member of the Team first needs to authorize it. |
jonkwheeler
marked this pull request as ready for review
September 21, 2026 09:52
Contributor
Author
|
def not ready for review |
jonkwheeler
marked this pull request as draft
September 21, 2026 10:06
The stub module a failed file compiles to under TSRX_TSC type-checks clean, so a printed failure no longer reached tsc's exit code — CI and --noEmitOnError treated a broken module as clean. logTSRXErrors now tracks error-severity entries (warnings stay non-fatal) and tsc.js rewrites the exit code accordingly, covering both sys.exit and return-without-exit paths. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 19b5c88. Configure here.
The exit-code test planted TS diagnostics in main.ts, so tsrx-tsc exited nonzero regardless of the logged-failure signal — the wrap could regress without the test noticing. Include broken.tsrx as a root file with no imports and a clean main.ts, so the nonzero exit can only come from loggedErrorDiagnostic(); keep the sibling-diagnostics coverage as its own test. Reported-by: Cursor Bugbot (tsrx-org#141)
Contributor
Author
|
this pr is being split into manageable chunks |
5 of 6 tasks
This was referenced Sep 25, 2026
1 task done
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.

Summary
Carries diagnostic severity and codes through the collected-error channel end to end, so consumer compilers (e.g. Octane's
<style>diagnostics) can publish warning-severity findings and have them reach every surface with their code intact.CompileErrorgains an optionalseverity: 'error' | 'warning'(absent = error);error()accepts it as a trailing parameter.tsrx-tscprints collected diagnostics in tsc convention —[tsrx-tsc] file(line,col): <error|warning> <code>: message— instead of droppingcode..tsrxcompile failure undertsrx-tscemits a valid stub module so sibling files keep their semantic diagnostics; the raw-source fallback stays editor-only.severity: 'warning'to real editor warnings.applytargets reject through the synthesized$classread.Downstream consumer: octanejs/octane#1195 (typed native styling — warning-severity findings like
octane-css-unused-selectorandoctane-style-token-contract-unresolvedneed this transport to reach the editor).Validation
vitest --project tsrx-utils— 630 tests pass (incl. newerrors.test.js,style-class-types.test.jsemit pins)vitest --project typescript-plugin --project language-server— 250 tests pass (incl. newtsc-error-logging.test.js,compileErrorDiagnosticPlugin.test.js)prettier --checkclean on all touched files@tsrx/core,@tsrx/typescript-plugin,@tsrx/language-serverFollow-ups
@tsrx/*versions lands separately.Provenance
agent-authored)Note
Medium Risk
Changes
tsrx-tscexit semantics and compile-failure stubbing, which affects CI and multi-file typecheck behavior; diagnostic severity is new public API onCompileError.Overview
Extends the collected-error pipeline so consumer compilers can emit warnings (with stable codes) that show up correctly in the editor and CLI.
CompileError/error()gain optionalseverity: 'error' | 'warning'(missing means error). The language-server compile-error plugin maps'warning'to real LSP warnings instead of errors.tsrx-tsclogs collected diagnostics in tsc-style lines —[tsrx-tsc] file(line,col): <error|warning> <code>: message— and tracks error-severity prints so the process still exits nonzero when a fatal.tsrxcompile fails even though the broken file is stubbed toexport {}. That stub (CLI-only) replaces feeding raw TSRX as generated TSX, so sibling files keep their semantic diagnostics; editors still get the raw-source fallback for squiggles.Also adds/extends tests for severity passthrough, CLI logging, stub behavior, and pins class-map typecheck behavior (unknown keys, cross-module
applytargets).Reviewed by Cursor Bugbot for commit fb5d4dd. Bugbot is set up for automated code reviews on this repo. Configure here.