Repository navigation
CSV export shows raw cents instead of a formatted amount (#190) - #191
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 13, 2026 20:55
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 13, 2026 20:57
Param-Harrison
marked this pull request as ready for review
October 13, 2026 21:00
Contributor
Author
|
Closing as stale: superseded by the current factory runs; the issue stays open to be re-run. |
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
The CSV export's
amountcolumn now prints a formatted decimal (45.00) instead of raw integer cents (4500), by passing each amount throughformatCents. The web route and the CLIexportcommand both pick this up throughexportCsv.Closes #190
Plan
Plan comment (rev 1):
45.00,12.00,30.00onflat-4b. Checked bybun test tests/csv.test.ts("formats the amount column as a decimal").1005→10.05,7→0.07). Checked by "keeps the cents in non-round amounts".make check.Left out on purpose (non-goals): no change to
src/money/(including the separatesplitCentsremainder defect), the export route orsrc/auth/**, the CSV shape,public/index.html,src/cli.tsor the schema.Gate evidence
FACTORY_GATES: status=GREEN passed=3 failed=0 skipped=1 failed_gates=auditVerify verdict
Verdict comment on issue #190: pass on all four ACs, no reviewer findings. The new tests bite: with
src/csv.tsreverted, "formats the amount column as a decimal" receives4500, 1200, 3000and "keeps the cents in non-round amounts" receives1005, 7. Both fail on the assertion, not on a compile error.Noted by verify, not part of this change:
csvEscapedoes not neutralise cells starting with=,+,-or@and does not quote\r. This deserves its own issue.Risk and rollback
Low: a change confined to one non-protected module, with no schema or API-shape change. Only the values in the amount column change, which is the fix itself. Roll back by reverting this PR; nothing is stored in a new format.
Factory run
Proof: the new test fails without the change.
5 stage runs, 2m 42s, $0.93.
Went well
Needed help