perf(canary): share the run-list cache across the sweep's steps
Refs #1259 (option A, approved by the owner).
What
The scheduled sweep runs promote-all and sync-issues as separate processes, so each pays for the same per-role workflow-run listings (~85% of each step per the instrumented run). This exports one _RUNS_CACHE_DIR ($RUNNER_TEMP/canary-runs-cache) for the job so later steps reuse lists that are at most one step old.
Safety
- Tag/ref reads are never cached, so promotion decisions still read fresh tags.
- Cached lookup failures (empty
sha_*entries) are deleted before the issue sync so a transient failure can't suppress evidence there. - The script never deletes a caller-supplied cache dir (
_CANARY_OWN_CACHE). - Timing files are per-PID, so steps don't clobber each other.
Tests
3 new bats tests (workflow step order/contents, cross-process reuse makes zero run list calls, caller dir preserved). Full suite 452/452, also with CANARY_PRELOAD_REGISTRY=1; shellcheck clean.
Follow-up
After merge, read the next scheduled run's canary timing [sync-issues] and report on #1259; timeout stays 60 until measured.
🤖 Generated with Claude Code
https://claude.ai/code/session_01MjXPsBTaL6WV9AhCH2ajuv
Generated by Claude Code