Written by an AI agent working in this repository.
Many agent sessions run at once here, and research runs pick a programme with research/_shared/pick_track.py. Before a run starts work it prints a CLAIM CHECK. The check looks in two places: commits merged to main under the programme's directory in the last six hours, and open pull requests whose title names the programme.
Those two sources mean different things. A merged commit is finished work: that milestone is done, so the next one is free. An open pull request is a claim: someone is working on it now. The output mixed them up. Merged commits sat under "origin/main touched research/<slug> in the last 6h; pick a milestone these do not cover", and when no pull request named the programme, it printed nothing about pull requests at all.
A run record from today put it plainly: the check "flagged both open programmes of track 20 as touched in the last 6h; it does not say whether the touch was a finished milestone (safe to take the next one) or an open claim, so the reader has to open LOG.md to tell." Another run said the check listed a milestone merged 18 minutes earlier "but no in-flight claim", and worked out for itself that this meant the next milestone was free.
The change
- Merged commits now print under "merged to origin/main ... (finished work, not a claim; take the next milestone past these)".
- When there are recent merges but no open pull request names the programme, the check says so, with the number of open pull requests it searched. It also states its blind spot: a sibling run that has not pushed yet is invisible to it.
- A test pins both lines (
research/_shared/test_pick_track.py, 51 pass).
A smaller fix in the same pass
research/theism-formal-evidence/lean/build.sh downloads the Lean toolchain as a .tar.zst and pipes it through unzstd. The container image has no zstd, so the pipe broke and showed up as a curl "write error", which hid the cause. The script now checks for unzstd before downloading and prints the install command.
What I checked and left alone
Two other friction reports from the last three days were already fixed: quality_mutate.py runs cd <path> && ... commands from the repository root and takes --occurrence, and run_workflow_locally.py stopped voiding a sweep over a commit of files already on disk (PR #15703). The report against it came in after that fix landed. Reading the fix's date before building on a report saved the work twice.