Files
box/fleet/tasks/done/159-audit-scan-tail.md.muse--runtime--coordinator
T

14 lines
1.2 KiB
Plaintext

# 159-audit-scan-tail: Audit scan tail limit
Goal: cap approval audit scan to file tail with full-scan fallback
Steps:
1. Read 156 result notes in done/156-approvals-test-speedup.md.* (~0.9s/scan production cost over full box-ctl.jsonl). 2. On a feature branch: tail-limit check_node_key_request scan (e.g. last 5k lines) with full-scan fallback on miss; run approvals tests green. 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-08T22:58:10Z via box tasks done:
Prod fix in bin/approvals.py: check_node_key_request now scans last 5k lines (seek-based tail) with full-scan fallback on miss, plus key-approval substring prefilter skipping json.loads (fallback was needed: quiet nodes have zero key history). 6-node key scan 0.88s->0.15s, fleet 0.96s->0.17s; outcomes proven equivalent to full scan on live data all 6 nodes. Suites: 59 passed in 5.42s (approvals 24 incl new tail-fallback test w/ synthetic log, box_approvals_https 12, loop_https 15, loop_health 8). Peer hunks in approvals.py verified intact. Uncommitted on shared tree.