githubnext/chopinPublic

Let's compose rich plans together

Fix anchor_plan persistence race that disconnects the app #237

MergedMaggieAppletonmerged 1 commit intomainfromrefs/pull/237/head
  1. 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

    ![Before and after: anchor_plan awaits the document write before sidecar persistence and anchor broadcast](https://github.com/user-attachments/assets/034cd9d8-1254-4320-98a4-7e763f9725b8)

  2. MaggieAppletonmerged f75d6d693e89last month on GitHub

  3. MaggieAppletonclosedlast month on GitHub

  4. MaggieAppletonhead-ref-deletedlast month on GitHub