Give the hold's guard a mutant that reads the timeout, and reach it

Soul's sixth pass (N4): `(woken || timeout_ms > 1000) && HELD` survived both
targets. The two existing hold entries only rearrange the guard's syntax,
and `holdtimeout`'s single 150 ms poll sits below any threshold such a guard
would carry.

`holdtimeout` now runs two idle polls under the armed hold, 150 ms and
1300 ms, and holds for 2200 ms. The new entry is that guard. Compiled in on
both targets, the 1300 ms poll is parked until the release and returns at
about 2200 ms, and every other scenario stays green. The harness kills it
on both targets.

With the two polls running together, the first poll's exit also wakes the
second. That gives the asserts build a second multi-threaded witness for the
predicate: the N1 revert and read-what-woke mutants die here as well as on
`pollbusy`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-22 02:01:41 +02:00
commit ff72f16ed6
2 changed files with 53 additions and 25 deletions

View file

@ -615,6 +615,16 @@ const mutations = [
old: " if (woken && CULTMESH_QUIC_DEBUG_HELD(lock)) return 0;\n",
new: " if (CULTMESH_QUIC_DEBUG_HELD(lock) && woken) return 0;\n",
},
{
target: "native",
honestOn: ["linux-x64", "win32-x64"],
// A guard that reads the input instead of the wake: a long wait is surely a
// wake worth holding. It is the identity on any poll under its threshold, and
// `holdtimeout`'s second, longer poll is what sits above it.
rule: "the hold parks only a call the wait woke (loosening: it also parks any long wait)",
old: " if (woken && CULTMESH_QUIC_DEBUG_HELD(lock)) return 0;\n",
new: " if ((woken || timeout_ms > 1000) && CULTMESH_QUIC_DEBUG_HELD(lock)) return 0;\n",
},
// The close's wake. It was defended by committed code and had no entry, so the
// table understated what `closerace` covers; these say it.
{