githubnext/chopinPublic

Let's compose rich plans together

feat(mcp): support revision-guarded document updates #158

Mergedlavaman131merged 3 commits intomainfromrefs/pull/158/head
  1. LA

    ## Summary

    Fixes #156.

    - Add `update_document` with UUID/canonical-URL lookup, revision-guarded full-source replacement, MDX validation, and push/admin authorization. - Preserve Questionnaire, Decision, and Research projections. Refuse stale revisions, archived documents, active implementation locks, and changed payloads under an existing idempotency key. - Stage edits against existing Yjs history and persist document, sidecar, and replay results before publishing to collaborators. Serialize updates with room lifecycle operations and preserve concurrent chat/comments. - Record MCP client and revision provenance and show client-attributed change details without a Planner cursor. Document the API and replay-record retention. - Update the authoring and implementation skills with revision-conflict reconciliation, exact idempotent retries, protected projections, and graph-release guidance. - Fix the existing ownership test's expired fixed-date fixture without changing authentication behavior or relaxing its assertions.

    ## Verification

    Local checks with the repository-pinned Bun 1.3.2:

    - `bun run fix`, `bun run ci`, and `bun run types`: passed. - `bun test`: 1,464 passed, 2 PostgreSQL-only tests skipped, 0 failed. - PostgreSQL contract and server lifecycle suites against a disposable PostgreSQL 17 container: 59 passed, 0 failed. - Both updated skill files pass the skill structure validator. Relative documentation links and `git diff --check` pass.

    [CI passed on `18b8f5d`](https://github.com/githubnext/chopin/actions/runs/35669666741): validation, browser integration, and container build. The browser suite passed all 230 tests without retries. The earlier validation failure was reproduced and fixed by issuing the ownership fixture's sessions relative to the current clock instead of August 2026.

    ## Notes

    Replay records retain the original response source in the sidecar until channel deletion. This preserves exact retries across later edits and restarts, but increases sidecar/checkpoint size as documented.

  2. MaggieAppletonmerged ef8735a7177alast month on GitHub

  3. MaggieAppletonclosedlast month on GitHub

  4. MaggieAppletonhead-ref-deletedlast month on GitHub