Repository navigation
A target that no selected project defines fails instead of exiting 0 - #295
Open
calvin-archastro wants to merge 1 commit into
Open
calvin-archastro wants to merge 1 commit into
calvin-archastro wants to merge 1 commit into
Conversation
Contributor
Author
|
ArchDev is watching this pull request. State: watching (cycle 10 of 10 for head 227acb6).
Paused by the |
calvin-archastro
force-pushed
the
factory/tsk_4JVLPI7PgIKDfuE3f8d4gt-a86e5c3c-039b-4820-ad35-
branch
4 times, most recently
from
November 1, 2026 12:44
5aa879a to
8d3a4ad
Compare
calvin-archastro
force-pushed
the
factory/tsk_4JVLPI7PgIKDfuE3f8d4gt-a86e5c3c-039b-4820-ad35-
branch
from
November 1, 2026 16:51
8d3a4ad to
227acb6
Compare
This branch has not been deployed
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.
Review on ArchCode
Epic: Aster bug bash fixes
Task: A target that no selected project defines fails instead of exiting 0
Problem and author intent
An external target that no selected project defined was treated as a full skip and exited 0.
aster tset --allprinted a “skipped (no target)” summary and stayed green, so a typo in CI could pass indefinitely. With no project selector, a word that no discovered project defined (for exampleaster nonexist) was reported as “No projects specified” instead of an unknown command. The streaming path returned before that empty-target policy, so a multi-project typo could fail for the wrong reason and--allow-emptywould not apply.The intent is to fail when every selected project omits the target, matching the expectation that a missing target is an error, while keeping a partial skip and an empty workspace successful.
--allow-emptyis the explicit opt-out. A bare word that no project defines should say it is an unknown command or target.aster runis left unchanged.What changed
Before, every selected project could skip a missing target and the process still exited 0. After, a non-empty result set in which every result is skipped fails unless
--allow-emptyis set, withtarget '<name>' is not defined in any selected project. An empty result set, including an empty workspace, still exits 0. If at least one selected project defines the target, projects that omit it are still skipped and the run still succeeds.RunArgsgainsallow_empty, parsed from--allow-empty(default false). Inselect_projects, a non-empty target word that no discovered project defines returnsunknown command or target '<word>'; run aster --helpinstead of the selector hint. If some project does define the word, the existing “No projects specified” error is unchanged, includingaster testoutside a project.On the external-target path, streaming is not entered when the initial selection is non-empty and none of those projects define the target. That keeps the batch summary in control, so both the failure and
--allow-emptyapply to--streamas well. Usage text, CLI help, the README, andsrc/cli/skills.mddocument the flag and the skip-versus-fail rule.Scope
src/main.rs: streaming guard and all-skipped failuresrc/cli/run.rs:--allow-emptyparsing and unknown-command error, plustest_parse_run_args_allow_emptysrc/cli/commands.rs: help textREADME.md,src/cli/skills.md: user docstests/integration.rs:typo_target_with_all_fails_when_no_project_defines_itThe frozen diff is 15 hunks, +184/−5, across those six paths, with no omitted hunks or paths.
src/cli/output.rsis not modified.aster runis not modified.Risk assessment
Medium. Invocations that previously exited 0 because the target was defined nowhere now fail. That break is intended for typos; workflows that rely on the old green exit need
--allow-empty. Partial skips and empty workspaces keep exit 0. Batch and stream share the same policy so the flag is not ignored on the streaming path.User impact
aster <missing-target> --all(and a selected project that does not define the target) now fails and names the target, unless--allow-emptyis passed. A target defined by only some selected projects still runs, with the others skipped. A bare unknown word points ataster --help. An empty workspace running a target with--allstill exits 0.Testing
The patch adds
tests/integration.rs::typo_target_with_all_fails_when_no_project_defines_itand the unit testtest_parse_run_args_allow_emptyinsrc/cli/run.rs. The integration test builds a temp workspace, runs the aster binary, and asserts:tset --allfails and namestset;nonexistfails with the unknown-command text; bareteststill reports “No projects specified”;test --allsucceeds with a partial skip;tset --all --allow-emptyexits 0;tset //p --streamfails with the not-defined message;--allow-empty --streamexits 0; an empty workspace withtset --allexits 0. Those assertions are evidence of intended coverage, not proof the test passed.Author-reported local checks are
cargo test --test integration typo_target_with_all_fails_when_no_project_defines_it,cargo clippy --workspace --all-targets -- -D warnings, andcargo fmt --all --check. The task text says CI jobtestrunscargo test --locked --workspace --all-targets --all-features(which would include this integration test) and jobqualityruns fmt and clippy. Upstream checksformat,lint,test,fix,reformat,verify-lint,verify-test, andcommitall report succeeded with exit code 0, but the payload is truncated and the excerpts do not name this integration test,test_parse_run_args_allow_empty, or these CLI paths. Those pipeline outcomes are advisory and do not confirm this change’s tests executed.Follow-ups and known issues
Empty-workspace success is intentional and is covered by the new integration test.
aster runand selector parsing beyond the unknown-command message were left unchanged. No further follow-ups are evidenced in the frozen diff.