Skip to content

01a04e04 - Update only the name on provision upsert - #75

Merged
TaprootFreak merged 3 commits into
developfrom
01a04e04-provision-name-only
Aug 30, 2026
Merged

01a04e04 - Update only the name on provision upsert#75
TaprootFreak merged 3 commits into
developfrom
01a04e04-provision-name-only

Conversation

@TaprootFreakAI

Copy link
Copy Markdown
Collaborator

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.

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.
@TaprootFreakAI
TaprootFreakAI force-pushed the 01a04e04-provision-name-only branch from c6f0fb1 to 185a688 Compare August 30, 2026 14:30
POST /debug/accounts already returns 500 when the stored name is not
the requested name. SPEC and handbook now say so.
@TaprootFreakAI

Copy link
Copy Markdown
Collaborator Author

EN:
Ready after 2 review passes.
POST /debug/accounts updates only the display name when the Lightning Address already exists.

DE:
Bereit nach 2 Review-Durchläufen.
POST /debug/accounts ändert bei bestehender Lightning-Adresse nur den Anzeigenamen.

Details

Pass 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.

@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review August 30, 2026 15:04
@TaprootFreak
TaprootFreak merged commit 8cf8ad6 into develop Aug 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants