build: keep the static gates out of Flutter build output - #86
Merged
Conversation
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 6, 2026
winetree94
force-pushed
the
verify-skip-build-output
branch
from
August 6, 2026 16:16
d5e8dd8 to
ffe6fd1
Compare
`dart run melos verify:debug` leaves apps/coder_app/build populated, so a following `dart run melos verify` failed on third-party sources the Flutter build had just written — `cargokit_build/tool/bin/build_tool_runner.dart` tripped `discarded_futures`, reformatted under `dart format .`, and made dependency_validator report `build_tool` as an undeclared dependency. AGENTS.md tells contributors to run both commands, so the documented workflow reliably broke itself and had to be cleared with `rm -rf` by hand. Three scanners walk the tree, so each gets the mechanism it actually has: - The analyzer gets an `exclude`. Both `build/**` and `**/build/**` are listed because apps/coder_app has its own options file, so an exclude may resolve against either that package or the workspace root. - dependency_validator gets `exclude: build/**` in its existing per-package config. - The formatter has no exclude flag, so it is handed an explicit list from `git ls-files --cached --others --exclude-standard`. That is tracked plus untracked-not-ignored files, which keeps a brand-new source covered while leaving ignored build output out, with `.gitignore` as the single source of truth rather than a second hand-maintained path list. CI cannot regress on this: the static job is a fresh checkout that never builds, and the Debug E2E jobs never run verify afterwards.
winetree94
force-pushed
the
verify-skip-build-output
branch
from
August 7, 2026 00:11
ffe6fd1 to
65e56ab
Compare
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.
Problem
dart run melos verify:debugleavesapps/coder_app/build/populated. Runningdart run melos verifyafterwards then fails — not on our code, but on a third-party source the Flutter build just wrote:AGENTS.md:56-58tells contributors to run both commands, so the documented workflow reliably breaks itself. I hit this twice on #79 and cleared it withrm -rfeach time.Three scanners, three mechanisms
I originally expected two offenders; running the real sequence surfaced a third (
dependencies). Each gets the mechanism it actually has:analysisdiscarded_futureserror in the plugin sourceanalyzer: exclude:formatdependenciesbuild_toolreported as an undeclared dev_dependencyexclude:in the existing per-package configThe analyzer exclude lists both
build/**and**/build/**, becauseapps/coder_app/analysis_options.yamlis a one-lineinclude:of the root file and an exclude glob may resolve against either that package or the workspace root.The formatter has no exclude flag, so
tool/format_sources.darthands it paths from:Tracked plus untracked-not-ignored, so a brand-new file a contributor just wrote is still checked while ignored build output is not. This keeps
.gitignoreas the single source of truth rather than duplicating the ignore rules in code. Logic lives inlib/src/source_inventory.dart(pure, unit-tested) with a thintool/entrypoint, matching the existingverify_workspace.dart→verification_runner.dartsplit.Verification
The acceptance test is the sequence that used to fail, run for real:
dart run melos verify:debug→ exit 0, leavesbuild_tool_runner.darton diskdart run melos verifyimmediately after, norm -rf→ all 12 steps PASSI also confirmed the old config genuinely fails on that file (1 analyzer diagnostic, 1 reformat) by stashing the change and re-running, so the fix is verified against a reproduced failure rather than assumed.
Formatter regressions checked: a mis-formatted tracked file exits 1; a brand-new untracked file is caught; offending files in different batches are all reported (batching does not stop at the first failure, matching
dart format .).Notes
Static checksjob is a fresh checkout that never builds, and the Debug E2E jobs never run verify afterwards — which is also why CI never caught it.melos cleanscript: it would not fix anything, since the tools would still scan whatever build output exists.