biome: fix silent failures (warnings + .gitignore in sandbox)#1135
Draft
gejustin wants to merge 2 commits intotrunk-io:mainfrom
Draft
biome: fix silent failures (warnings + .gitignore in sandbox)#1135gejustin wants to merge 2 commits intotrunk-io:mainfrom
gejustin wants to merge 2 commits intotrunk-io:mainfrom
Conversation
parse_regex matched only × markers — every ! warning dropped silently. It also lazily spanned newlines, correlating one diagnostic's path/line/col with a different message. Anchor each diagnostic to header → blank line → marker so captures stay self-contained, and accept × | ! as terminators. Info-level i is intentionally excluded; biome surfaces those as hints, not gating. basic_check snapshot updated to the actual warning biome emits on the fixture; previously captured a cross-correlated result. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
vcs.useIgnoreFile: true makes biome require the workspace .gitignore at
its CWD. trunk's per-target sandbox lacks it, biome aborts with
internalError/fs, exits 1, and success_codes:[0,1] swallows the error —
all findings silently dropped.
Symlink \${workspace}/.gitignore to the sandbox root via the symlinks:
directive (the only documented escape hatch — see remark-lint's
node_modules pattern). Covers a single root-level .gitignore; nested
.gitignore files would each need their own entry, no glob form
supported. Harmless when useIgnoreFile is unset.
gitignore_check test: empty issues without the symlink, expected
unusedHelper finding with it. Adversarially verified by stashing
plugin.yaml.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Member
|
@gejustin - this looks good to me. anything else you want to fix here? its marked as draft |
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
Two independent fixes for biome's lint integration that today cause findings to be silently dropped. Each commit stands alone.
1. Capture warning-level findings, anchor diagnostic block
parse_regexmatched only×markers — every!warning dropped silently. It also lazily spanned newlines, occasionally correlating one diagnostic's path/line/col with a different diagnostic's message.The new regex anchors each diagnostic to its own
header → blank line → markerso captures stay self-contained, and accepts×and!as terminators. Info-leveliis intentionally excluded — biome surfaces those as hints, not gating.basic_checksnapshot updated to the actual warning biome emits on the fixture (previously captured a cross-correlated result).New
warning_checktest enablesnoNonNullAssertion: warninbiome.jsonto verify warnings reach the snapshot.2. Symlink .gitignore into the lint sandbox
vcs.useIgnoreFile: trueinbiome.jsonmakes biome require the workspace's.gitignoreat its CWD. trunk's per-target sandbox doesn't include it, so biome aborts withinternalError/fs, exits 1, andsuccess_codes: [0, 1]swallows the error — every finding silently dropped.Add a
symlinks:directive that lands\${workspace}/.gitignoreat the sandbox root next tobiome.json(the only documented escape hatch — same pattern as remark-lint'snode_modules). Covers a single root-level.gitignore; nested ignore files would each need their own entry (no glob form supported). Harmless whenuseIgnoreFileis unset.New
gitignore_checktest setsvcs.useIgnoreFile: true+ writes a.gitignore, then expects biome's stocknoUnusedVariablesfinding. Adversarially verified: stashplugin.yaml, the test fails withissues: [].Test plan
KnownGoodVersion(2.3.4):basic_check,warning_check,gitignore_check,basic_fmt,basic_jsonwarning_checkfails with empty issuesgitignore_checkfails with empty issuestrunk.yamloverride of the published plugin (catches the violation that previously slipped CI)plugins.sourcespointing at this branch (same result)🤖 Generated with Claude Code