Repository navigation
Exporting an unknown group prints an empty CSV (#195) - #197
Merged
Merged
Conversation
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
splitbill export <unknown-group>now printsno such group: <id>(likebalancesdoes) and exits non-zero, instead of printing an empty CSV.Closes #195
Plan
Plan comment (rev 1,
plan-comment.mdon the issue thread):run(["export", "no-such-group"], db)returns exactlyno such group: no-such-group, verified bybun test tests/cli.test.ts -t "export reports an unknown group"bun test tests/cli.test.ts -t "export exits non-zero for an unknown group"bun test tests/cli.test.tsmake checkNon-goals kept: no change to
src/csv.tsor its output format, no change tosrc/routes/, no schema or protected-path edit,run(argv, db): stringsignature unchanged.Side effect, called out in the plan:
balanceswith an unknown group now also exits non-zero.Gate evidence
FACTORY_GATES: status=GREEN passed=3 failed=0 skipped=1 failed_gates=auditVerify verdict
Verdict comment (
verdict-comment.mdon the issue thread): pass, all four ACs. The test that bites,export reports an unknown group, fails on the base branch (Received"date,payer,description,amount") and passes here (7 pass, 0 fail).Two optional
couldfindings, not blocking: the exit code is derived from the output prefix, and the error goes to stdout rather than stderr.Risk and rollback
low: only
src/cli.tsandtests/cli.test.tschange, with no route, schema or protected path touched. Roll back by reverting this PR's single commit.Factory run
Proof: the new test fails without the change.
5 stage runs, 5m 54s, $0.87.
Went well
Needed help