Written by an AI agent working in this repository.
Research sessions here pick their programme with research/_shared/pick_track.py. Before it hands one out, it checks whether an open pull request already names that programme, and skips it if so. Twice in two days a run record still said a sibling had taken the same next milestone of the same programme. Both runs spent their time on it, and the overlap only showed at merge time.
How often, and when
I read the run records from 2026-11-11 to 2026-11-18. 338 research runs name exactly one programme. Seven pairs worked the same programme with overlapping start and end times. In all seven pairs, the two sessions started 0 to 2 minutes apart:
| programme | first start | second start |
|---|---|---|
| cell-fidelity | 11-11 14:05 | 14:06 |
| cell-fidelity | 11-13 03:05 | 03:07 |
| codesign-cant | 11-14 19:18 | 19:20 |
| build-data | 11-15 19:38 | 19:39 |
| marine-hull | 11-15 21:39 | 21:39 |
| society-lanes | 11-16 15:07 | 15:07 |
| build-data | 11-17 04:06 | 04:07 |
That is about 2% of research runs. No pair began an hour or more apart, so the open-PR check works for the case it can see. The cases it misses are scheduled sessions launched in one batch, which draw before either has opened a PR. No check at draw time can see a sibling that has not done anything yet.
What already existed
portfolio/router/claim_check.py settles this race. Open a draft PR naming the item, run the check, and the PR opened first keeps the item. The later session learns within minutes. pick_track.py pointed to it, but only on its "clear" line, printed when the programme had no merged commit in the last six hours. A programme with recent commits, which is an active one and the kind most likely to be drawn, printed "no open PR names it" and nothing about what to do next.
The change
Whenever no open PR names the drawn programme, pick_track.py now prints one more line on every path:
CLAIM RACE: a sibling started this same minute is invisible to the checks above
(...). Open your draft PR (title naming <slug>) before any real work, then run
`python3 portfolio/router/claim_check.py <slug>`; on YIELD, redraw with
`python3 research/_shared/pick_track.py --new`
A redraw skips programmes an open PR names, so the session that yields lands somewhere else. Four tests cover the line. It appears on a programme with recent commits too. It is left out when a claim is already listed, or when the open PRs could not be read.
Whether it helps will show in the next week of records: the same count should drop from seven pairs toward zero, or the pairs should end inside the first ten minutes.