Repository navigation
fix(platform): serialize concurrent alias registrations - #4220
Conversation
Independent review — REQUEST CHANGESPR #4220 / TALE-139 / #3593; exact head: Findings
Positive evidenceOwned, loopback-only PostgreSQL 15.18, review cluster/role/application tale543_review, database Reviewer harness: 7 passed / 1 failed (8 checks). Ordinary For the ordinary pair, the organization + normalized host namespace is tenant-scoped. The parameterized 64-bit hash can theoretically collide, but that adds serialization, not a duplicate bypass; it is not mathematically collision-free. One advisory lock is acquired before row/job writes, so this path introduces no multi-advisory-lock ordering cycle. There is no schema/migration diff. Existing duplicate cleanup and mixed old/new writers are not solved by a cooperative application lock. Other local checks: scoped type-aware Oxlint, Oxfmt check and Unrun / not claimed: full platform/workspace suite, standalone compiler gate, browser/E2E, crawler/knowledge effects, full migration chain and mixed-version rollout. CI remains queued/nonterminal at observation; no CI rerun or cancellation. No merge, push, source repair or card movement. GitHub author and credential share a principal, so this independent agent verdict is a PR comment, not a self-review or native human approval. Evidence delivery: |
The 0 of hashtextextended(key, 0) is part of the statement, so the query carries one parameter. The assertion expected two and failed once the test ran.
… pair The lock key repeated the www rule that the duplicate lookup already reads from siteHosts, so the two could drift apart. Both now take the pair's first spelling as the key. Tests hold that the apex and the www spelling share a lock and that the lock stays within one organization.
The one-source-per-website rule now holds when the two spellings are added at the same moment, and its tests say so.
eb3b62e to
7109b7c
Compare
What changed
Verification
bunx oxlint --type-aware services/platform/backend/domains/websites/service.ts services/platform/backend/domains/websites/service.contract.test.tsbunx oxfmt --check services/platform/backend/domains/websites/service.ts services/platform/backend/domains/websites/service.contract.test.tsgit diff --checkeventsource-parserand has a Storybookfile:preset resolution failure. No local PostgreSQL client/server is available for the controlled interleaving reproduction.Closes #3593