e97532cc
test(db): guard OpenProposal branch SQL against core.ProposalBranch drift (spec-wcr #1)
OpenProposal allocates a proposal's id and branch in one INSERT, so it cannot call core.ProposalBranch — it spells the name out in SQL as BranchPrefix || id::text. That is a third derivation of the branch name sharing only the prefix constant with the canonical function; a change to how core.ProposalBranch formats the id would leave the SQL silently producing a different name. Pin the coupling with a pure unit test so the divergence fails loudly instead of in production. Part of spec-wcr (loose ends). Pure test, no behavior change.
Eugene Blikh <bigbes@gmail.com> — 2026-07-24 17:03:25 UTC
Commit e97532ccd54a6aacc597e9db1648e580e2936132 —
view raw patch
Parent(s):
a0fa81b3
| File | Status | + | − |
|---|---|---|---|
db/proposal_test.go
|
M | +29 |