Skip to content

Guard the Dag Code tab's Monaco grammar exports against drift - #74246

Merged
pierrejeambrun merged 2 commits into
apache:mainfrom
astronomer:test-monaco-grammar-exports
Oct 6, 2026
Merged

pierrejeambrun merged 2 commits into
apache:mainfrom
astronomer:test-monaco-grammar-exports

Conversation

@pierrejeambrun

Copy link
Copy Markdown
Member

Follow-up to #74231, which registers the TypeScript, Java and Go Monaco grammars for the Dag Code tab. That PR guards each grammar module's conf/language export shape, but the guard only runs in the browser when the Code tab mounts — a Monaco upgrade that moved a grammar module or dropped an export would pass CI and only surface as silently-unhighlighted source in production.

This adds a unit import of the three grammar modules so that drift becomes a CI failure instead: a moved module breaks resolution, a dropped export fails the assertion. Python is already exercised by the tokenized suite in pythonFStrings.test.ts.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Claude Opus 4.8)

Generated-by: Claude Code (Claude Opus 4.8) following the guidelines

The register-time shape guard in configureMonaco only runs in the browser
when the Code tab mounts, so a Monaco upgrade that moved a grammar module
or dropped its conf/language export would pass CI and only surface as
silently-unhighlighted TypeScript, Java or Go source in production. A unit
import of each module turns that drift into a CI failure instead.
@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Oct 5, 2026

@jason810496 jason810496 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the follow-up.

@pierrejeambrun
pierrejeambrun merged commit 8d37613 into apache:main Oct 6, 2026
251 of 254 checks passed
@pierrejeambrun
pierrejeambrun deleted the test-monaco-grammar-exports branch October 6, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants