Files
Komediruzecki b3dfcd38ff feat(encryption): seal notes, learned patterns and tag-rule criteria
Migration 0033 extends field encryption to the free text beside the
ledger: notes on accounts, savings and retirement goals, housing and
portfolio holdings, loan prepayment notes (owned through their loan),
the patterns auto-categorization learns, and tag-rule criteria. Every
write goes through sealForInsert or sealedUpdate, and every read that
reaches a client, a match or a parse goes through openRows: the
account, goal, housing, holding and loan routes, the accounts export,
the MCP goals read and tag-rule upsert, backup export and restore, and
the backfill, which finds a prepayment's owner through its loan.

A learned pattern was found by `pattern = ?`, which cannot match sealed
text. With a key the profile's mappings are opened and compared in JS,
exactly and lowest id first, as the query found them. Tag-rule criteria
are opened before they are parsed, so listTagRules and autoApplyTagRules
now take the keyring.

Edits leave out a field the body left out (sealedUpdate drops undefined
values). A retirement-goal or housing edit that omitted a field no
longer fails with a 500, and a holding edit without notes no longer
writes the stored value back, which with a key would have sealed the
ciphertext a second time.

Names stay plaintext; the plan doc records why, and what else remains.
2026-09-11 10:18:29 +02:00
..