Repository navigation
Description
Part of #2934.
Problem
bun scripts/integrate.ts release <id> releases any live lease whose actor matches the caller. Every agent here uses the same GitHub login, so actor cannot tell holders apart. Lease ids are public in reservation.json on refs/heads/brain-integration-reservation. So any agent can release another agent's live confirmation.
On 2026-11-02 the reservation ref recorded this sequence for lease 1b428124…, held by confirm 3279:
- acquired 16:38:21 UTC;
- renewed every minute through 16:45:25;
releaseat 16:46:12, with that lease asprevious;- another candidate (CONTRACT: feat(core): count media awaiting review from one inventory with a kept disposition #3288) acquired at 16:46:30.
The holding confirm process was still in its proof wait loop. Its next renewal failed with No reservation to renew. Its own code releases only after a merge or in its exit cleanup, and neither had run. Its candidate proof run 41483475829 was still in progress and was wasted.
Acceptance criteria
- A lease carries a holder token that never appears in the public ref. Examples: a random secret kept by the holding process, or a hash of one stored in the ref.
renew,releaseandmerge --leaserequire it. releasewithout the token is refused while the lease is live. An expired lease still needs no release. An operator override stays available throughrevoke <reason>, which records its reason.integrate.ts acquireprints the token once, for callers that hold the lease explicitly.confirmkeeps it in memory only.- Tests: a second process with the same actor and the lease id cannot release or renew a live lease. The holder can.
revokestill works and records its reason. - Mutation receipt: dropping the token check fails the cross-process release test.
Out of scope
Lease length, the renewal interval, and transient renewal failures (#3302).
Activity
schlessera commentedon Nov 4, 2026
Claimed (claim-3303-88e7a6). Branch
fix/3303-lease-holder-tokenfrom main5c9b23d4. Collision check onscripts/integrate.tsandscripts/integration-reservation.ts: closure reports only, no open PR changes either path. #3302 follows from the new main once this lands, per the proof-system lane (#3269).fix(ci): let only the holding process release or renew an integration…
schlessera commentedon Nov 4, 2026
Delivered by #3571, squash
3853e24fon main: parent28c5af58, tree25bea3c0, the same tree candidate run 41871035401 tested on theready_for_reviewmerge checkout. The confirm that landed it held a token lease with a publishedholderdigest. A first confirmation was refused because the newest contract run had been cancelled while pending. That gap is filed as #3573. Main CI run 41875126361 is in progress; #3302 merges only after it is green (proof-system lane).Merge origin/main into feat/3269-3271-lane-enforcement; rework the wi…