Update review source
update_sourceSave a revised draft to an existing review, optionally guarding against stale edits by passing the revision your draft is based on. On conflict, re-read and re-apply changes before retrying.
Instructions
Push a revised draft (applied edits). Snapshots a history round and live-reloads the human's page. A markdown review is rendered as in create_review (Mermaid, math, highlighted code). For a kind=latex review the draft is raw LaTeX (a single .tex document) and the server recompiles it to PDF on each push. The human can edit the document too, so save with a guard: read via get_source(with_revision=true) and pass that revision as expected_revision. A stale revision fails with HTTP 409 and writes nothing. On a 409, re-read the source, re-apply your change onto the new text and save with the fresh revision; never resend the earlier draft, which would silently overwrite the human's edit. Omitting expected_revision is an unconditional write.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | the opaque review id | |
| markdown | Yes | the new draft | |
| expected_revision | No | optional optimistic-concurrency guard: the revision your draft is based on, taken from get_source(with_revision=true) — the same read that gave you the text, never a separate status poll. 409 = stale: re-read, re-apply onto the new text, retry with the new revision; never resend the old draft. Omit for an unconditional write. |