Files
box/fleet/tasks/done/198-policy-scan-parse.md.muse--runtime--coordinator
T

14 lines
1.2 KiB
Plaintext

# 198-policy-scan-parse: Policy scan double parse
Goal: fix _policy_scan parsing every line twice
Steps:
1. Read 195 result notes in done/195-dmlog-parse-share.md.muse--runtime--coordinator (observed follow-up: _policy_scan json-parses every line 2x). 2. On a feature branch: parse once, reuse; run affected tests green with equivalence check. Done criteria: result notes list before/after seconds + pass counts, or exact blocking failure.
Done criteria: result notes appended below; file moved to done/.
Result notes (append below before moving to done/):
Completed 2026-10-09T06:33:59Z via box tasks done:
Prod fix in box-ctl _policy_scan: single parse pass stashing events (was json.loads per line x2 loops); classification unchanged. _policy_scan 0.22s->0.17s (parse was ~1/4 of cost; rest is IO+classify). Equivalence: frozen-input old-vs-new identical (agents+meta); live policy output diffs were only newer log lines. Added 2 focused tests (policy/policy-check schema + per-line-once spy). Suites: box_read 18 + box_dev 33, all green. CATCH: my first before/after policy-check captures compared identical usage-errors (verb is 'policy check', not 'policy-check'); the real schema test caught it, fixed, discarded vacuous captures. Uncommitted.