Repository navigation
CSV export shows raw cents instead of a formatted amount (#138) - #143
Closed
Param-Harrison wants to merge 3 commits into
Closed
Param-Harrison wants to merge 3 commits into
Param-Harrison wants to merge 3 commits into
Conversation
Param-Harrison
marked this pull request as ready for review
October 8, 2026 20:56
Contributor
Author
|
/factory revise add a test for an amount under one dollar, like 5 cents |
Param-Harrison
marked this pull request as draft
October 8, 2026 20:59
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
exportCsvinsrc/csv.tsnow writes theamountcolumn throughformatCents, so1000exports as10.00. The HTTP export and the CLIexportcommand share this code, so both are fixed.Closes #138
Plan
Plan comment (rev 1, see the issue thread):
flat-4bamounts export as45.00,12.00,30.00, verified bybun test tests/csv.test.ts.1005becomes10.05,5becomes0.05), verified bybun test tests/csv.test.ts.bun test tests/routes.test.ts tests/cli.test.ts.make check.Left out on purpose (non-goals): no change to
src/money/, to the CSV header, column order, escaping or SQL, to routes, the CLI or the schema, or to protected paths. No currency symbol or locale formatting.Gate evidence
FACTORY_GATES: status=GREEN passed=3 failed=0 skipped=1 failed_gates=audit
Verify verdict
Verdict: pass (see the verdict comment in the issue thread). AC-1 to AC-4 all pass, with no reviewer findings. Both new tests fail when
src/csv.tsis reverted: they receive["4500","1200","3000"]and["1005","5"], and these are assertion failures, not compile errors.Risk and rollback
Low: the change is confined to one non-protected module, with no schema or API-shape change. Roll back by reverting this PR. Only the amount value's formatting changes, and no data is migrated.
Factory run
5 stage runs, 3m 27s, $0.93.
Went well
Needed help