Skip to content

feat(harness): priority:* labels drive census ordering (#173)#180

Merged
robercano-ghbot merged 2 commits into
mainfrom
feat/issue-173-priority-labels-census
Jul 23, 2026
Merged

feat(harness): priority:* labels drive census ordering (#173)#180
robercano-ghbot merged 2 commits into
mainfrom
feat/issue-173-priority-labels-census

Conversation

@robercano-ghbot

Copy link
Copy Markdown
Collaborator

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 extra gh call), 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 — new priorityOf() helper; renderIssues() renders a priority chip (reusing .badge classes) on prioritized issue rows; unlabeled rows get no chip. --parse-blocking seam 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 plain sort -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 via GATES_FILE=.claude/self/gates.json. loop-census.test.sh (55 checks) and cockpit.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 -n revert.

🤖 Generated with Claude Code

robercano and others added 2 commits July 21, 2026 16:03
… (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>
@robercano-ghbot robercano-ghbot added the needs-human Loop escalated: attempt budget exhausted, manual triage required label Jul 21, 2026
@robercano-ghbot

Copy link
Copy Markdown
Collaborator Author

feat(harness): priority:* labels drive census ordering (#173) (not yet reviewed)

@robercano

Copy link
Copy Markdown
Owner

Can you confirm the priority order from higher priority to less priority?

@robercano-ghbot robercano-ghbot removed the needs-human Loop escalated: attempt budget exhausted, manual triage required label Jul 23, 2026
@robercano-ghbot
robercano-ghbot merged commit b4e3270 into main Jul 23, 2026
9 checks passed
@robercano-ghbot
robercano-ghbot deleted the feat/issue-173-priority-labels-census branch July 23, 2026 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backlog priority: priority:* labels drive census ordering

2 participants