Repository navigation
Description
Part of #2934, following the draft feedback admission task #3272.
Context
Two draft heavy-feedback runs can wait for each other before either starts proof. yieldReason includes both queued runs and running admission jobs in the competing inventory (scripts/heavy-feedback.ts:48-64), and admit keeps yielding until its 30-minute admission window expires (scripts/heavy-feedback.ts:71-81). FEEDBACK_SLOTS is 2 (scripts/heavy-feedback.ts:21); the policy still yields when the only other run is also waiting for admission. Citations verified on main d84fca3.
Found while landing #4185 / #4235. Runs https://github.com/schlessera/brain-kit/actions/runs/44169068382 and https://github.com/schlessera/brain-kit/actions/runs/44170419198 both remained in their heavy feedback admission step after the integration lease cleared. Neither had started selected proof. An offline call to the real yieldReason, with no reservation and both run IDs in the in-progress inventory, returns these two reasons:
44169068382: 1 other draft heavy feedback run(s) in flight (44170419198); at most 2 run at once
44170419198: 1 other draft heavy feedback run(s) in flight (44169068382); at most 2 run at once
The older request was cancelled before tests started to let the other proceed. This is a coordination workaround, not passing proof or a failed-test retry. The existing single-other-run test (tests/heavy-feedback.test.ts:58-67) does not exercise both admission loops together.
Out of scope
Changing the integration lease, increasing proof concurrency, weakening exact-head/readiness checks, changing selected tests or retries, or fixing the composer mic.
Scope
Give simultaneous feedback admissions a bounded order using existing run/job evidence so an unadmitted request cannot keep another unadmitted request waiting in a cycle. Preserve ready-confirmation priority and the existing feedback capacity policy.
Acceptance criteria
- With no live reservation and two pending admission-only requests, at least one reaches proof without either request being cancelled or waiting out the admission watchdog.
- The competing request progresses when capacity becomes available; a new arriving request cannot recreate mutual waiting.
- A live ready-confirmation reservation still makes feedback yield, and a changed/ready/closed head still refuses.
- The configured feedback capacity remains bounded; missing or unreadable admission evidence is not treated as free capacity.
Verification
Add an offline deterministic test of two admissions against the same inventory and prove it fails before the fix for mutual yielding. Retain the existing head and lease guards. Run bun run test tests/heavy-feedback.test.ts and bun run check:pr --base origin/main; qualify this proof-system change under the repository's lane and review rules.
Contract impact
None. Internal CI coordination only.
Current reproduction — 2026-11-20
On main bd751d434 and Bun 1.4.4, called the real yieldReason twice with a local API double. The reservation returned 404, the in-progress inventory contained two admission-only runs (IDs 1 and 2), and the queued inventory was empty. At least one request should be able to admit. Instead run 1 yielded to run 2, and run 2 yielded to run 1. The input and results require no GitHub requests. The hosted receipt above supplies the observed run-level impact.
Priority p2 records an actionable unscheduled fix to draft feedback.
Activity