Repository navigation
feat(ledger): flag a learned suggestion on an unusually large line; batch accept skips it - #2016
Conversation
…counterparty's usual Its basis names the amount and the largest posted before it, the line carries suggestion_caution, and accept-suggestions skips it as needs_review so it is classified on its own.
|
Change classification: normal — platform or application code changed. A normal change carries a documented automated review on this pull request before merge, in place of a second human approver. The |
|
@claude please review this PR |
|
Claude finished @jfrench9's task in 25s —— View job Review of #2016: unusual-amount caution on learned suggestionsVerdict: looks good to merge once What I checked
Notes (non-blocking)
|
Summary
A learned suggestion on a bank line now says when the line is far larger than anything that counterparty has posted, and a batch accept leaves such a line to be classified on its own. Found with the ledger benchmark: weaker models took a vendor's usual account, in bulk, on a line that needed a split.
Changes
operations/roboledger/classification.py: when a line is more than three times the largest of the counterparty's posted lines (at least two posted),suggestion_basisnames both amounts and the line carriessuggestion_caution: unusual_amount. Applies to the learned default only; the open-item and bank-category rungs are unchanged.operations/roboledger/commands/suggestions.py:accept-suggestionsskips a line that carries a caution, with the reasonneeds_reviewand the basis as its detail.operations/event_block/commands.py:suggestion_cautionjoins the metadata keys a caller cannot set.models/api/extensions/agent.py,middleware/mcp/tools/instructions.py,docs/technical/Event-Block-Reference.md: describe the caution and the new skip reason.Worth a close look: the threshold (three times, two posted lines) is a first setting, not a measured one.
Breaking Changes
None.
needs_reviewis a new value of the free-textreasonon a skipped line;suggestion_cautionis a new metadata key. A line that a batch took before may now be skipped.Testing
just test-all: 18,683 passed, 44 skipped, 2 xfailed; lint, format and type checks clean.Certification
🤖 Generated with Claude Code