Repository navigation
CSV export shows raw cents instead of a formatted amount (#62) - #74
Open
Param-Harrison wants to merge 2 commits into
Open
Param-Harrison wants to merge 2 commits into
Param-Harrison wants to merge 2 commits into
Conversation
Param-Harrison
marked this pull request as ready for review
October 8, 2026 22:11
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
exportCsvnow writes theamountcolumn throughformatCents(e.g.45.00) instead of raw integer cents (4500). The CLIexportcommand shares this code, so it is fixed too.Closes #62
Plan
Plan comment (rev 1,
.factory/runs/issue-62/plan-comment.md):amountequalsformatCents(amountCents). Verified bybun test tests/csv.test.ts.bun test tests/csv.test.ts tests/routes.test.ts tests/cli.test.ts.make check.Non-goals, all respected: no change to
src/money/**, the CSV header or column set, routes, CLI, db or protected paths, orcsvEscape(the\rquoting gap is left for another issue). No float arithmetic on money.Gate evidence
FACTORY_GATES: status=GREEN passed=3 failed=0 skipped=1 failed_gates=auditVerify verdict
Verdict comment (
.factory/runs/issue-62/verdict-comment.md): pass, with AC-1, AC-2 and AC-3 all passing.Test that bites: with
src/csv.tsrestored frommain,exportCsv formats the amount column with formatCentsfails (expected["45.00","12.00","30.00"], received["4500","1200","3000"]). It passes with the fix.Two non-blocking reviewer notes: the test ordering has no
idtiebreaker, and there is no test for negative or sub-dollar amounts.Risk and rollback
Low. The change is confined to
src/csv.tsplus a newtests/csv.test.ts, with no schema or API-shape change. Roll back by reverting the PR; nothing is persisted, so there is no data migration.Factory run
5 stage runs, 3m 35s, $1.08.
Went well
Needed help