Release v1.28.2 — finance money-integrity guards - #127
Open
domsteil wants to merge 5 commits into
Open
Conversation
General ledger (sqlite + postgres + kernel executor): - auto_post_* is idempotent: a source document that already has a non-voided journal entry returns that entry instead of posting twice - post/void of a journal entry requires its period to be open (the kernel ledger.post path rejects with commerce.ledger.period_not_open) - income statement excludes closing entries, so a closed period's P&L no longer reads as zero - run_period_close refuses while a posted closing entry stands for the period; re-closing a reopened period requires voiding it first Accounts receivable (sqlite + postgres): - apply_payment_to_invoices is bounded by the payment's own amount (existing applications counted), rejecting over-application - payments/credit memos cannot be applied to voided/written-off invoices - write-offs validated: positive and no more than the balance due; credit memos must be positive Accounts payable (sqlite + postgres + core model): - three-way match aggregates billed quantity per PO line, so duplicating a bill line can no longer slip over-billing past the match - clear_payment, cancel_bill, dispute_bill, approve_bill are status-guarded transitions (0 rows -> Conflict, not silent success) - count_payments applies the same date filters as list_payments 29 new tests (gl/ar/ap_money_guards_test, kernel closed-period rejection, three-way match aggregation); ledger_simulation updated to model void-then-re-close. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PCC33Xf4iAmBnkHFDDPBLu
Mechanical bump 1.28.1 -> 1.28.2 across all release surfaces (scripts/release-bump.sh), CHANGELOG entry, and README "What's New" section for the finance money-integrity guards. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PCC33Xf4iAmBnkHFDDPBLu
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PCC33Xf4iAmBnkHFDDPBLu
spentThisMonth is calendar-bucketed, so the test's daysAgo(1)/(2) entries fall into the previous month on the 1st and 2nd of every month and the assertion failed (coverage went red on Sep 1). getBudgetForecast accepts an optional injectable `now` (defaulting to the current time, fully backwards-compatible) and the test pins it mid-month. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PCC33Xf4iAmBnkHFDDPBLu
CodeQL (rust/cleartext-logging) traces account-derived data through the error values into the panic messages. The assertions only need the Result variant; the messages stay descriptive without the payload. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PCC33Xf4iAmBnkHFDDPBLu
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
auto_post_*, period-open guards on post/void (incl. kernelledger.post, rejectingcommerce.ledger.period_not_open), income statement excludes closing entries, double-period-close guardTesting
🤖 Generated with Claude Code
https://claude.ai/code/session_01PCC33Xf4iAmBnkHFDDPBLu