Fix anchor_plan persistence race that disconnects the app #237
- MA
When the Planner moves a decision with `anchor_plan`, its document write and sidecar write can overlap using the same storage revision. The resulting conflict shuts down the server and disconnects the local app.
Await the document publication before persisting sidecar state and broadcasting anchors. Extend the existing decision-placement test to hold publication pending and verify that persistence waits. Remove the resolved ordering gap from the architecture notes and agent instructions.
Validation: `bun test` (1,792 passed, 2 PostgreSQL tests skipped), `bun run types`, and `bun run ci` passed. Existing lint warnings remain.
### Write ordering

MaggieAppletonmerged f75d6d693e89last month on GitHub
MaggieAppletonhead-ref-deletedlast month on GitHub