Repository navigation
Description
Context
Native case 17 of the reference pool proof asserts that refusing to release a held worktree leaves its charge unchanged. It does this by comparing two separate charged() readings taken around the refused poolRelease (REFERENCE_ACCESS_HELD_NOT_RELEASED, scripts/native-proof/reference-pool.native.ts:543-548, added by #2729 in 5e6446a).
charged() reads the pool's aggregate allocation. Earlier releases in the same proof can still be reclaimed in the background between the two readings, so the aggregate can drop while nothing about the held worktree changed. On a loaded host, 2 of 6 runs of bun scripts/prove-reference-pool.ts (head dc5d3c732 plus unrelated #2432 changes that do not touch case 17) failed only on this field:
- "charged": 720896,
+ "charged": 589824,
The refusal code, state, access and read assertions all held. Both failures happened while other test suites loaded the machine.
Scope
Make the assertion measure what it claims: that the refused release freed nothing of the held worktree. Options include settling earlier reclamation before the first reading, or comparing the worktree's own ownerBytes instead of the aggregate.
Out of scope
Changing release semantics, the #2729 refusal, or other native cases.
Acceptance criteria
- Case 17 no longer depends on unrelated background reclamation. Ten consecutive native runs under parallel load pass this assertion.
- The mutation that removes the held-worktree refusal still fails
REFERENCE_ACCESS_HELD_NOT_RELEASED.
Verification
flock <native slot> bun scripts/prove-reference-pool.ts repeated, plus the mutation receipt.
Contract impact
None.
2026-10-24 triage at main af6300478a07379178bd30221a31c0b917df2283: Verified the current assertion still compares aggregate chargedBytes across the held release. The retained 2/6 recurrence and precise owner-versus-aggregate fix boundary are sufficient; no new loaded native repetitions are needed to establish readiness. Wanted unscheduled test-proof correction is p2/type: test; This directly verifies #2390's managed-worktree held-access safety outcome (delivered guard #2729), so attach to that existing epic; this is not a general worker-test child of the full #736.
Activity
schlessera commentedon Oct 24, 2026
2026-10-24 triage at main
af6300478a07379178bd30221a31c0b917df2283: Verified the current assertion still compares aggregate chargedBytes across the held release. The retained 2/6 recurrence and precise owner-versus-aggregate fix boundary are sufficient; no new loaded native repetitions are needed to establish readiness. Wanted unscheduled test-proof correction is p2/type: test; This directly verifies #2390's managed-worktree held-access safety outcome (delivered guard #2729), so attach to that existing epic; this is not a general worker-test child of the full #736.schlessera commentedon Nov 15, 2026
Claimed for implementation. Claim token:
claim-bac22db1. Branch:test/2819-held-release-owner-charge.Path collisions on scripts/native-proof/reference-pool.native.ts with #3806 and #4002; neither touches case 17's held-release assertion.
test(native-proof): TEMPORARY #2819 receipt driver, round two (ten lo…
Revert "test(native-proof): TEMPORARY #2819 receipt driver, round two…
Revert "test(native-proof): TEMPORARY #2819 receipt driver for draft …
test(native-proof): compare the held worktree's own charge across its…
schlessera commentedon Nov 16, 2026
Merged in #4040 as
168d5255bthrough the integration lease (orchestrator merge queue for 0.45.0). Candidate confirmation passed on the exact head; the squash's own main run carries the post-merge heavy categories.