Skip to content

feat(loop): queue rendering is capped and ranked (story 5.9) - #338

Merged
tim-nish merged 2 commits into
mainfrom
story/5.9-queue-rendering-capped-and-ranked
Jul 27, 2026
Merged

tim-nish merged 2 commits into
mainfrom
story/5.9-queue-rendering-capped-and-ranked

Conversation

@tim-nish

Copy link
Copy Markdown
Owner

Merge after #334 — file overlap on tools/tanuki-loop and commands/tanuki-loop.md; no logical dependency.
Stacked on #331 — review/merge that first.

Closes #310

Summary

The dashboard's deferred/frozen listing — the one queue-rendering site, which the morning gate's NEXT block points at — is now ranked and capped at 10 visible entries with an explicit +N more — full: queue.md marker. Ranking mirrors tanuki-ledger's priority legend (P1/P2/P3), ties by finding id, deferred before frozen; ledger-unknown ids rank in a bucket after P3. queue.md itself is never rewritten.

Acceptance Criteria Mapping

  • AC1 cap + marker → QUEUE_RENDER_CAP/render loop in cmd_dashboard §3 → tools/tests/test-loop-queue-render (12 entries → 10 + "+2 more")
  • AC2 ranked by ledger priority, deterministic ties → _queue_sort_key mirroring priority() with a source-citing comment (existing occupancy_clause pattern) → verbatim order asserted in same test
  • AC3 truncation pointer → existing _short(..., pointer='queue.md') (F7), re-pinned for a ranked entry → same test

Review Focus

  • Priority rule duplicated from tanuki-ledger by the repo's zero-dep mirroring convention — comment cites the source
  • Non-finding-backed entries don't exist by shape (defer requires --finding per F226); the only degenerate case is a ledger-unknown id, ranked last
  • Morning-gate doc section untouched — that hunk belongs to 5.8 (feat(loop): morning gate discharges every queue entry (story 5.8) #334)

Changed Areas

  • tools/tanuki-loop (cmd_dashboard §3, _queue_sort_key)
  • commands/tanuki-loop.md (dashboard bullet only)
  • tools/tests/test-loop-queue-render (new)

Test Plan

All 25 test-loop-* fixtures pass, including the new one.

🤖 Generated with Claude Code

The dashboard's deferred/frozen listing — the queue's rendering at the
morning gate — now shows at most QUEUE_RENDER_CAP (10) entries, ranked
by the ledger's computed priority (mirrors tanuki-ledger's priority():
P1/P2/P3) with ties broken by finding id, and states an explicit
'+N more — full: queue.md' marker when truncated. Entries whose id the
ledger no longer holds rank after P3, still deterministically by id.
queue.md itself keeps every entry; truncated reasons keep the ellipsis
marker and the '… — full: queue.md' pointer (spec-tanuki-loop 'Morning
gate' / 'No model-supplied text except quoted reasons'; issue #310).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Base automatically changed from spec/triage-20260727-rulings to main July 27, 2026 08:02
…ory/5.9-queue-rendering-capped-and-ranked

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@tim-nish
tim-nish merged commit 8e270cf into main Jul 27, 2026
1 check passed
@tim-nish
tim-nish deleted the story/5.9-queue-rendering-capped-and-ranked branch July 27, 2026 08:09
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.

queue.md is an uncapped, unranked deferral generator

1 participant