quipu_retract_source
Retract all live facts whose transaction source exactly matches a given string; preview by default, then confirm with expected count to apply.
Instructions
RETRACT-ONLY repair: retract every currently-live fact whose transaction source equals an exact string. Reaches facts that no snapshot replacement can touch — quipu_knot composes its own tag as snapshot:, so facts written under any other source (a free-form producer string, a hand-run CLI promote) were previously unretractable forever. There is NO turtle input: the transaction cannot carry an assertion, so this cannot write facts attributed to the named producer. The retraction is stamped with its OWN source, repair:, never the source being cleared. PLANS BY DEFAULT: without apply=true it writes nothing and reports what would be retracted, so planned:0 means 'that source owns nothing live'. Applying requires expect= as a confirmation handshake, and the response reports 'remaining' — a fresh read of the post-state, not an echo of the request. RE-KEYING ORDER: retract FIRST, then re-promote canonically; asserting first is skipped as a duplicate and the retraction then removes everything.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actor | No | Who is performing the repair | |
| apply | No | Default false = plan only, nothing is written. true commits the retraction and requires 'expect'. | |
| graph | No | Optional registered committed-graph IRI; absent targets ROOT. Same graph rules as quipu_knot. | |
| expect | No | Required with apply=true: the planned count you are confirming. A mismatch is refused — the store moved, or this is not the source you measured. | |
| repair | Yes | Ticket or reason. Stamped on the retraction transaction as repair:<ticket>, so the log records who cleared these facts and why. | |
| source | Yes | EXACT transaction source string to retract. Matched literally — never by prefix or pattern. Read it from GET /transactions or an entity's history. | |
| timestamp | No | ISO-8601 timestamp for the retraction |