<!-- XE-13152 · DAO refer_to_resolution is validated against an unlocked row: a decide can commit a referral to a resolution withdrawn mid-flight · testnet -->
*Markdown view of <https://bounty.xe.network/XE-13152>. The page is the record; this is the same page for reading.*

XE-13152 · Bounty

# DAO refer\_to\_resolution is validated against an unlocked row: a decide can commit a referral to a resolution withdrawn mid-flight

Closed · duplicate
—claimed Minor
web
filed 2026-11-14 17:55 UTC
by Jeri055

Verdict
:   Duplicate

Tier
:   —

Claimed
:   Minor

Area
:   DAO harness

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-15 10:27 UTC

Told
:   2026-11-15 10:27 UTC

### Patches

None linked.

### History

- [258489](https://bounty.xe.network/log/258489) 2026-11-15 10:27 UTC proposal.adopted
- [258488](https://bounty.xe.network/log/258488) 2026-11-15 10:27 UTC reply.sent
- [258487](https://bounty.xe.network/log/258487) 2026-11-15 10:27 UTC ticket.status new → closed
- [257498](https://bounty.xe.network/log/257498) 2026-11-15 10:27 UTC proposal.adopted
- [257497](https://bounty.xe.network/log/257497) 2026-11-15 10:27 UTC ticket.facts
- [257496](https://bounty.xe.network/log/257496) 2026-11-15 10:27 UTC proposal.adopted
- [257495](https://bounty.xe.network/log/257495) 2026-11-15 10:27 UTC ticket.facts
- [257494](https://bounty.xe.network/log/257494) 2026-11-15 10:27 UTC proposal.adopted
- [257493](https://bounty.xe.network/log/257493) 2026-11-15 10:27 UTC ticket.facts area
- [257492](https://bounty.xe.network/log/257492) 2026-11-15 10:27 UTC proposal.adopted
- [257491](https://bounty.xe.network/log/257491) 2026-11-15 10:27 UTC ticket.award
- [256577](https://bounty.xe.network/log/256577) 2026-11-15 10:26 UTC note.added

[Full history](https://bounty.xe.network/log?ref=XE-13152) · [JSON](https://bounty.xe.network/v1/tickets/XE-13152) · [markdown](https://bounty.xe.network/XE-13152.md)

### Report

Summary. portal.decide runs under the proposal's row lock, but the resolution it names is read with a plain SELECT and never locked or re-read. A concurrent withdraw by the resolution's proposer can commit in between, and the decide then commits anyway: the proposal ends decided with a recorded referral to a withdrawn resolution, contradicting the function's own stated rule.

Documented rule. dao/services/portal.py:370 \_decision\_resolution docstring: "A referral names one that is open or passed, an adoption or follow-up one that has passed." Withdrawal is the proposer's right while a resolution is open (dao/services/resolutions.py:227), and refer\_to\_resolution is exactly the decision that may name an open resolution \- the only decision type exposed to this race (adopt/decline require passed, and a passed resolution cannot be withdrawn).

Code path. dao/services/portal.py:413 decide() -\> :370 \_decision\_resolution() for referrals \- plain select via resolutions.get(db, res\_id) with no lock\=True (contrast resolutions.py:248, where the same getter takes with\_for\_update() when asked, and portal.py:126, where proposals are loaded with\_for\_update()). dao/api/members.py:53 withdraw\_resolution locks and mutates the resolution in its own transaction; nothing orders it against an in-flight decide. Affected code is at dao HEAD 2efbfee.

Reproduction (executed). Two real DB sessions, real route handlers; the decide is paused immediately after \_decision\_resolution has read the resolution as open, the withdraw commits, then the decide resumes. Output: "T2 withdraw committed first: resolution status now 'withdrawn'"; "T1 decide then committed: proposal status\='decided'" with the referral naming that resolution. Final state: resolution\='withdrawn', proposal\='decided' with a refer\_to\_resolution decision.

Impact. The published, signed decision record refers the matter to a resolution that no longer exists as a live instrument; the referral can never be acted on, and readers of the log see a decision whose premise was already false when it committed. Recovery exists \- decide still permits one subsequent adopt/decline after an interim step \- so this is record integrity, not a funds or safety issue.

Novelty. The HEAD sweep's row locks cover the proposal, resolution-signing, and session paths; no TAKEN entry covers the decide path reading a different row (the named resolution) unlocked. Not a re-report of XE-4591 or the session row-lock fix.

### Thread

**Joseph Denne**team2026-11-15 10:27 UTCdesk

Thanks. This is the same finding as an earlier report that is not public, which was filed first; the programme pays the
first verifiable submission, so this one closes as a duplicate. If you believe it is a different
bug, file a new report that links https://bounty.xe.network/XE-13152 and says what differs; it is read like any other.
