fix(OperationsCenter): print per-repo progress in custodian-sweep - #470
Merged
ProtocolWarden merged 1 commit intoJul 15, 2026
Merged
Conversation
Root cause: custodian-sweep --emit legitimately takes 3-4 minutes across 19 managed repos, but printed nothing until the final summary line at the end of main(). Every watchdog cycle for weeks re-investigated this as a "hang" because any bounded probe (timeout 90/120s) is indistinguishable from a genuine stuck process — see logs/local/watchdog_cycles/20260714* and 20260715_cycle.md for repeated instances of the same investigation. Fix: _run_custodian_audits now prints a flushed "N/total <repo> done" line to stderr as each repo's audit completes, so a bounded probe shows liveness instead of silence. No behavior change to the JSON summary or Plane emit logic.
ProtocolWarden
deleted the
oc-watchdog/20260714-2249-custodian-sweep-progress
branch
July 15, 2026 02:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
custodian-sweep --emitgenuinely takes 3-4 minutes across 19 managed repos but printed nothing until the final summary line, making a bounded probe (timeout 90/120s) indistinguishable from a hang.logs/local/watchdog_cycles/20260714_cycle.md,20260715_cycle.md) independently re-investigated this same "hang" and confirmed it was always a slow-but-healthy run._run_custodian_auditsnow prints a flushed[custodian-sweep] N/total <repo> doneprogress line to stderr as each repo completes, so future bounded probes show liveness instead of silence.Test plan
pytest tests/test_custodian_sweep.py -q— 17/18 pass (pre-existing unrelated failuretest_emit_dry_run_reports_zero_finding_skip, confirmed present onmainbefore this change — two pre-existing tests assert contradictory_emitdry-run behavior; left untouched, out of scope)test_run_custodian_audits_prints_progress_per_repocovering the new stderr outputruff check/ruff format --checkcleanpytest tests/unit/er000_phase0_golden/ -q— 15/15 passcustodian-sweep --emitunbounded end-to-end (19 repos, ~3.5 min) — completed cleanly, confirms this was never a real hang