Expand description
What a model said, on its way into history.
Everything a provider sends back becomes a ledger payload verbatim, and a model that read a key can repeat one. The ledger is permanent and exportable, so it is the sink that matters: a secret there outlives the session, the machine and the person’s memory of it.
Two decisions carry this module.
The window keeps the bytes; the ledger does not. The blocks the next request is built from are extracted before this runs, so redacting here cannot break a thinking block’s signature or make the conversation stop making sense. History and context are two sinks with two different requirements, and only one of them is forever.
The replacement is a marker, not a vault entry. A key the model echoed is not a credential the city was asked to keep; storing it would give it a life nobody asked for, and inventing a realm for it would put a made-up name in the vault’s namespace. The marker carries the first sixteen hex of the content hash instead, which is enough to see that two occurrences are the same value and never enough to be one.
Every sink in this crate marks the same way. The ledger and the
diagnostic log differ in one decision only — whether the marker
carries a fingerprint — and that decision is the Marker argument
below rather than a second scan-and-replace written next to the
second sink.
Enums§
- Marker
- What stands where a secret stood, and how much it says about it.
Functions§
- fingerprint
- The one short name this city gives a secret it must refer to without holding: derived from the value, so one value reads alike in every session and two values never read alike in one.
- redact
- Replaces every secret-shaped span in every string of
payload. - redact_
text - One string, with every secret shape in it replaced in place.