feat(harness): priority:* labels drive census ordering (#173)#180
Merged
Conversation
… (issue #173) Orders loop-census.sh's ADVANCE candidates by (priority rank, then issue number) — critical<high<medium<low<unlabeled, number as tiebreaker — derived from the labels already in the fetched TSV (no extra gh call). A label-free backlog stays byte-identical to the old sort -n order; the blocking-graph gate still overrides priority. cockpit.sh renders a priority chip on prioritized issue rows. Documents the scheme in docs/USAGE.md. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…te (issue #173) Scenarios (b) "unlabeled-last" and (c) "blocked-high-priority skipped for unblocked-lower" previously passed even under a plain `sort -n` revert, because the priority-favored candidate had a lower-or-equal issue number than the one it needed to beat, so numeric order already matched priority order. Reworked both to disagree with numeric order (unlabeled #5 vs. priority:low #6 in (b); blocked priority:high #70 vs. unblocked #8 in (c)), mirroring scenario (a)'s shape. Verified both now fail under a temporary `sort -n` revert, then restored the real sort pipeline unchanged. Also fixes the fallback_ready comment in loop-census.sh, stale since #173 landed (still described plain lowest-number selection). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Collaborator
Author
|
feat(harness): priority:* labels drive census ordering (#173) (not yet reviewed) |
Owner
|
Can you confirm the priority order from higher priority to less priority? |
robercano
approved these changes
Jul 23, 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.
What
Implements issue #173:
priority:*labels drive backlog/census ordering so priority can be expressed without renumbering issues.Closes #173
Changes
.claude/scripts/loop-census.sh— candidate selection now sorts by(priority rank, issue number)instead of number alone. Rank:priority:critical(0) <priority:high(1) <priority:medium(2) <priority:low(3) < UNLABELED(4). A rank column is prepended (derived from the already-fetched labels field, no extraghcall), sorted numerically on both keys, then stripped so the downstream read loop is unchanged. A label-free backlog is byte-identical to prior behavior (all rank 4 → number order). Blocking-graph edges still override priority (a blocked candidate is skipped regardless of rank). Header comments updated..claude/scripts/cockpit.sh— newpriorityOf()helper;renderIssues()renders a priority chip (reusing.badgeclasses) on prioritized issue rows; unlabeled rows get no chip.--parse-blockingseam untouched..claude/scripts/loop-census.test.sh— new coverage for the three acceptance scenarios: priority-beats-number, unlabeled-last, and blocked-high-priority-skipped-for-unblocked-lower. Each is constructed so priority order and issue-number order disagree, so the tests fail if the sort is reverted to plainsort -n..claude/scripts/cockpit.test.sh— asserts the chip renders for a prioritized row and only for prioritized rows.docs/USAGE.md— documents the scheme in the ADVANCE-step section.Gates
build,lint,test(incl.smoke-fanout.sh) all pass viaGATES_FILE=.claude/self/gates.json.loop-census.test.sh(55 checks) andcockpit.test.sh(128 checks) pass standalone.Review
Correctness (opus) and tests (sonnet) lenses both approved (consensus: all). The tests reviewer empirically confirmed the new scenarios fail under a
sort -nrevert.🤖 Generated with Claude Code