fix: make check optional on doctor group actions - #354
Merged
Conversation
`check` is now `Option<DoctorCheckSpec>` instead of required, so
omitting it entirely produces the same "always run the fix" behavior
as the existing `check: {}` workaround, matching what the docs already
claimed. Both maintainers agreed on this direction in #153 but it was
never implemented.
- DoctorCheckSpec now derives Default so parse_action can treat a
missing check the same as an empty one.
- Regenerated schema/*.json (check dropped from required).
- Added regression coverage: a unit test pinning that check: {} and an
omitted check parse identically, an integration-test fixture update
exercising the omitted-check path end-to-end, and example YAML
updates.
Closes #153
rubberduck203
marked this pull request as ready for review
July 28, 2026 16:37
kejadlen
approved these changes
Jul 28, 2026
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
checkon aScopeDoctorGroupaction is nowOption<DoctorCheckSpec>instead of required, so omitting it entirely gives the same "always run the fix" behavior as the existingcheck: {}workaround — matching what the docs already claimed.checkdropped fromrequired);docs/static/schemais a symlink toschema/so the docs site picks this up automatically.Backward compatibility
check: {}continues to behave identically — it still deserializes to the sameDoctorCheckSpec { paths: None, commands: None }internally, andparse_action'sunwrap_or_default()produces the same value whethercheckwas omitted or explicitly empty. Pinned by a new unit test (omitted_check_and_empty_check_parse_identically) and confirmed by the existingrun-always-requiredfixture/integration test, which still usescheck: {}and passes unmodified.Test plan
cargo buildcargo fmt --checkcargo clippy --all-targetscargo test(249 tests, including a new unit test pinningcheck: {}vs omitted-checkequivalence, and an integration-test fixture now exercising the omitted-check path end-to-end)fixthat always runs? #153 (action with nocheckkey) against the built binarygusto-rust:rust-review) plus a workflow-backed adversarial code review — no unresolved findingsCloses #153