Policy tables
A published amount table is insert-only. Reviews save a copy so later publications do not silently change their calculations.
Publishing
GET and POST policy require the report capability: manager, admin,
statistics. policySchema validates the table’s ID, effective month, household
arrays, utility amounts, percentages, threshold, and optional response days. Household
amount arrays have 20 entries. Publication uses an advisory transaction lock plus an
insert that requires a month later than all published rows. Duplicate IDs/months or older
dates fail.
The UI clones the latest table into a draft and publishes it as a new row. The current UI has a specific October 2026 threshold adjustment; treat it as implemented demo behavior, not a general annual-update mechanism.
Binding versus applying rules
New intake selects the latest published table effective on or before the sample month and
saves policyId plus the table. Refresh preserves an existing saved policy.
resolveReviewPolicy reads that copy and rejects mismatched IDs or an
unavailable noninitial table. listPolicies supplies the initial in-memory
policy if its row is absent.
apply_rules is different: admin/statistics can update calcVersion and
checkVersion while a review is Active or Needs Changes. It clears Final and checks, but
does not move the review to a newly published amount table. There is currently no general
command to perform that table reassignment.
Synthetic tables
Seed FFY 2026 uses initial workbook amounts. Other seed FFYs use clearly marked synthetic copies with adjusted identities/effective months. Seeding skips equal published tables and refuses conflicting content. When adding rules, preserve saved-copy semantics and historical-version tests.