Repository navigation
feat(statements): refuse partial-day exports and add finance review of organizer uploads (#57) - #243
Conversation
…f organizer uploads (#57) - Parser contract: ParsedStatement.coverage (full, ends_early, partial), required for every parser. normalizeStatement refuses a partial export (STATEMENT_PARTIAL_EXPORT) unless it covers today alone, and an export that ends early unless its last day is today. The Techcombank Business parser reads times on its period line; a file without a period is partial. - /admin/statements: finance review threshold (set_statement_review_threshold, note required), reject wording for finance_review rows, labels for the balance_confirmed system resolution and its audit entries. - /me/statements: tells organizers which uploads wait for finance review. Needs DOS.Me migration 20261122090000_give_statement_import_followups. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
There was a problem hiding this comment.
⏱️ Code Review completed (15 eligible files · 46,753 chars · 4 model call(s) · 2 PR unit(s))
Whole diff with bounded context at base 854bda3 / head 2872df8.
✅ No verified defects
3 possible issue(s) could not be grounded in or verified against the snapshot source, so they are not published.
Context investigation was bounded to the explicitly requested snapshot paths.
…review wording (#57) - TCB: any other time-like text on the period line (08h00, lúc 14:30, a Giờ/Time cell, AM/PM) makes the export partial. - A partial or early-ending export of today must be printed before the next midnight. - Wording: organizer rows wait until the campaign has its first approved row, not only on the first upload. Threshold input takes đ/VND suffixes and shows separators. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ges on other rows (#57) - Times written 14g30 / 14.30, and a Từ giờ/Đến giờ row above the table, make the export partial. - Other text on the period row (print time, account name, address, amounts) no longer turns a full statement into a partial one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ing cell (#57) Co-Authored-By: Claude Opus 5.5 <[email protected]>
⏸️ DOS Review: Automatic Review Limit ReachedDOS Code Review already reviewed 3 commits of this pull request automatically, the limit for one pull request, so this commit was not reviewed automatically and nothing was charged. Please step back before pushing another fix: a pull request that needs this many review rounds usually needs a rethink of its approach or a smaller scope, not one more patch. When you are ready, a maintainer can comment /review to review the current commit. |
…r time zone (#57) Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Partial exports are refused outright, today's included; an export that ends early only when its last day is today and it was printed that day. - A file without a print time stages its last day as unfinished (export time capped at the last second of that day). - TCB: a time range in a cell after the period, or a Thời gian/Time row with a time above the table, makes the export partial; 23:59:SS (XLSX date cells) ends a full day. - /me/statements notice only for uploaders who own an account; getReviewThreshold logs the error code. - Tests: Hanoi/UTC day boundary, export time, ranges, date cells, the threshold section, review wording and the notice. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…es (#57) - JOY 2026-11-18: /admin/statements shows and changes the daily limit (set_statement_review_daily_limit) next to the per-row threshold; getReviewSettings reads both; the organizer notice and the finance_review label mention it. - TCB: a Thời gian/Time/Giờ row above the table with any time is partial; a period date cell from 23:59:59.5 stays on its day (reader clamps only beyond Excel float error). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
PO acceptance: merge at fb0a898. Money second review re-check: all original failing inputs handled, no blocker. Remaining should-fix items (labelled time cells on the period row, other range separators, non-leading time labels; maxLength still 20) are fail-safe through the balance chain and go to a follow-up, checked against JOY's real Techcombank samples. DOS Code Review shows its round cap, not a finding. DOS/DOS.Me#1770 merged first. |
Refs #57
Statement import follow-ups, app part (line:money). The database part is DOS/DOS.Me#1770 (migration
20261122090000_give_statement_import_followups). It must reach a database before this app code uses the new RPC and table. Until then the threshold reads as unknown and the notices are hidden. The Give Product Owner merges (second Money review).Partial-day exports (parser contract)
ParsedStatement.coverageis now required:"full","ends_early"or"partial". Every parser must state it from the file itself.normalizeStatementrefuses withSTATEMENT_PARTIAL_EXPORT:This applies to every parser, before anything is recorded.
tcb-business, feat(statement-parsers): Techcombank Business export parser (#17) #231):partial, an end before 23:59 makes itends_early;partial.The guide shows dates only, so real samples still have to confirm this.
Finance review of organizer uploads (JOY's decision, 2026-11-18)
/admin/statements:set_statement_review_threshold,set_statement_review_daily_limit, audited);finance_reviewrows appear in the existing queue: approve = "Nhập thành giao dịch mới" (or "Là giao dịch đã ghi"), reject = "Không phải giao dịch thật", with review wording;balance_confirmedimports (actor "Hệ thống") and threshold changes./me/statements: tells account owners (not staff uploading for others) that a campaign's first upload, and every transaction at or above the threshold, waits for finance.finance_reviewand resolutionbalance_confirmed.Checks
vitest: 123 files, 1790 tests pass.tsc,lint,buildpass.Review record
A fresh-context subagent reviewed the diff over 5 rounds, each one checked against its own probe files:
Known limits: the Techcombank export layout is still unconfirmed (no real sample), and every unknown time form is treated as partial (fail closed). Payloads recorded before this deploy are replayed by the cron without the coverage check.
🤖 Generated with Claude Code