Repository navigation
fix(scope,review,ship): recognise Dart and Flutter in diff scope and test detection - #3284
arlophoenix wants to merge 9 commits into
Conversation
gstack-diff-scope matched no category for .dart, so a Flutter widget PR with a test set SCOPE_TESTS alone and silently skipped the design, performance and security reviewers. The extension cannot tell a widget from a repository, so .dart is both; pubspec.lock is config. lib/frontend-scope.ts mirrors the frontend half, and design-detect skips .dart because impeccable reads web sources. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…etection The review-army stack hint called a Flutter repo `node` and test bootstrap had no Dart runtime. Adds STACK dart, TEST_FW flutter-test/dart-test, RUNTIME:dart and FRAMEWORK:flutter markers, *_test.dart in the TESTFILES count, a pubspec.yaml candidate row and dart_test.yaml in the coverage audit. The adversarial DIFF_TOTAL uses --numstat like review-army already does. To stay inside ship's parity byte cap, four bootstrap comments are shortened, the "a marker is not proof" sentence is tightened (its second-framework clause is repeated later in the section) and a redundant manage.py sentence is dropped. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…_SIZE Co-Authored-By: Claude Opus 5.5 <[email protected]>
Coverage-audit detection now names Dart and counts *_test.dart like the bootstrap block (two comments shortened to fit the parity caps), with a test that runs the rendered block; diff-scope's Dart comment no longer calls the extra frontend pass cheap. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A commented-out 'sdk: flutter' made a pure-Dart package report Flutter, and a quoted 'sdk: "flutter"' fell back to dart test. Co-Authored-By: Claude Opus 5.5 <[email protected]>
dart_test.yaml can move test discovery off *_test.dart, so a configured suite read TESTFILES:0 and was offered a bootstrap. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
Thanks @arlophoenix. This is ported as #3300, squashed with you as co-author. The only change on top: it pushed |
|
Closing in favour of #3300, which carries this change with @arlophoenix as co-author and has passed its free CI and paid gate (108/108 rule cases, 24/24 judges). Thank you for the careful split and the mutation-checked tests. |
…f scope and test detection (#3284) (#3300) * fix(scope,review,ship): recognise Dart and Flutter in diff scope and test detection (#3284) Port of arlophoenix's #3284 onto current main, squashed: - gstack-diff-scope: .dart is frontend and backend; pubspec.lock is config. - lib/frontend-scope.ts mirrors the frontend half; gstack-design-detect never sends .dart to the impeccable engine. - Test bootstrap, coverage audits and review-army detect Dart/Flutter (RUNTIME:dart, FRAMEWORK:flutter, dart_test.yaml, *_test.dart). - Adversarial DIFF_SIZE sums git diff --numstat. On top of the contributor's diff: shorten the bootstrap's ecosystem-marker comment so /design-review stays at its SKILL.md size pin, lower the 31 pins that shrank, and add the CHANGELOG entry. Co-authored-by: arlophoenix <[email protected]> Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * v1.91.160.0 fix(scope,review,ship): recognise Dart and Flutter in diff scope and test detection (#3300) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --------- Co-authored-by: arlophoenix <[email protected]> Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Part 3 of 3 split from #3193 at maintainer request.
Why (in your own words)
On a Flutter or pure-Dart repo,
/reviewand/shipnow run the frontend and backend reviewers on a.dartdiff, and Step 4 recognises an existingflutter test/dart testsuite instead of offering to bootstrap a framework over it. Before this,gstack-diff-scopematched no category for.dart, so a widget-only change setSCOPE_FRONTEND=false SCOPE_BACKEND=falseand those reviewers were skipped without a word..dartcounts as both frontend and backend, because the extension cannot tell a widget from a repository class.pubspec.lockcounts as config. The design detector drops.dartfrom--changed, since impeccable reads web sources, so Dart files get the checklist pass only (noted indocs/skills.md). The review-army stack hint reportsdartandTEST_FWreportsflutter-testordart-test. The Step 4 bootstrap and Step 7 coverage-audit marker blocks reportRUNTIME:dart,FRAMEWORK:flutter(an indentedsdk: flutterline, quoted or not; a commented-out one does not count),dart_test.yamland*_test.dart. AdversarialDIFF_SIZEnow sumsgit diff --numstat, which also fixes a deletion-only diff reading as 0.To fit ship's parity cap without raising it, existing prose in
scripts/resolvers/testing.tswas trimmed. Bash comments in both the bootstrap and coverage-audit marker blocks were shortened, keeping their meaning. The bootstrap "A marker tells you which ecosystem…" sentence was tightened, dropping its "installing a second framework over a working one is worse" clause, which the section repeats later. The sentence "A greenpython manage.py testwith nopytest.iniis a tested project, not a bootstrap candidate." was dropped, because the sentence before it makes the same point. No test pins any of them.test/frontend-scope.test.ts's sampled parity test got a 30s timeout: it measured 4.15s for 33 samples underniceagainst bun's 5s default.Live evidence
A throwaway
git clone --sharedof a real Flutter app (flutter-bbtm), branched from itsdevelop, with a comment appended tolib/theme.dart, a drawer widget and its widget test. The clone was deleted afterwards. Captured at 07f6754. Later commits changed the Flutter grep, the coverage-audit block and a comment, which the tests below cover.In the same clone, the rendered review-army block printed
STACK: node dart,DIFF_LINES: 3andTEST_FW: flutter-test. The bootstrap block printedRUNTIME:node,RUNTIME:dart,FRAMEWORK:flutter,SCRIPT:package.json testandTESTFILES:1141.Scope
bin/gstack-diff-scope,lib/frontend-scope.ts,bin/gstack-design-detect.ts, the review-army, testing and outside-voice resolvers plus their regenerated sections,docs/skills.md, and tests. 20 files, +207/−60.DIFF_SIZE).eval:selectpicked about 110 probes and 24 judges throughfrontend-scope.ts), the fullbun run test, Linux or Windows, or/shipend to end on a Flutter repo.Liveness proof (required for external contributors)
Checklist
GSTACK PRtyped live into a real surface) or PR author is @garrytan (owner exemption)Test plan
niceon macOS, all green:diff-scope40,frontend-scope35,gstack-design-detect108,ship-test-detection-markers7,gen-skill-docs486,skill-validation336,touchfiles69. The parity, context-budget and skill-size budget tests also pass, andbun run typecheckis clean.ship-test-detection-markersruns the rendered bootstrap, coverage-audit and review-army blocks in temp repos. Mutation checks: each assertion fails with its fix reverted, covering a commentedsdk: flutter, a quotedsdk: "flutter",dart_test.yamland the coverage-auditRUNTIME:dart.bun test test/pregate-selection.test.ts: 4 failures on both this branch and pristine upstream/main a2a6cab (named below), plus 1–2 more per branch run that time out at 5s under load (see below).Manual test pass
lib/**/*.dartfile and run/review: expect the frontend and backend specialists to be dispatched, and the stack line to readdartwithTEST_FW: flutter-test.pubspec.yamlandtest/*_test.dartbut no test command in CLAUDE.md, run/ship: expect Step 4 to print "Existing tests detected" and offerflutter testordart test, not a bootstrap.Test failures not caused by this branch
test/pregate-selection.test.tsfails these 4 on both this branch and upstream/main a2a6cab (24 pass, 4 fail there): "a clean branch passes every check…", "lanes: a touched file with no test lane is FAIL lanes…", "p0-4-windows-lane-unrun…" and "lanes prints the lane list with platform tiers…". On darwin the linux and windows lanes becomerequires-remote. On this branch, 1–2 more tests fail per run, all at bun's 5s timeout under a load average of about 25, and a different test each run (five names across three runs). Upstream's single run under the same load had none, so those are not proven unrelated. This branch does not touch pregate code.test/outside-voice-preflight.test.tsfails 2 tests on both this branch and upstream, because macOS resolves/varto/private/var: "a repo-local installation resolves before any preamble exports exist" and "valid explicit runtime roots take priority and stale roots fall back locally".gstack-pregatestage 2 selected 618 test files for this diff, hit its 600s timeout and is incomplete. It reported 4 failures, including agstack-ff-updaterescue-ref 5s timeout and ashared-libs-checkerbeforeEach timeout. Both files are outside this diff, and neither is proven to fail on upstream. Its linux and windowsrequires-remoteobligations are uncleared.Not addressed
pubspec.yamlis read for the stack and test hints, so a monorepo with nested packages is detected only when the root has one.*.g.dartfiles count toward diff size and scope like any source file.flutter: {sdk: flutter}reads asdart-test.flutter createnever writes it.TEST_FWstays last-match-wins, so a root with bothgo.modandpubspec.yamlreports only the Dart runner.fvmprefix for.fvmrcbut emits no FVM marker. The fallback "which runtime?" question has no Dart option.gstack-design-detect --changedon a Dart-only diff exits withDETECT_NO_TARGETSand does not say the.dartfiles were skipped.🤖 Generated with Claude Code