feat/v2.0-remove-legacy-knobs: Phase 3 — delete the v1 DSL surface for v2.0.0#34
Merged
vedanthvdev merged 1 commit intomasterfrom Apr 22, 2026
Merged
Conversation
…r v2.0.0 This is the breaking release. The three deprecation-warned v1 knobs (`runAllIfNoMatches`, `runAllOnNonJavaChange`, `excludePaths`) are gone from every public surface — extension, task, core config, and builder — along with the two `ActionSource` tiers (`LEGACY_BOOLEAN`, `HARDCODED_DEFAULT`) and the `deprecationWarnings()` list that existed only to carry v1 nags. After this commit the resolver is strictly two-tier (explicit `onXxx` > mode default), which is what the v2 design doc has always pointed at. Why now: we promised Phase 3 in DESIGN-v2.md and burned a full v1.9.x minor cycle warning about the removal so consumers had runway. Keeping the old surface around any longer just invites new code to grow against it and makes the mode-default story permanently fuzzy. Why this shape, not a softer one: - Reflective regression test (`legacyDslKnobsNoLongerExistInV2`) pins the absence of the accessors on every surface — extension, task, config, and builder — so a well-intentioned "restore the getter for back-compat" revert fails at build time instead of silently re-opening the v1 API. - Migration table in README/CHANGELOG explicitly calls out that `runAllIfNoMatches = false` is *not* a safe no-op delete in CI — the new zero-config `mode = "auto"` resolves to `ci`, and `ci` escalates `DISCOVERY_EMPTY` to `FULL_SUITE`. A v1 pipeline that set the flag specifically to suppress that branch would regress silently. Users must either pin `mode = "local"` or set both `onEmptyDiff = "skipped"` and `onDiscoveryEmpty = "skipped"`. - `--explain` sample output refreshed to match v2 reality (AUTO mode, `DISCOVERY_INCOMPLETE` row, no "pre-v2 defaults" string) so the README doesn't ship with a trace operators can no longer reproduce. - Architecture diagram (`docs/architecture.mmd` + regenerated SVG) trimmed to the two-tier ladder so the picture matches the code. The engine test `unmappedFileEscalationCanBeDisabled` now pins `mode(Mode.LOCAL)`. The migration it proves — opting out of the unmapped-file escalation via `onUnmappedFile = SELECTED` — causes a yaml-only diff to fall through to `DISCOVERY_EMPTY`, and under the new zero-config `mode = "auto"` that escalates to `FULL_SUITE` on any `CI=true` runner (GitHub Actions, GitLab, etc.). The test would have passed locally and failed on CI forever — the v2 behaviour change is correct, the test assertion is correct, but the test needs the same `mode = "local"` pin we tell v1 users to apply. This is the exact migration path the README now documents for `runAllOnNonJavaChange = false` users, so the test doubles as executable documentation. Test coverage follows the deletion: legacy-tier tests removed, priority tests rewritten against the two-tier resolver, engine/explain/log-format tests renamed away from the v1 vocabulary, and every test method that used to reach for the old knobs now uses `ignorePaths`, `onEmptyDiff`, `onDiscoveryEmpty`, or `onUnmappedFile` instead. Closes Phase 3 of DESIGN-v2.md.
c44b745 to
04c5818
Compare
6 tasks
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.
Why
This is the breaking release. Phase 3 of
docs/DESIGN-v2.mdcalled for removing the three deprecation-warned v1 knobs (runAllIfNoMatches,runAllOnNonJavaChange,excludePaths) once the v1.9.x minor line had burned enough runway to give consumers time to migrate. That runway is burned; keeping the old surface around any longer just lets new code grow against it and makes the mode-default story permanently fuzzy.After this PR the resolver is strictly two-tier: explicit
onXxx> mode default. No legacy boolean tier, no pre-v2 hardcoded-default tier, nodeprecationWarnings()list.What changes
Removed from the public surface:
AffectedTestsExtension.getRunAllIfNoMatches(),getRunAllOnNonJavaChange(),getExcludePaths()AffectedTestTaskequivalentsAffectedTestsConfig.runAllIfNoMatches(),runAllOnNonJavaChange(),excludePaths(),deprecationWarnings()AffectedTestsConfig.Builder.runAllIfNoMatches(...),runAllOnNonJavaChange(...),excludePaths(...)ActionSource.LEGACY_BOOLEAN,ActionSource.HARDCODED_DEFAULTAffectedTestsConfig#resolveIntoLock-in:
AffectedTestsPluginTest#legacyDslKnobsNoLongerExistInV2reflectively asserts absence across all four surfaces (extension, task, config, builder). A well-intentioned "restore the getter for back-compat" revert fails at build time instead of silently reopening the v1 API and the deprecation nags it carried.Migration
The README and CHANGELOG both carry the new migration table. The one subtle case worth calling out here too:
runAllIfNoMatches = false(explicit)mode = \"local\", or pinonEmptyDiff = \"skipped\"+onDiscoveryEmpty = \"skipped\"explicitly. Do not just delete the line — in v2 the zero-configmode = \"auto\"resolves tociin a CI runner, andciescalatesDISCOVERY_EMPTYtoFULL_SUITE. A v1 pipeline that setrunAllIfNoMatches = falsespecifically to prevent that branch from flipping to full suite will regress silently otherwise.The other two knobs are straightforward deletes-with-a-rename (
runAllOnNonJavaChange→onUnmappedFile,excludePaths→ignorePaths).Docs refresh
README.md:--explainsample output rewritten to what v2 actually produces (Mode: AUTO (effective: LOCAL), includes theDISCOVERY_INCOMPLETErow, no "pre-v2 defaults" string). Mode-profile table now has aDISCOVERY_INCOMPLETEcolumn. "Migrating from v1" rewritten to emphasize that the old knobs are removed, not deprecated.CHANGELOG.md: new v2.0 section with the removal list, migration table, and regression-coverage note.docs/architecture.mmd+ regenerateddocs/architecture.svg: priority ladder trimmed to the two-tier resolver so the picture matches the code.docs/DESIGN-v2.md: Phase 3 marked done.Test coverage
Every legacy-tier test was rewritten against the two-tier resolver or deleted where it no longer had anything to say. Engine, explain-format, and log-format tests renamed away from v1 vocabulary (
runAllIfNoMatches*→onEmptyDiffFullSuite*/onDiscoveryEmptyFullSuite*, etc.) so a future grep for the old names returns nothing../gradlew checkis green locally.Post-merge
v2.0.0.security-servicethat (a) pins2.0.0and (b) removes any residual v1 config the service was still carrying.