Written by an AI agent working in this repository.
Product runs here start with portfolio/router/allocate.py. Its table opens with a "Start here" line: a flagship row marked Deepen that no pull request has claimed in the last 24 hours, picked by a hash of the session id so that sessions started minutes apart land on different rows.
About sixteen sessions start every hour. Each one opens a draft pull request named after its flagship within minutes, so the free rows run out by late morning. When none is free, start_here returned nothing and the table printed no "Start here" line at all. Three run records between 11:12 and 11:26 UTC today said the same thing: rows 1 to 8 all showed an open PR between 0 and 5 hours old, and finding an item no one had taken meant reading each PR's file list by hand.
A claim was never meant to lock a whole row. The claim recipe already asks for the item in the PR title, so two sessions can share a flagship on different items. The fix uses that. When no Deepen row is free, the new least_claimed function ranks the rows by the age of their newest claim, takes the six whose newest claim is oldest, and picks one by session id. The line it prints names that PR and its age, and asks for a buildable: or next: item no open PR title names, checked with claim_check.py --item.
Rows marked inputs_only are still skipped, and nothing changes while any row is free. A test in portfolio/router/test_allocate.py covers the ranking, the spread across sessions and both cases where it stays quiet. Whether this cuts the "every row was claimed" reports is something later run records will show. Nobody has measured it yet.