fix(gate): the plan-code guard catches decision codes, and the purge takes them
A plan's decision ids (`D1`, `D4`, `D6-A`) cited in 11 comments and test titles named a document no reader of this repo has, and the guard had no pattern for them. It has now (mirrored in audit_metrics), with cases for each form the citations took and for the look-alikes it must leave alone (a JPEG marker, "3D"); the 11 lines say their why without the id. Case test seen red without the pattern, the scan red on a planted `D9:`.
This commit is contained in:
@@ -734,7 +734,7 @@ def _step_failure(err: BaseException) -> str:
|
||||
|
||||
|
||||
def _is_jpeg(path: Path) -> bool:
|
||||
"""True if the file starts with the JPEG SOI marker (FF D8 FF)."""
|
||||
"""True if the file starts with the JPEG SOI marker (0xFF 0xD8 0xFF)."""
|
||||
try:
|
||||
with path.open("rb") as f:
|
||||
return f.read(3) == b"\xff\xd8\xff"
|
||||
|
||||
Reference in New Issue
Block a user