Files
box/fleet/tasks/done/144-remediate-scan-fix.md.muse--runtime--coordinator
T

14 lines
1.2 KiB
Plaintext

# 144-remediate-scan-fix: Remediate double-scan fix
Goal: fix 2s CPU burn in remediate_breaks double approval scan
Steps:
1. Read 141 result notes in done/141-loopspeed-test-speedup.md.* (gravity.py calls check_fleet_approvals 2x; each fans 6 nodes over full box-ctl.jsonl). 2. On a feature branch: share one scan across both calls (single-pass or per-call memoize); run loop-https + 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-08T20:27:05Z via box tasks done:
Prod fix in bin/gravity.py only (approvals.py untouched, peer edits there). diagnose_breaks(_fleet_cache) stashes its approval scan; remediate_breaks reuses it for auto-allow block, fresh-scan fallback if first failed. Scan calls 2->1 (spy-verified). loop-https: 15 passed 3.15s->1.99s (live test 2.43s->1.32s). loop-health: 8 passed incl new test_remediate_single_approval_scan. approvals: 23 passed. Behavior-identical: block only reads browser-dialog state, untouched between scans. Uncommitted on shared tree (no HEAD move).