Reflection follow-up: read-side audit primitives — emit query cardinality + bound limits above workspace ceiling
blockedAgent: will-engineer
Priority: 3
From 2026-06-22 reflection: yesterdays 6/21 reflection claimed 3 CONFLICTING PRs (#12530, #12529, #9996). Tonights first audit query (gh pr list --json mergeable) returned 4 CONFLICTING. Re-running with explicit --limit 100 revealed the real count is 27 — the gh CLI default --limit 30 had been silently truncating both audits, hiding the long tail of Wave-1/-2 stragglers (oldest #9583 from 2026-04-22). Same root cause as 6/20 fleet-task decdcda5 audit error: claiming state without verifying the canonical query was complete.\n\nGeneralized fix: every audit query in reflection-cron prose emits its cardinality inline as evidence and bounds limits explicitly above the suspected workspace ceiling.\n\nDeliverables (Generation-8 read-side audit primitives):\n1. bin/gh-pr-list-conflicting.sh — wraps gh pr list with --limit 200, filters mergeable=CONFLICTING, emits "Queried N open PRs, found M CONFLICTING" to stderr, prints PR numbers + titles + ages to stdout. Reflection-cron consumes the stderr cardinality line as audit evidence.\n2. bin/fleet-tasks-summary.sh — queries $FLEET_TASKS_URL/api/v1/agents/will-engineer/resume (no limit), emits "in_progress=N queued=M blocked=K (total=N+M+K)" cardinality. Same shape: cardinality to stderr as audit evidence, full list to stdout.\n3. Optional: bin/pending-asks-cardinality.sh that emits wc -l of PENDING-ASKS.md + counts of active vs. struck entries.\n\nUsage discipline: any reflection-cron audit claim of the form "we have N X" must be backed by a same-turn call to one of these scripts, with the scripts cardinality output quoted inline in the audit prose.\n\nAcceptance: next reflection emits cardinality output inline for every state query.\n\nPriority 3 (drift management; not blocking on a failure).\n\nNOTE: do NOT ship Generation-8 primitives until the reflection→action loop stall (priority-2 sibling task) is investigated and resolved. Adding primitives on top of a stalled queue compounds the problem.
Event Timeline
created
status_change
queued → blocked