Repository navigation
One module for what a Run is asked: its command's flags, else the User config - #306
Merged
Merged
Conversation
…resolved, for each kind of run Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fig variants are the asks module's unit tests now Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…le, one home for a dispatched run's asks, two more flag-or-User-config cases gone from a Pickup run's tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 2, 2026
Closed
Merged
3 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.
Summary
What a Run is asked now has one home,
src/asks.rs: the flags as the command gave them (Flags), and what they come to with the User config for each kind of run (Asks).src/ +├── asks.rs # Flags as given, Asks resolved, the child Run rule, the retry command ├── args.rs # fills in Flags; RunFlags, DispatchArgs and retry_with_base_fix gone ├── config.rs # holds settings only: default_goal, default_base_fix, default_ask gone ├── spec_run.rs # Parallel and its constructor gone ├── run.rs # run_to_end(issue, asks, started_by, logs_dir): four values, was seven └── main.rs # resolves no ask itselfAsks::of_runand nowhere else.parallelignored for a Ready issue that is not a Spec, in the asks and in the retry command, is inAsks::of_ready_issue.main.rsno longer keeps a copy of the email flag beside its resolved value.Seams under test: the asks module's interface (
Asks::of_run,Asks::of_architect_plan,Asks::of_ready_issue,Flags::notification,Flags::any_for_dispatched_run), with the retry command read back throughargs::parse; and the argument parser'sargs::parse, whose existing unit tests moved ontoFlags.End-to-end tests keep one case per ask per path. Removed, as the unit table covers them:
tests/user_config.rsmerge.alwaysandbase.fixagainst the flag, the User config alone, and neithertests/architect_run.rstests/pickup_run.rstests/spec_run.rstests/run_notification.rstests/base_fix.rsEvidence
After: 14 unit tests in
asks::tests, in-process:architect_run74,base_fix21,launch_pull8,pickup_run68,run_notification24,spec_run80,user_config20, all passed.architect_run70,base_fix20,pickup_run67,run_notification19,spec_run74,user_config13, the rest unchanged). After the review fixes (the last commit) I re-ran the unit tests andpickup_run,command_surfaceanduser_config, not the whole suite again: all passed.cargo fmt --checkandcargo clippy --all-targets -- -D warningsare clean.prompts/,CONTEXT.mdanddocs/adr/are unchanged.Merge Danger
Door: two-way
A refactor with no change a user sees: same flags, defaults, progress lines, retry command and Run notifications. Reverting the PR restores the old shape.
Blast Radius: contained
Every command that starts a Run goes through the new module, so a mistake in it would reach
thirdshift <Issue URL>,architectandpickupalike. After this PR no end-to-end test showsmerge.always,spec.parallelorbase.fixfrom the config file changing a Run started on an Issue URL: that is split between the config-parsing unit tests and the asks unit tests, as the issue asks.Unaddressed findings
Standards
ArchitectArgsholdsflagsandplan_only: boolwhere it heldOption<DispatchArgs>, so "no dispatch flags with--plan-only" is no longer in the type. The issue asks for one shared flags type and keeps this refusal as a parsing rule (Decision 4); the check itself now lives onFlagsso a new flag can't slip past it.asksandargsdepend on each other, and the retry command's spellings sit apart from the parser's. Decisions 4 and 5 put the words in the parser and the retry command in the asks module; the round-trip test throughargs::parseis what holds the two together.run_to_endtakesAsksbut does not act onasks.notification. The issue lists the Run notification among the asks and has the Run take them as one value; what started the Run sends the notification, as the doc says.tickets_at_onceandparallel_askedare the oldParallelpair flattened, and the ask isemailinFlagsbutnotificationinAsks. Decision 1 says the module holds two types;emailis the flag's word andnotificationwhat it resolves to, as the existingNotificationAskalready had it.of_ready_issuetakes a bareis_spec: bool. It is a fact about the issue taken, passed straight frompickup::Taken::is_spec, not an option of the run.Spec
base_fix_reaches_each_tickets_run_of_the_dispatched_spec_run,merge_reaches_the_dispatched_run,base_fix_reaches_the_dispatched_run,a_pass_that_took_an_issue_sends_one_notification_when_asked), as were two more Pickup run tables after review. Their other rows only varied whether a flag or the User config decides, which the issue says to remove; keeping the loop and the old name around one row would misdescribe the test.Closes #304
🤖 Generated with Claude Code