chat ingest core: room scope, credential scrub, chunker, refresh_chat, steward purge #60
Loading…
Reference in a new issue
No description provided.
Delete branch "gamecult-chat/chat-ingest-core"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Cut
gamecult-chat:cut_spec:cut-chat-ingest-core.r2, on chat-search's merged head421ace5. Nothing here talks to Matrix; the HTTP client, flags,chat-purgesubcommand and unit are the next cut (chat-ingest-job). Rebased on36dd8ceandf1d5c40(conflicts in sources/mod.rs, index/qdrant.rs, index/fakes.rs, tests.rs resolved keeping both cuts). Soul's first pass failed; fixes F1-F7 are in the last commit.What lands:
huginn_mind::redact:redact_url_userinfoMOVED from mind-body (one definition, tests moved with it), plusscrub()/ScrubKind/SCRUB_VERSION(PEM, authorization line, Bearer/Basic/token, vendor key shapes, JWT, URL userinfo). Hand-written scanners, no new dependency.sources/room_scope.rs:admit_room,refuse_event,ESTATE_ALIASES,Estate; the only file that spells the bridged platform.RoomFactshas no join-rule field.sources/chat_chunk.rs: greedy chunker,chat_version(),chunk_id,cut_body,embedded_text.sources/chat.rs:RoomHistoryport,refresh_chat,retire_chat, cursor keys,ChatRefreshed; the fold (purge filter, scrub, edit, redaction), write-then-delete and cursor-last.sources/chat_purge.rs: windows, tombstones,request_purge; applied byrefresh_chat.SourceIndex:chat_tail,chat_chunks_holding,chat_chunks_overlapping,delete_chat(Qdrant and fake impls).retireno longer readschat:/chat-purge:keys as repo names (test written first, red at base).Verification (docker, digest-pinned rust image, --cpus 4 --memory 12g):
cargo test --locked -p huginn-mind -p huginn-daemon -p mind-body -p eureka-stategreen (mind-body needs root-owned tmp dirs, so it ran as root; huginn-daemon's desk-door tests refuse root, so those ran as a normal user),cargo check --locked --workspaceexit 0.Deviations:
request_purgehas nonow_ms(F7: nothing in it reads a clock; a request is a window, and the journal's ref is the job's);ChatMsgis the payload's ownChatMessage;refusedcarries aRefusedRoomstruct.Soul fixes: unknown-redaction rebuild and in-page edit revert, edits of redacted or unknown originals dropped (docs/chat-retrieval-map.md names both rules); scrub gains Matrix tokens, access_token values, PGP blocks,
bearer:token, glued distinctive keys, zero-width stripping (SCRUB_VERSION 2); the room name is scrubbed;RoomFactshas noDefault,Estate::newdemands exactly the three ids, bridge sender patterns widened; a facts error keeps the room and is reported in itsChatReport;retire_chatgoes on past failures; the tail is deterministic on equal ends. Removed as redundant owners: the in-foldredactedguard and the refused-room purge inrefresh_chat(retirement purges it).Not in this PR: how the Matrix port maps a pruned event (
content: {}) toEventKind::Othermust be pinned by the ingest-job cut.🤖 Generated with Claude Code
6175f57440to979b7307ca