teqo-backup/.cursor/rules
Francisco Ignácio Fontoura Solla c68e1d2394 Record the B37 closing triage on B34+ instead of a new ID.
The /simplify triage produced two live debts, and both are about the same pair
of functions the B34+ plan already names in F3, so they landed as F10 of that
plan rather than as an escala-dry-pos-b37: the município-side batch actions
write one município at a time (findByID + update each — ~870 round trips at the
435 ceiling B37 itself raised, but ~52 at the largest real TI, and no test above
a batch of 2), and the two are twins at 2 call sites, one short of the bar. The
common trigger is a "select all"/multi-TI affordance or a third batch on that
side, and F10 records why the bulk-SQL rewrite is not obviously the answer: it
would hand back the scope check that overrideAccess: false gives for free.

This delivery also closed B34+ phases outright, which is worth reading in the
plan rather than inferring from a diff. F2 is done and its prediction was wrong
in a way worth keeping: it stated "o B37 não retira este débito", and B37 read
the same evidence the other way — the ~165 measured lines were not deduplicated
into useChipRowOverflow, they were deleted when both cells became wrappers of
one engine. F9 is done via scopedPortfolioIndex. Half of F3 is done (the three
single-id deltas), and the half that stayed out — the set-with-floor form —
stayed out because seeing the collapsed code confirmed the plan's own inverted
recommendation. F5 and two F6 bullets shrank for the same reason: "written twice
across the two surfaces" stopped having two surfaces.

Also corrects a comment I got wrong in the previous commit: the batch's sort
does not carry the deadlock-avoidance guarantee, since acquireTextAdvisoryLocks
sorts its own keys (C8 batched them into one round trip); it only makes the
apply order stable.
2026-07-28 10:38:56 -03:00
..
projects Record the B37 closing triage on B34+ instead of a new ID. 2026-07-28 10:38:56 -03:00
access-control-advanced.md feat: initial commit 2026-02-14 16:11:51 -03:00
access-control.md feat: initial commit 2026-02-14 16:11:51 -03:00
adapters.md feat: initial commit 2026-02-14 16:11:51 -03:00
campanha-action-feedback.mdc Sync all project docs with the deployed remodel and hardening; compile roadmap 2026-07-24 02:04:45 -03:00
campanha-edit-where-you-see.mdc B34: editable município chips on the leaderships list. 2026-07-27 22:35:19 -03:00
codebase-map.mdc B17: column picker on the seven CampaignTable list surfaces. 2026-07-28 08:25:16 -03:00
collections.md feat: initial commit 2026-02-14 16:11:51 -03:00
components.md Add Post and Tag collections for news and publications 2026-07-15 19:12:11 -03:00
endpoints.md feat: initial commit 2026-02-14 16:11:51 -03:00
engineering-standards.mdc Tooling: pnpm db:doctor + preflight no guard-dev-db (remedios nomeados, deteccao de volume compartilhado pos-corrupcao WAL), madge check:cycles e prettier no CI/pre-push, guard rails de data migration no skill, notas de processo (knip --fix, pipes) e gate atualizado nos docs/rules 2026-07-25 18:02:02 -03:00
field-type-guards.md feat: initial commit 2026-02-14 16:11:51 -03:00
fields.md feat: initial commit 2026-02-14 16:11:51 -03:00
hooks.md feat: initial commit 2026-02-14 16:11:51 -03:00
payload-overview.md feat: initial commit 2026-02-14 16:11:51 -03:00
plugin-development.md feat: initial commit 2026-02-14 16:11:51 -03:00
queries.md feat: initial commit 2026-02-14 16:11:51 -03:00
security-critical.mdc feat: initial commit 2026-02-14 16:11:51 -03:00