Implements the engine side of philterd/phisql#31 for the Python port: accept the optional per-strategy color property added to the redaction-policy schema.
Blocked by philterd/phisql#31. Do not start until that RFC is accepted and the change lands in redaction-policy schema 1.2.0 (an additive edit in place of the current schema version).
Scope
phileas-python is a text redaction engine. It has no PDF or image rendering path today (no PDF redactor, no graphical bounding boxes), so color has no rendering effect here. The requirement is compatibility: a policy that sets color on a strategy must load and redact text exactly as it does today, with color accepted and ignored. This keeps a single policy portable across the PDF-capable engine (phileas, Java) and the text engine.
Acceptance criteria
Note for a future PDF path
If a PDF or image redaction path is ever added to phileas-python, it must honor color per philterd/phisql#31: named set black, white, red, orange, yellow, green, blue, gray, or 6-digit #RRGGBB, falling back to black for anything else, with per-span color resolving to the redacting strategy's color, then config.pdf.redactionColor, then black. Recorded here for reference; not required by this issue.
Implements the engine side of philterd/phisql#31 for the Python port: accept the optional per-strategy
colorproperty added to the redaction-policy schema.Blocked by philterd/phisql#31. Do not start until that RFC is accepted and the change lands in redaction-policy schema
1.2.0(an additive edit in place of the current schema version).Scope
phileas-python is a text redaction engine. It has no PDF or image rendering path today (no PDF redactor, no graphical bounding boxes), so
colorhas no rendering effect here. The requirement is compatibility: a policy that setscoloron a strategy must load and redact text exactly as it does today, withcoloraccepted and ignored. This keeps a single policy portable across the PDF-capable engine (phileas, Java) and the text engine.Acceptance criteria
phileas/policy/strategy.py) accepts an optionalcolorfield without error.colorset on one or more strategies loads and redacts text identically to the same policy withoutcolor(no behavior change, and no warning that implies malfunction).1.2.0(the revision that addscolor, wherever the project pins or validates the schema) passes for colored policies.Note for a future PDF path
If a PDF or image redaction path is ever added to phileas-python, it must honor
colorper philterd/phisql#31: named setblack,white,red,orange,yellow,green,blue,gray, or 6-digit#RRGGBB, falling back toblackfor anything else, with per-span color resolving to the redacting strategy'scolor, thenconfig.pdf.redactionColor, thenblack. Recorded here for reference; not required by this issue.