docs(skill): backfill scheduler, per-spec liveness driver, outage gotchas - #11201
Conversation
…chas Mirror what the 2026-09-01/02 backfill actually ran into the checked-in skill: run_queue.sh (queue scheduler with slot limit, throttle holds, ledger harvest and a rescue list), the run_spec.sh liveness fix (per-spec generate runs and PRs instead of "any impl-* run active"), and SKILL.md guidance on slot counts, the reporting cycle, and three new gotchas — a provider outage reads like a capability cliff, the order in which to rescue an outage-hit spec, and the stuck-PR-object symptom behind "Head branch is out of date". Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SrKzcwZBnref1sWYtdXynu
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SrKzcwZBnref1sWYtdXynu
There was a problem hiding this comment.
🟡 Changes recommended
The new scheduler has confirmed logic/documentation issues (rate-limit signature matching and slot counting) that can prevent throttling or exceed the configured concurrency.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR extends the .claude/skills/babysit-pipeline operational tooling by adding an unattended queue scheduler (run_queue.sh), improving the per-spec liveness signal in run_spec.sh, and documenting the new workflow and outage-handling gotchas in the babysitting skill docs, with a corresponding CHANGELOG.md entry.
Changes:
- Add
run_queue.shto keep multiplerun_spec.shdrivers in flight, harvest results, and apply throttle holds. - Replace the repo-wide “any impl-* active” heuristic in
run_spec.shwith a per-spec liveness check. - Update
.claude/skills/babysit-pipeline/SKILL.mdandCHANGELOG.mdto document the scheduler, slot rules, and outage rescue guidance.
File summaries
| File | Description |
|---|---|
| CHANGELOG.md | Adds an Unreleased entry describing the new scheduler + per-spec liveness improvements and new gotchas documentation. |
| .claude/skills/babysit-pipeline/SKILL.md | Documents the new scheduler workflow, slot-count guidance, reporting cadence, and additional operational gotchas. |
| .claude/skills/babysit-pipeline/run_spec.sh | Updates liveness detection to be per-spec (generate runs + recent PR activity) and adjusts timeout budgeting for multi-driver queueing. |
| .claude/skills/babysit-pipeline/run_queue.sh | Introduces the new queue scheduler that launches drivers, harvests results, and throttles based on quota/failure signatures. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Review feedback: [Unreleased] already had a Changed heading; a second one broke the Keep-a-Changelog structure. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SrKzcwZBnref1sWYtdXynu
There was a problem hiding this comment.
🔵 Needs a closer look
The new scheduler’s running() slot accounting can undercount active drivers due to an unsafe PID substring filter, which can cause the scheduler to exceed the requested concurrency.
Review details
Suppressed comments (1)
.claude/skills/babysit-pipeline/run_queue.sh:91
running()filters thepgrepoutput withgrep -v "$$", which can accidentally exclude other driver processes whose PID contains the current PID as a substring (becausepgrep -afprints the PID as the first token). That can undercount active drivers and cause the scheduler to overfill slots.
running() {
pgrep -af 'run_spec\.sh ' | grep -v "$$" | grep -oE 'run_spec\.sh [a-z0-9-]+' | sort -u | wc -l
}
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Lite
There was a problem hiding this comment.
🟡 Changes recommended
run_queue.sh has concurrency-control correctness issues (slot argument validation and driver counting) that can break scheduling behavior in unattended runs.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
.claude/skills/babysit-pipeline/run_queue.sh:91
running()tries to exclude the current process viagrep -v "$$", butpgrep -af 'run_spec\.sh 'should not matchrun_queue.shin the first place. Filtering by PID substring can also drop unrelated driver lines whose command line happens to contain the same digits, undercounting running specs and potentially overfilling slots.
running() {
pgrep -af 'run_spec\.sh ' | grep -v "$$" | grep -oE 'run_spec\.sh [a-z0-9-]+' | sort -u | wc -l
}
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
- running(): drop the PID-substring self-filter (the scheduler's own command line never matches; the filter could drop unrelated lines) - rate-limit signature: digit-boundary groups instead of \b (not POSIX ERE) - detach example passes the slot count explicitly and captures stderr Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SrKzcwZBnref1sWYtdXynu
…heduler # Conflicts: # CHANGELOG.md
There was a problem hiding this comment.
🟡 Changes recommended
There are a couple of concrete correctness/robustness issues in the new scheduler/docs (ledger parsing edge case and “sourcing” side effects) that should be fixed before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 3
- Review effort level: Lite
- strict mode only when executed, not when sourced for tests - validate the slot count as a positive integer - ledger line handles the 'all libs already present' result shape - SKILL.md: detach example as a code block Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SrKzcwZBnref1sWYtdXynu
There was a problem hiding this comment.
🔵 Needs a closer look
run_queue.sh can silently fail to record driver failures when a driver exits without emitting a RESULT= line, which can cause specs to be dropped from the ledger unnoticed in unattended runs.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
.claude/skills/babysit-pipeline/run_queue.sh:160
harvest()skips output files that don't contain aRESULT=line, which can silently drop a spec from the ledger (and from any retry workflow) ifrun_spec.shexits early (e.g., repo resolution/auth/usage error) before printingRESULT=. For unattended runs this makes failures easy to miss because the queue advances but nothing is recorded in done.log/deferred.log.
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Lite
Summary
run_queue.sh <queue-dir> [slots]joins thebabysit-pipelineskill: keeps Nrun_spec.shdrivers in flight over a queue file, skips libraries already on main andCONFIRMED GAPpairs, harvests every driver'sRESULT=line intodone.log/deferred.log, holds launches for 15 min on throttle signs (GitHub core quota < 800, ≥3 distinct generate pairs failing within 25 min, rate-limit signatures in failed impl-* logs), honours aDEADLINE, and re-queues outage-hit specs fromrescue_specs.txtonly once nothing for them is in flight. It ran the 2026-09-01/02 backfill unattended: 55 specs, 329 implementations, three automatic throttle holds during a Claude outage.run_spec.shgets the per-spec liveness check that was only in the gitignored working copy so far: a missing library counts as in flight when this spec has a queued/in-progress generate run or an openimplementation/<spec>/*PR touched within the hour. The repo-wide "any impl-* run active" signal produced false PARTIAL verdicts with several drivers in flight and missed long generate runs behind a short list limit. Timeout budget: 30 + 20 min per library, cap 180.SKILL.md§5 documents the slot-count rule (2 by default, 4 with the user's OK; the binding limit is the Claude usage window, not GitHub), the scheduler, the rescue list and the 10-minute reporting cycle; three new gotchas cover the outage signature (is_error:true+ "Internal error"), the rescue order (watchdog/repair first, regeneration last, because a driver dispatch auto-closes open PRs), and the stuck-PR-object symptom behind five "Head branch is out of date" merge failures.Plan
N/A
Test plan
bash -non both scripts;run_queue.shwithout arguments prints usage;RUN_QUEUE_LIB=1 source run_queue.sh <dir>loads the functions andmissing_libsreturns empty for a fully covered spec.run_spec.shis byte-identical to the copy that drove the 2026-09-02 run.🤖 Generated with Claude Code
https://claude.ai/code/session_01SrKzcwZBnref1sWYtdXynu