fix(balance): scope v16 abort guard to convertible accounts (#228) #229
Open
maximus
wants to merge 1 commit from
issue-228-v16-guard-convertible-scope into main
pull from: issue-228-v16-guard-convertible-scope
merge into: maximus:main
maximus:main
maximus:issue-187-balance-cleanup-post-184-185
maximus:issue-188-webkit-date-picker-7-inputs
maximus:issue-180-postcss-audit-fix
maximus:issue-190-restructure-settings-pages
maximus:issue-161-smoke-scaffold
maximus:issue-171-ci-drop-push-trigger
maximus:issue-169-asset-type-balance-categories
maximus:issue-67-feedback-widget
maximus:issue-97-cartes-page
maximus:issue-96-compare-refactor
maximus:issue-51-compte-maximus-oauth
maximus:issue-46-license-commands-entitlements
maximus:issue-48-gate-auto-updates
maximus:issue-47-license-ui-card
maximus:fix/simpl-resultat-54-argon2id-pin
maximus:fix/simpl-resultat-59-bump-vite
maximus:issue-43-update-picomatch
maximus:fix/simpl-resultat-41-category-time-report-filter
maximus:fix/simpl-resultat-31-dashboard-month-dropdown
maximus:fix/simpl-resultat-29-budget-visual-adjustments
maximus:fix/simpl-resultat-23-dashboard-category-ordering
maximus:fix/simpl-resultat-16-prev-year-budget
maximus:fix/simpl-resultat-19-tooltip-transparency
maximus:fix/simpl-resultat-17-remove-piechart-title
maximus:fix/simpl-resultat-16-budget-previous-year
1 commit
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
cf3e06c910 |
fix(balance): scope v16 abort guard to convertible accounts (#228)
The v16 belt-and-suspenders abort guard keyed on `a.symbol IS NOT NULL` instead of convertibility. A simple-category account carrying a residual symbol (left by a priced→simple recategorization; AccountForm renders the symbol field unconditionally) has quantity-NULL lines by construction; they satisfied the over-broad predicate, so the guard inserted 0, the CHECK(ok = 1) failed, and the whole v16 migration aborted — the app no longer started for that profile. JOIN balance_categories and require `c.asset_type IS NOT NULL` in the guard subquery, in all three copies (Migration v16, V16_SQL mirror, and the V16_CORRUPT injected-failure test, kept statement-equivalent). Add a regression test seeding a simple account with a residual symbol plus a quantity-NULL line: v16 now applies without abort and leaves the account intact (not converted, no security/holding, qty/value preserved). Modifying v16 in place is safe: it has never shipped in a tagged release (v0.9.1 stopped at v13; v14-v16 are unreleased), so no persisted profile carries its checksum yet. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |