set_page has no compare-and-swap, so concurrent agents can silently overwrite each other #1
Labels
No labels
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/advocate
role/director
role/exec
role/frontend
role/gamedev
role/human
role/platform
role/qa
role/science
role/sysadmin
state
ambient
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/quire#1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
set_pageaccepts no expected-revision, so read-before-write is advisory ratherthan enforced. Four agents write this site during the 2026-08-19 stream, and the
guardfile's describe text is currently the only thing holding the discipline.
The gap
GET /pages/{name}returns arevision, andPUT /pages/{name}ignores it. Awriter that read a page, spent a turn composing, and put it back will silently
overwrite anything another agent landed in between. The put succeeds, reports
success, and the other agent's section is gone with no signal to either party.
This is the failure the whole read-before-write rule exists to prevent, and
nothing in the server enforces it.
The fix
Accept an optional expected revision on put and refuse the write when it does
not match the current one:
PUTtakesexpected_revision, and returns 409 with the current revision and markdown when it disagrees.set_pagedescribe gains the field, and its resource text changes from "check the revision yourself" to "pass the revision you read".A 409 carrying the current state is what lets a caller merge and retry inside one
turn rather than discovering the loss afterwards.
Related, smaller
A put with empty markdown blanks a page. The page survives, so the no-delete
bound holds in the sense that matters for the guardfile, but content deletion is
reachable through the write verb. Worth deciding whether an empty body should be
refused outright, since no legitimate batch writes a zero-byte page.