feat(loop): dependency-aware census selection via the blocking graph - #135
Merged
Merged
Conversation
loop-census.sh's ADVANCE selection now skips a planned candidate while any issue it declares "Blocked by" (via cockpit.sh's existing --parse-blocking parser, reused not reimplemented) is still open, emitting a `blocked=<n> by=<N>` census line and picking the next unblocked lowest-numbered candidate instead. Since census re-runs every tick, a blocker closing makes the skipped issue eligible again for free. A "Blocked by" cycle falls back to the lowest-numbered candidate (logged to stderr) instead of wedging the loop. Task-list/parent-child refs (`- [ ] #N`) intentionally do not gate — only the explicit phrase does. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
robercano
approved these changes
Jul 16, 2026
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.
Closes #97
What
loop-census.sh's ADVANCE selector now consults the blocking graph the cockpit already parses, instead of blindly picking the lowest-numberedplanned+module:*issue with no branch.For each otherwise-eligible candidate the census shells out to the existing
cockpit.sh --parse-blockingseam (one parser, never reimplemented) to extract itsBlocked by #Nedges, and skips the candidate while any of those blockers is still OPEN (openness checked against one bulkgh issue list --state openfetch). It emits ablocked=<n> by=<m>line so tick/cockpit output shows why a candidate was passed over, then continues to the next unblocked lowest-numbered candidate.Behavior (acceptance criteria)
Blocked by #Nblocker is never selected for ADVANCE; the skip + reason appear in census output (blocked=<n> by=<m>).Blocked bycycle (A↔B) does not wedge the loop: when the gate leaves no unblocked candidate, it logs a fallback warning to stderr and falls back to the lowest-numbered otherwise-eligible candidate. With zero eligible candidates,advance_readystaysnoneas before.Blocked byedges ONLY — task-list/parent-child- [ ] #Nrefs do NOT gate (trackers stay inbacklog).Scope
Tests & docs
loop-census.test.sh: fixtures + cases for open-blocker skip, blocker-closed-becomes-eligible, cycle fallback, and task-list-does-not-gate.docs/USAGE.mdbacklog-hygiene section documents thatBlocked by #Nis now load-bearing for loop selection, not just cosmetic.Gates
build / lint / test all green (independently re-run by the orchestrator; smoke-fanout included). Reviewed under correctness + tests lenses, consensus=all.