test(dor): cover kill's conflicting-confirmation rejection - #369
Open
dormouse-bot wants to merge 1 commit into
Open
test(dor): cover kill's conflicting-confirmation rejection#369dormouse-bot wants to merge 1 commit into
dormouse-bot wants to merge 1 commit into
Conversation
parseConfirmation rejects when the number of confirmation modes != 1, which covers both zero modes and two conflicting modes. Only the zero-mode case (kill-missing-confirmation) was tested; add a case that passes both --confirm-dangerously and --confirm-if-read to guard the two-mode branch.
Deploying mouseterm with
|
| Latest commit: |
f05854c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://067dbc29.mouseterm.pages.dev |
| Branch Preview URL: | https://test-kill-conflicting-confir.mouseterm.pages.dev |
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.
Nightly survey finding:
dor kill's confirmation guard indor/src/commands/kill.tsrejects whenever the number of supplied confirmation modes is not exactly one:That single guard covers two distinct inputs — zero modes and two conflicting modes — but only the zero-mode case (
kill missing confirmation output) was exercised. The two flags are declared independently (optional: true, no parser-level exclusivity), so--confirm-dangerously --confirm-if-read donetogether reaches this branch at runtime; nothing pinned that behavior.This adds a
kill conflicting confirmation outputtest passing both flags. Its output is identical to the missing-confirmation case (same error, same exit), so the snapshot matches byte-for-byte — the value is guarding the mutual-exclusivity contract against a future refactor that might, say, let--confirm-dangerouslywin silently instead of erroring.Docs-adjacent, no behavior change. Verified locally:
node --test test/*.test.mjs→ 100 pass, 0 fail (the newok 43 - kill conflicting confirmation outputincluded).