Repository navigation
fix: propagate diagnostic codes through analyze and MCP surfaces - #1210
Closed
jonkwheeler wants to merge 1 commit into
Closed
jonkwheeler wants to merge 1 commit into
jonkwheeler wants to merge 1 commit into
Conversation
octane analyze's thrown-failure path flattened every tsrx-style-* code to OCTANE_COMPILE_ERROR (or worse, OCTANE_PARSE_ERROR for loc-carrying analyzer errors, also reported at 1:1); MCP octane_compile's diagnostic JSON omitted code entirely. Agents could not see the code they need to self-correct. Now the real code and real location propagate on both surfaces, and docs-meta registers kebab + SCREAMING spellings so search resolves a diagnostic under either form. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This was referenced Sep 21, 2026
Contributor
Author
|
Closing this slice draft for now: the typed-styling work is moving to an RFC first so the approach can be discussed with maintainers before asking for slice review. The branch and this re-cut remain intact; slices may be reopened or re-cut once the RFC settles the direction. Still tracked in the decomposition index (#1204). |
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
Slice O1 of the typed-native-styling decomposition (tracked in #1204). Re-cut from #1195 as a standalone bugfix — no dependencies.
octane analyze's thrown-failure path flattened every throwntsrx-style-*/OCTANE_*code toOCTANE_COMPILE_ERROR(orOCTANE_PARSE_ERRORfor loc-carrying analyzer errors, also misreported at 1:1), and MCPoctane_compiledroppedcodefrom its diagnostic JSON entirely. The code is a diagnostic's identity — agents filter findings (--code) and search docs on it — so flattening orphans every error.thrownFailurenow preserves the thrownerror.codeand normalizes acorn-styleloc.startpositions.octane_compilediagnostics carrycodeon each entry.docs-metaregisters kebab + SCREAMING spellings so docs search resolves a diagnostic code under either form.Test plan
packages/cli/tests/analyze.test.js(10 tests)website-mcp/tests/compile-tool.test.ts,website-mcp/tests/search.test.ts(website-mcp-unit project)pnpm typecheck:files,pnpm format:fileson touched files,pnpm sync(no output changes)One test from the source commit (
reports collected style diagnostics under their kebab codes) moves to the O3 slice — it asserts a code the O3 analyzer emits.Provenance
agent-authored)Re-cut mechanically from the validated diff in #1195; no redesign.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Low Risk
Surfacing-only change to CLI analyze, MCP compile JSON, and docs search metadata; compiler behavior is unchanged.
Overview
Thrown compile failures now keep their real diagnostic codes instead of being collapsed to
OCTANE_PARSE_ERROR/OCTANE_COMPILE_ERROR. Inoctane analyze,thrownFailurereadserror.codewhen present and normalizes both acorn-style (loc.start) and flatlocso line/column stay accurate for style and other semantic throws.MCP
octane_compileerror payloads include an optionalcodeon each diagnostic, matching what agents need for--codefiltering and doc lookup.Docs search registers styling diagnostic codes in both kebab (compiler) and SCREAMING (docs) forms so queries like
tsrx-style-standalone-outside-templateorOCTANE_CSS_UNKNOWN_PROPERTYresolve to the styling diagnostics section.Reviewed by Cursor Bugbot for commit fd2b13f. Bugbot is set up for automated code reviews on this repo. Configure here.