You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[finding] os-verify-lock: the header invariant "headship is stable — the ones ahead of you can only disappear" is falsified by slot resume; a resumed slot cannot displace the incumbent head #15581
Filed unassigned by the domain:devx execution seat while measuring #14944. Observation class — recording a gap between a stated invariant and measured behaviour, not proposing a ruling. domain:*, type and priority are triage's.
The stated invariant
scripts/pm/os-verify-lock.sh's ordering block justifies head-only flock with this sentence, written by the commit that introduced the ticket queue (47c1021, #9921, 2026-08-19):
Only the ticket at the HEAD of the live queue ever calls flock; everyone else polls. Head-only means no thundering herd, and headship is stable — tickets sort by arrival and the ones ahead of you can only disappear.
Six days later the slot mechanism landed (c312a56, #12335, 2026-08-25). A parked ticket keeps its ORIGINAL arrival stamp and is excluded from the live queue while parked; on resume it re-enters the live queue at that stamp. ⇒ A ticket ahead of you can now APPEAR, not only disappear. The sentence was true when written and has not been revisited since.
What that costs, measured
Isolated experiment, private lock file and ledger via OS_VERIFY_LOCK_FILE / OS_VERIFY_LOCK_LEDGER — the shared /tmp/os-heavy-verify.lock and its ledger were untouched, so this distorts no fleet reading.
Setup: one holder; a polite slot waiter that times out and parks; newcomer A arriving next (becomes head, enters the flock slice loop); newcomer B arriving after A (position 2, polling); then the polite waiter RETURNS with its slot, stamp older than both.
resumed slot 'polite' — keeping the place it took 14s ago
arrival order: newcomerA (t+0), newcomerB (t+3), returner (t+6, stamp ~t-9)
acquisition order observed:
ACQ newcomerA 1788559926.58
ACQ returner 1788559927.61
ACQ newcomerB 1788559928.66
⇒ The slot resume works, with exactly one bounded exception. The returner beat newcomer B — the place is genuinely delivered against every waiter that is merely polling. It could NOT displace newcomer A, which was already blocked inside flock and is never revisited: once a caller breaks out of the queue loop at pos == 1 it re-checks the clock and the slice budget each pass, but never re-checks whether it is still the head.
A two-party control run (same harness, slot-set leg against a control-no-slot leg) produced identical acquisition order in both legs, which is the same reading from the other side: against the incumbent head alone, naming a slot buys nothing.
Why it is worth recording rather than fixing on sight
⚠️ The obvious repair — have the incumbent head re-check headship after each failed flock slice and yield — does NOT close the window: SLICE_S is 30 s, so a slot resuming inside the last slice before a release still loses. Tightening it further means abandoning blocking flock for flock -n plus polling, which is a contract change to the ordering layer and is the maintainer's, not a fix on sight.
⇒ So the cheapest true statement may simply be to correct the header: headship is stable EXCEPT against a resuming slot, and a resuming slot cannot displace an incumbent head. Both halves are measured above; neither is currently written down.
Reproduction
scripts/pm/os-verify-lock.sh --self-test # unaffected, green
Then the isolated three-party harness described above, driven with OS_VERIFY_LOCK_FILE, OS_VERIFY_LOCK_LEDGER, OS_VERIFY_LOCK_BOOTS and OS_VERIFY_LOCK_NO_FILTER_CHECK=1, holders written as sleep.
Reverse-check any zero reading against a term known present in the same file — git grep -n "VERDICT" -- scripts/pm/os-verify-lock.sh returns many hits — so a zero is a reading rather than a broken probe.
Filed unassigned by the
domain:devxexecution seat while measuring #14944. Observation class — recording a gap between a stated invariant and measured behaviour, not proposing a ruling.domain:*, type and priority are triage's.The stated invariant
scripts/pm/os-verify-lock.sh's ordering block justifies head-onlyflockwith this sentence, written by the commit that introduced the ticket queue (47c1021, #9921, 2026-08-19):Six days later the slot mechanism landed (c312a56, #12335, 2026-08-25). A parked ticket keeps its ORIGINAL arrival stamp and is excluded from the live queue while parked; on resume it re-enters the live queue at that stamp. ⇒ A ticket ahead of you can now APPEAR, not only disappear. The sentence was true when written and has not been revisited since.
What that costs, measured
Isolated experiment, private lock file and ledger via
OS_VERIFY_LOCK_FILE/OS_VERIFY_LOCK_LEDGER— the shared/tmp/os-heavy-verify.lockand its ledger were untouched, so this distorts no fleet reading.Setup: one holder; a
politeslot waiter that times out and parks; newcomer A arriving next (becomes head, enters theflockslice loop); newcomer B arriving after A (position 2, polling); then the polite waiter RETURNS with its slot, stamp older than both.⇒ The slot resume works, with exactly one bounded exception. The returner beat newcomer B — the place is genuinely delivered against every waiter that is merely polling. It could NOT displace newcomer A, which was already blocked inside
flockand is never revisited: once a caller breaks out of the queue loop atpos == 1it re-checks the clock and the slice budget each pass, but never re-checks whether it is still the head.A two-party control run (same harness,
slot-setleg against acontrol-no-slotleg) produced identical acquisition order in both legs, which is the same reading from the other side: against the incumbent head alone, naming a slot buys nothing.Why it is worth recording rather than fixing on sight
flock. FIFO among entry-point callers is intact — measured 3/3 in arrival order in the same harness.flockslice and yield — does NOT close the window:SLICE_Sis 30 s, so a slot resuming inside the last slice before a release still loses. Tightening it further means abandoning blockingflockforflock -nplus polling, which is a contract change to the ordering layer and is the maintainer's, not a fix on sight.⇒ So the cheapest true statement may simply be to correct the header: headship is stable EXCEPT against a resuming slot, and a resuming slot cannot displace an incumbent head. Both halves are measured above; neither is currently written down.
Reproduction
Then the isolated three-party harness described above, driven with
OS_VERIFY_LOCK_FILE,OS_VERIFY_LOCK_LEDGER,OS_VERIFY_LOCK_BOOTSandOS_VERIFY_LOCK_NO_FILTER_CHECK=1, holders written assleep.Reverse-check any zero reading against a term known present in the same file —
git grep -n "VERDICT" -- scripts/pm/os-verify-lock.shreturns many hits — so a zero is a reading rather than a broken probe.Refs