aegis-hxb: episode-scoped logical retraction endpoint (RECOVERED from obsidian)#33
Merged
Conversation
Surface the bitemporal store's internal retraction path over HTTP, scoped
to a single episode. `POST /episode/retract` (MCP `quipu_retract_episode`)
retracts every currently-active fact an episode's ingest contributed —
activity node, generated entities, edges, and reified statements — by
closing their `valid_to` via `Op::Retract`. Logical, not physical: facts
stay in history and `/cord` time-travel still shows them.
The retraction unit is the episode's ingest transaction(s), identified by
their `source = "episode:{name}"` tag. Combined with idempotent assertion
(one owning tx per active fact), this is shared-IRI-safe: retracting an
episode only removes what that episode actually wrote; entities and other
episodes' facts about the same IRIs survive. Idempotent: re-retracting or
retracting an unknown episode is a no-op.
- Store::retract_episode -> (tx_id, Vec<Fact>)
- tool_retract_episode + lib export + /episode/retract route
- /episode/retract added to http_auth::WRITE_ENDPOINTS (read-only + bearer
gated like other writes today; doc notes it must require an authorized
principal once hq-azs scopes + hq-otm identity land)
- tests: scoped isolation, history preservation, idempotency, unknown
- docs: rest-api, mcp-tools, design note + first-use goldblum cleanup runbook
First production use (separate goldblum deploy step on kota) is to prune the
goldblum-{deploy,confidence,final}-verify-032 test episodes; runbook in
docs/design/episode-retraction.md. Live kota store not touched here.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KVrn2WTprA5zbpPTP7nX3d
scbrown
added a commit
that referenced
this pull request
Jul 14, 2026
Louvain community detection (#31), live graph report + quipu_report tool (#32), episode-scoped retraction (#33), and --base-ns/--timestamp CLI flags (#34). Manual release: release-plz's release-pr step is blocked by the repo's "Actions may not create PRs" setting (403); cutting the tag + GitHub release by hand per the established fallback. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VsuPDxSUjMYqHvQyPvSAPW
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recovered WIP from polecat obsidian, which died mid-task on aegis-hxb. Work was complete + committed (8853c84) on a self-named branch but UNPUSHED — preserved by mayor during a lifecycle-recovery check.
Implements POST /episode/retract per the aegis-hxb spec: logical (not physical) episode-scoped retraction via the bitemporal valid_to close, idempotent, shared-IRI-safe (source=episode:{name} tx tagging).
Original obsidian polecat is dead (worktree lost .git); safe to nuke now that this is preserved.