feat(config): add per-command env, dir, and silent overrides - #52
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #52 +/- ##
==========================================
+ Coverage 92.71% 92.84% +0.13%
==========================================
Files 27 27
Lines 1482 1524 +42
==========================================
+ Hits 1374 1415 +41
- Misses 105 106 +1
Partials 3 3
🚀 New features to boost your workflow:
|
quike
force-pushed
the
feat/per-command-controls
branch
from
September 16, 2026 19:26
22463a7 to
8b9fde7
Compare
quike
force-pushed
the
feat/per-command-controls
branch
from
September 16, 2026 19:32
8b9fde7 to
de6abd9
Compare
Owner
Author
|
🎉 This PR is included in version 1.30.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Implements item 1 of #37. Items 2 (
continue-on-error/always) and 3 (the composition decision) are untouched.Map-form
commands:entries accept three optional keys:String-form entries stay knob-free by construction — they have no keys — so the shape keeps selecting the capabilities.
Why
dirmatters mostRunning one command elsewhere previously meant
cd dist && ./package.sh, which is a string-form entry and therefore forcesshell:on the whole group, giving up safe argv exec for every command in it.dirkeeps the group in argv mode.Decisions
envanddirare templated likecommand/params, sodir: 'dist/{{ env "TARGET" }}'andenv: { SHA: '{{ output "build" }}' }work. Env keys stay literal.silentis excluded from the cache fingerprint. It changes only what is streamed to the terminal — capture intoRunResultis untouched, so{{ output }}, the event stream, and cache replay are unaffected. Toggling it keeps a valid cached result.envanddirdo fold in.UnmarshalYAML, notvalidateGroupCommands: only the YAML node distinguishesdir: ""from an absentdir.validateGroupCommandsneeded no change —diron a string-form entry is impossible by construction.Runner interface
Runnow takes theCommandSpecin place ofparams []string:runSequencealready setsg.Params = s.Paramsand passeds.Paramsseparately, which is why the interface doc had to warn implementations not to readg.Params. The spec carries the new fields with no extra plumbing. Seven test doubles get a mechanical signature change.Two touch points the issue did not list
Both silently drop data rather than failing to compile, so both are worth a reviewer's attention:
expandCommandsrebuiltCommandSpec{Command, Params, IsShell}field-by-field, discarding anything else before it reached the runner or the cache. It now copies the spec and overrides only what it renders, so fields added later carry through by default. The first test run caughtSilentbeing dropped exactly this way.ExtractRefsscanned onlyCommandandParams. It drives the dag scheduler's edges, load-time reference validation, andkeepup graph— so a templatedenv/dirreferencing another group produced no dependency edge, and the value silently rendered empty because the producing group was not scheduled first. Found by running a real config, not by a unit test. Env keys are sorted during extraction since map order is random and these refs become graph edges.Verification
gofmt,go vet,golangci-lint, andgo test -race ./...all clean.Beyond the unit tests, a real config exercising all three knobs was run through the built binary:
keepup graphconfirms the env-derived reference produces a real edge (build --> checks).Note for the reviewer
settings.working-diris parsed and migrated but never read anywhere in the codebase —diris resolved relative to the process working directory. Left alone here as unrelated, but it is dead config and probably wants its own issue.