Patch note preamble
patch_note_preambleReplace or remove content before the first Markdown heading in a note. Uses expected_hash to ensure safe edits and rejects files without a heading or with unclosed code fences.
Instructions
Use this to replace or remove content strictly before the first Markdown heading recognized by the current write selector. Pass the note's exact expected_hash for CAS. Empty or whitespace-only new_content removes the preamble. The first heading and all following content preserve exact bytes when the file uses uniform line endings; mixed-EOL files follow the existing global dominant-EOL normalization. Notes without a recognized Markdown heading are refused fail-closed, and so is content that leaves a code fence or HTML block open. The shared AST selector supports ATX and Setext headings, normalizes closing hashes, and ignores headings inside fenced code.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rel_path | Yes | ||
| request_id | No | ||
| new_content | Yes | ||
| expected_hash | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| indexed | Yes | ||
| patched | No | ||
| rel_path | No | ||
| replayed | No | ||
| committed | No | ||
| content_hash | Yes | ||
| operation_id | No |