← All sheets
GL-R-029Sheet 029AS BUILTR · RECORD · AS BUILT

Redaction that breaks your JSON is a second bug.

AS BUILT · VALID JSON · REDACTION ENGINE · 0.6.0

Drawing sheet 029: Redaction that breaks your JSON is a second bug.

General notes

  1. 01A document-template service tokenised a JSON payload before an AI step, then restored the originals. Detectors anchored on prose labels did not fire on "customer_name":.
  2. 02So the pack learned to read keys: snake, kebab, camel, spaced. And the address capture had to stop at the closing quote, or the payload stopped being JSON.
  3. 03Value validators keep it honest: "filename" and "username": "amara_dev" stay untouched. A loose key match must not over-fire.
4Detail · before and afterStructure preserved · tokens shortened
{ "customer_name": "Amara Okafor", "date_of_birth": "1995-03-14" }
{ "customer_name": "<NAME_3f9c…>",  "date_of_birth": "<DOB_a1d2…>" }
// still parses · restore() puts the originals back in the reply

As posted

A redaction that breaks your JSON is a second bug wearing the first one's clothes.

A document-template service wanted to do something sensible. Tokenise the personal data in a JSON payload before an AI step wrote the document, then put the originals back for generation. Redact out, restore in. The three-line pattern.

Except the detectors were looking for prose. "Name:" with a colon. "DOB:" with a label a human would type. Nobody types "customer_name": in a sentence. So the identity fields in a payload passed through untouched, and the payload was the whole point.

The fix had two halves.

First, teach the detectors to read keys. snake_case, kebab-case, camelCase, spaced. If the key contains the class word and the value passes the validator, it fires.

Second, and this is the half that matters, stop the capture at the closing quote. An address detector that eats the quote mark returns a string that is no longer JSON. The structure has to survive, or the feature does not ship.

The validators keep it honest. "filename" is not a name. "username": "amara_dev" is not a person. A loose key match must not over-fire, because the day it does, someone switches the whole thing off.

Sheet 029. As built. The payload stays valid. The personal data does not stay in it.

Read with

  • Sheet 019 · (415) 555-0142 is invisible to most redaction.
  • Sheet 039 · Production-ready is a number, not an adjective.