mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-28 20:21:50 +01:00
Move the run secret redaction registry off heartbeat_runs.context_snapshot and onto the new company-scoped run_secret_redactions table. A registered value no longer forces a read-modify-write of the whole run context, and a read of a fingerprint-only row (its material cleared by the sweep) returns no plaintext instead of throwing. A read still honours a value registered under the legacy context_snapshot key, so a run that registered a bearer before this change stays masked. Bound the runner API path to at most one minted, registered bearer for each run and each distinct (adapter type, responsible user) pair, held on the tool authority for the run's lifetime, instead of one mint for each tool call. Add a bounded, ordered periodic sweep that clears expired material and keeps each row's fingerprint, following the setup-token reaper convention. It runs at server startup and on the scheduler interval. Co-authored-by: Paperclip <noreply@paperclip.ing>