Repository navigation
Unit tests for argument parsing; one Run per --email end-to-end test - #214
Merged
Merged
Conversation
The two --email looping tests in run_notification ran nine full Runs to cover flag position, bare flag against an address, the Issue URL never taken as an address, and merge before and after. args now has unit tests for every one of those cases, and each end-to-end test is cut to one Run showing the parsed arguments reach the Run notification. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 30, 2026
Merged
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
Argument parsing is now unit-tested in
args. The two--emaillooping end-to-end tests were nine full Runs between them; now each is one Run.Every argument list the old loops ran is now a unit case. Each case asserts the Issue URL, the
NotificationAsk(Send(None)orSend(Some(address))) and the goal.Some of what the old Runs checked is still checked end to end by other tests:
email.to:with_email_always_an_address_after_the_flag_still_wins.a_run_ready_for_review_sends_one_notification_to_the_address_given.Evidence
Timings are
cargo test -q --test run_notification, three runs each. The machine was shared with other sessions, so the numbers are noisy.Before: 48.8 s, 55.0 s, 48.5 s
After: 37.7 s, 38.4 s, 32.9 s
cargo test --bin thirdshift args::: 2 passed.A mutation check: when
is_addresswas changed to acceptmerge, the position test failed.Full suite: every binary passes. In the full run,
spec_run::the_parallel_flag_wins_over_spec_parallelfailed once under load. It depends on timing and doesn't touch this change. It passed twice on its own, and the wholespec_runbinary then passed (63/63).Merge Danger
Door: two-way
Blast Radius: tests-only
No production code changes. A regression in argument parsing is now caught by unit tests, not by the removed Runs.
Unaddressed findings
Standards
tests/run_notification.rssets up its Scenario inline, and extracting a helper for two tests would break that pattern.Spec
emailword form and an address before the Issue URL reach a real Run only through other end-to-end tests. Skipped. Both parse to the sameRunArgsthe unit tests pin, anda_merge_run_sends_one_notification_that_it_mergedalready runs["email", "me@example.com", "merge", url].["--email", "flag@example.com", URL], wasn't in the old loops. Kept. It pins an address before the Issue URL, which costs nothing.Closes #205
🤖 Generated with Claude Code