Skip to content

fix(statements): parser and finance review follow-ups (#57) - #245

Merged
JOY (JOY) merged 6 commits into
devfrom
claude/57-review-followups
Nov 18, 2026
Merged

JOY (JOY) merged 6 commits into
devfrom
claude/57-review-followups

Conversation

@JOY

@JOY JOY (JOY) commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Refs #57

Follow-up to #243 (merged as eca23dc): the should-fix items of the PO's Money review, app part. The database part is DOS/DOS.Me (migration 20261122100000_give_statement_review_followups), which must reach a database first. Until then the blocks list reads empty. The Give Product Owner merges.

Partial exports the Techcombank Business parser still took as full

After review, the checks are fail-closed. Every row above the table is read whole. The rule removes:

  • the period's own dates, with any time in the same cell;
  • a print or export time, which must be one moment: one date and at most one time;
  • bare dates;
  • exact whole-day ranges.

Any time left (hour-only, 14.30, 8 giờ, AM/PM, full-width colons) makes the file partial. A time is never read across cells as the period's end. Names such as "3H" or "4G" also read as a time, which refuses a full file: that is the fail-closed choice.

The first version of this PR checked these items one by one:

  • (a) A labelled time cell on the period row ("Giờ/Time: 08:00 - 14:30") makes the file partial. Every cell of the period row outside the period itself is checked, and cells after a "Ngày giờ in/Printed on" label are checked too; only the print time itself is skipped.
  • (b) More range separators: ~, to, →, /, besides -, –, — and "đến".
  • (c) The time label may sit anywhere in a cell ("Khoảng thời gian/Time range", "Khung giờ"). Print-time labels are left out.
  • Nits:
    • "11:59 PM" ends a day and "12:00 AM" starts one.
    • A whole-day range ("00:00 - 23:59", "12:00 AM - 11:59 PM") counts as full.

Finance review

  • /admin/statements gets a section "Chiến dịch bị chặn tin cậy sao kê". It lists campaigns whose trust a rejected row blocks (statement_trust_blocks), each with a "Khôi phục tin cậy" form (note required) that calls restore_campaign_statement_trust. The role is checked first with the user's own token.
  • The restore passes the number of rejections the staff member saw; a newer rejection refuses it.
  • The blocks list is read on the server for the signed-in staff member. A failed read shows "unavailable", never "none blocked".
  • The amount fields accept "9.999.999.999.999 VND" (maxLength 32).
  • The audit trail labels restores.

Review record

A fresh-context subagent reviewed this over three rounds, with probe files of over 140 inputs. Round 1 found 5 MUST_FIX (whole-day lookalikes, unlabelled or hour-only times, print-label skips) and SHOULD_FIX items. Round 2 found print-value ranges and address false refusals. Round 3 found no MUST_FIX; its two remaining false refusals were fixed in 80bfc63.

Checks

  • Locally: 1863 tests, tsc, lint and build pass. New tests cover every input the PO listed, the blocks section, and the restore action.

🤖 Generated with Claude Code

- TCB: a time label anywhere on the period row or a row above the table
  with a time (Giờ/Time: 08:00 - 14:30, Khung giờ, Khoảng thời gian),
  ranges with ~ to → / , and cells after a print time make the export
  partial; whole-day ranges (00:00 - 23:59) and 12:00 AM / 11:59 PM are
  whole days.
- /admin/statements: campaigns whose trust a rejection blocks, with a
  restore action (restore_campaign_statement_trust, note required);
  amount fields take 9.999.999.999.999 VND.

Needs DOS.Me migration 20261122100000_give_statement_review_followups.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@JOY JOY (JOY) added the line:money Product line: money label Nov 18, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

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.

@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
give Ready Ready Preview Nov 18, 2026 3:18pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4aed459c-c613-47eb-955e-a3f530d0f610

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

dos[bot]
dos Bot approved these changes Nov 18, 2026

@dos dos Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⏱️ Code Review completed (9 eligible files · 29,786 chars · 2 model call(s) · 1 PR unit(s))

Whole diff with bounded context at base eca23dc / head c41b800.

✅ CLEAN_PASS: Complete diff reviewed

Context investigation was bounded to the explicitly requested snapshot paths.

… states a failed read (#245 review)

- TCB: rows above the table are checked whole. After the period's own
  dates (and the times read with them in their cells), print/export times,
  bare dates and exact whole-day ranges are taken out, any time left
  (hour-only, 14.30, 8 giờ, 2 PM...) makes the export partial. A time in a
  cell after the to-date is no longer read as the period's end time.
- listTrustBlocks returns null on a failed read; the page says so instead
  of 'none blocked'. Restore message no longer promises automatic uploads.
- Tests: every probe of the review, the action's role and note limits.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
dos[bot]
dos Bot approved these changes Nov 18, 2026

@dos dos Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⏱️ Code Review completed (9 eligible files · 37,821 chars · 3 model call(s) · 2 PR unit(s))

Whole diff with bounded context at base eca23dc / head 20c5948.

✅ CLEAN_PASS: Complete diff reviewed

Context investigation was bounded to the explicitly requested snapshot paths.

dos[bot]
dos Bot approved these changes Nov 18, 2026

@dos dos Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⏱️ Code Review completed (9 eligible files · 39,846 chars · 3 model call(s) · 2 PR unit(s))

Whole diff with bounded context at base eca23dc / head c6e2828.

✅ CLEAN_PASS: Complete diff reviewed

Context investigation was bounded to the explicitly requested snapshot paths.

…via the server with the actor (#245)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@dos

dos Bot commented Nov 18, 2026

Copy link
Copy Markdown

⏸️ DOS Review: Automatic Review Limit Reached

DOS 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.

@JOY

Copy link
Copy Markdown
Contributor Author

PO acceptance: merge at 040f877. Money second review: no blocker; all earlier parser bypasses now partial; restore action authorized correctly (session, UUID/int/note validation, is_admin with user token, service RPC with session actor). Remaining: comma-before-time and footer-row bypasses go to a small follow-up; false refusals of names/addresses with time-like text are checked against JOY's real Techcombank samples. DOS Code Review shows its round cap. DOS/DOS.Me#1774 merged first.

@JOY
JOY (JOY) merged commit bfc2a44 into dev Nov 18, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

line:money Product line: money

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant