01a04e04 - Update only the name on provision upsert - #75
Conversation
POST /debug/accounts no longer rewrites the whole account row when the Lightning Address already exists. Postgres SET name is atomic so a concurrent role or rules write is not lost.
Look up and mutate the in-memory row without yielding. Fail the provision request when the persisted name is not the requested one.
c6f0fb1 to
185a688
Compare
POST /debug/accounts already returns 500 when the stored name is not the requested name. SPEC and handbook now say so.
|
EN: DE: DetailsPass 1: handbook/SPEC did not mention the 500 when a name-only update returns a row whose name is not the requested name. Documented in SPEC.md, endpoints.md, and functions.md. Pass 2: both dimensions 0 findings at 02827a1. Earlier correctness notes (in-memory lookup without yielding, fail-loud when persisted name mismatches, SET name = $2 only) remain in the code. Comments: none open. Mergeable is MERGEABLE. CI check "Typecheck, Lint, Handbook, E2E-check, Test (100% coverage), Build, E2E" success on the same head. |
EN:
POST /debug/accounts now updates only the display name when the Lightning Address already exists. A concurrent role or rules write is no longer overwritten.
DE:
POST /debug/accounts ändert bei bestehender Lightning-Adresse nur noch den Anzeigenamen. Ein gleichzeitiges Role- oder Rules-Write geht nicht mehr verloren.
Details
Follow-up after #65. AuthStore.updateAccountNameByLightningAddress sets name with lower(trim) match. Postgres UPDATE SET name = $2. In-memory mutates only name. Create-race fallback uses the same path. Tests cover a moderator row with rulesAgreedAt.