Skip to content

Design notes ​

Decisions we've deferred on purpose, with enough context to pick them up later. Each note says what would make it worth revisiting.

Restore masked values at the server edge ​

Recorded 2026-09-27 · status: deferred

Today. Masked values are restored inside the pipeline: the PII and content packs each put an unmask step in egress (pii.redact → pii.unmask). Egress checks listed before the unmask step see placeholders; anything after it sees the real values. Routes can keep placeholders with unmask_response: false.

The alternative. The pipeline would never restore anything: its final state keeps the masked reply, and the server restores values only while writing the HTTP response to the client.

Restore in egress (today)Restore at the edge
Egress checkssee placeholders only if listed before the unmask stepalways see placeholders
Events, traces, exportershold whatever egress nodes put in themmasked by construction
A future "store responses" featuremust remember to store the masked textsafe by default
Python API (executor.run)returns the restored replyreturns the masked reply; callers restore with a helper
True streamingunchanged (these egress steps already buffer)must restore placeholders split across chunks
Pluginsunchangedegress plugins that expect real text break

Why not now. It changes what executor.run() returns and what egress plugins see — a breaking change for anyone embedding Aegis — to protect against mistakes the current ordering already lets a config avoid.

Revisit when replies need to be stored or exported in full, a compliance review asks for "no personal data in any Aegis-held record by construction", or egress plugins that call external services become common.