Phase F F2/F3: quarantine NOT deletable — the lever proved the drop is load-bearing; registry keeps the fact
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Td4ujboGuAw26jvbDQzehj
This commit is contained in:
parent
94e5c68909
commit
7122cdc461
5 changed files with 67 additions and 10 deletions
|
|
@ -1 +1 @@
|
||||||
14
|
15
|
||||||
|
|
|
||||||
|
|
@ -1186,6 +1186,40 @@ Flake watch: `ngspice-probe` "bg_run streams events live" has now failed twice
|
||||||
under full-suite parallel load and passed 4/4 solo both times — a de-flake
|
under full-suite parallel load and passed 4/4 solo both times — a de-flake
|
||||||
candidate, not a regression.
|
candidate, not a regression.
|
||||||
|
|
||||||
|
### F2/F3 — the quarantine is NOT deletable, and the lever proved exactly why (2026-08-09)
|
||||||
|
|
||||||
|
The deletion was BUILT and MEASURED, not assumed. What was tried: the registry
|
||||||
|
learned the shim's one private fact — "this fiber's body holds an in-flight
|
||||||
|
in-place handleSleep park" (`Context::inplace_parks`, fed through
|
||||||
|
`wxWasmSchedInplaceParkBegin/End` from the handleSleep wrap at park start/end) —
|
||||||
|
`fiber_enterable()` narrowed on it, a registry-informed refusal was added in
|
||||||
|
`jump_fcontext` (`jump-refused-inplace`), and the shim's
|
||||||
|
consume-once/quarantine block was deleted with the lever spec flipped to
|
||||||
|
assert the new refusal.
|
||||||
|
|
||||||
|
**Measured verdict: scenario 1 (direct mid-park poke) works — refused at C++,
|
||||||
|
body completes. Scenario 2 (the laundered poke) FAILS on a mechanism the
|
||||||
|
quarantine was silently covering:** under staged attribution rot the SECOND
|
||||||
|
coroutine's `return_to` is poisoned toward the parked fiber, so its
|
||||||
|
YIELD-BACK jumps into it. A C++-level refusal answers with the ghost contract
|
||||||
|
— which GHOST-RESUMES the yielding coroutine, and it runs to completion
|
||||||
|
(`phase2` overshoots 1→2). The quarantine's drop-at-finishContextSwitch
|
||||||
|
leaves the yielding side properly suspended — for a misrouted yield-back,
|
||||||
|
drop is the only correct recovery a non-invocation-aware layer can make.
|
||||||
|
|
||||||
|
**Deleted the deletion; kept the knowledge.** Landed and kept: the registry's
|
||||||
|
in-place-park fact + Begin/End plumbing (the fiberStackParks counter now
|
||||||
|
attributes parks to contexts), the `fiber_transfer` refusal for inplace-parked
|
||||||
|
targets (the star's real lane, where attribution cannot rot), the
|
||||||
|
`fiber_enterable` narrowing, and the divergence beacons that now light up the
|
||||||
|
laundering (`sched-divergence-current/enterable`, `FIBER-SWAP-NONENTERABLE`).
|
||||||
|
The quarantine block is restored verbatim with a header naming its remaining
|
||||||
|
duty. **Prerequisite for the real deletion, now precisely named:
|
||||||
|
registry-authoritative jump attribution** (the gap-3 redesign — libcontext
|
||||||
|
needs a sched-id→context reverse map so a divergent `old` side is corrected at
|
||||||
|
the jump instead of poisoning `return_to`). Until then, `fiber-resume-park`
|
||||||
|
scenario 2 stays pinned on the quarantine beacon — deliberately.
|
||||||
|
|
||||||
### Prod-provider smoke (2026-08-08) — done, with one pre-existing red bisected
|
### Prod-provider smoke (2026-08-08) — done, with one pre-existing red bisected
|
||||||
|
|
||||||
Against the live web stack (playwright-web config, reference backend :3060):
|
Against the live web stack (playwright-web config, reference backend :3060):
|
||||||
|
|
|
||||||
2
kicad
2
kicad
|
|
@ -1 +1 @@
|
||||||
Subproject commit 452eb5260d8a73c2bd0dff8d2a53ab2c05f116be
|
Subproject commit 6e6cf51027a5b045629518935d78a7683b43535a
|
||||||
|
|
@ -521,20 +521,28 @@ if (typeof Asyncify !== "undefined" && !globalThis.__wxSchedulerInstalled) {
|
||||||
if (Asyncify.state !== 0) {
|
if (Asyncify.state !== 0) {
|
||||||
return __originalHandleSleep(startAsync);
|
return __originalHandleSleep(startAsync);
|
||||||
}
|
}
|
||||||
// Phase E telemetry (doc 22 §5): count fresh in-place parks that begin
|
// Phase F (doc 22 §10 F2/F3): report every fresh in-place park to the
|
||||||
// on a NON-main stack (tool coroutine / scheduler context). Must reach
|
// REGISTRY. Begin() returns the owning context id (0 = main stack);
|
||||||
// ZERO at the flip — until then it measures the remaining doc-19-class
|
// while recorded, fiber_enterable()/fiber_transfer refuse entering that
|
||||||
// exposure. Leaf probe into wasm; state is 0 here so no unwind is in
|
// context — the registry-owned replacement for the deleted quarantine.
|
||||||
|
// Also the Phase E telemetry: fiberStackParks must be 0 at the flip's
|
||||||
|
// repro gate. Leaf probe into wasm; state is 0 here so no unwind is in
|
||||||
// flight yet.
|
// flight yet.
|
||||||
|
var parkOwnerCtx = 0;
|
||||||
try {
|
try {
|
||||||
if (Module["_wxWasmProbeOnFiberStack"] && Module["_wxWasmProbeOnFiberStack"]()) {
|
if (Module["_wxWasmSchedInplaceParkBegin"]) {
|
||||||
AsyncifyScheduler.inplaceParksOnFiberStack++;
|
parkOwnerCtx = Module["_wxWasmSchedInplaceParkBegin"]() | 0;
|
||||||
__rec("inplace-park-on-fiber-stack n=" + AsyncifyScheduler.inplaceParksOnFiberStack);
|
if (parkOwnerCtx) {
|
||||||
|
AsyncifyScheduler.inplaceParksOnFiberStack++;
|
||||||
|
__rec("inplace-park-on-fiber-stack ctx=" + parkOwnerCtx
|
||||||
|
+ " n=" + AsyncifyScheduler.inplaceParksOnFiberStack);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (e) { /* probe must never break a park */ }
|
} catch (e) { /* probe must never break a park */ }
|
||||||
var sleepCtx = {
|
var sleepCtx = {
|
||||||
capturedData: null,
|
capturedData: null,
|
||||||
cleanedUp: false,
|
cleanedUp: false,
|
||||||
|
parkOwnerCtx: parkOwnerCtx,
|
||||||
rootOwned: (typeof Fibers === "undefined")
|
rootOwned: (typeof Fibers === "undefined")
|
||||||
|| (!Fibers.__inFiberEntry
|
|| (!Fibers.__inFiberEntry
|
||||||
&& !(Asyncify.__wakingOwnerFiber || false)),
|
&& !(Asyncify.__wakingOwnerFiber || false)),
|
||||||
|
|
@ -544,6 +552,14 @@ if (typeof Asyncify !== "undefined" && !globalThis.__wxSchedulerInstalled) {
|
||||||
var cleanup = function () {
|
var cleanup = function () {
|
||||||
if (sleepCtx.cleanedUp) return;
|
if (sleepCtx.cleanedUp) return;
|
||||||
sleepCtx.cleanedUp = true;
|
sleepCtx.cleanedUp = true;
|
||||||
|
if (sleepCtx.parkOwnerCtx) {
|
||||||
|
try {
|
||||||
|
if (Module["_wxWasmSchedInplaceParkEnd"]) {
|
||||||
|
Module["_wxWasmSchedInplaceParkEnd"](sleepCtx.parkOwnerCtx);
|
||||||
|
}
|
||||||
|
} catch (e) { /* never break a wake */ }
|
||||||
|
sleepCtx.parkOwnerCtx = 0;
|
||||||
|
}
|
||||||
var idx = Asyncify.__pendingSleepContexts.indexOf(sleepCtx);
|
var idx = Asyncify.__pendingSleepContexts.indexOf(sleepCtx);
|
||||||
if (idx !== -1) Asyncify.__pendingSleepContexts.splice(idx, 1);
|
if (idx !== -1) Asyncify.__pendingSleepContexts.splice(idx, 1);
|
||||||
};
|
};
|
||||||
|
|
@ -625,6 +641,13 @@ if (typeof Asyncify !== "undefined" && !globalThis.__wxSchedulerInstalled) {
|
||||||
// --- stale-fiber-rewind guard (ported from handlesleep.js; semantics
|
// --- stale-fiber-rewind guard (ported from handlesleep.js; semantics
|
||||||
// unchanged — these encode the consume-once/quarantine contracts of
|
// unchanged — these encode the consume-once/quarantine contracts of
|
||||||
// docs/features/async/16) + trampoline heal ownership -------------------
|
// docs/features/async/16) + trampoline heal ownership -------------------
|
||||||
|
// Phase F F2/F3 (doc 22 §10, 2026-08-09): deletion was built, measured and
|
||||||
|
// REVERTED. The registry now carries the in-place-park fact
|
||||||
|
// (wxWasmSchedInplaceParkBegin/End) and refuses on the transfer lane, but
|
||||||
|
// the quarantine's DROP is still the only correct recovery for a misrouted
|
||||||
|
// yield-back under attribution rot (a C++-level refusal ghost-resumes the
|
||||||
|
// yielding coroutine — measured as the lever's phase2 overshoot). This
|
||||||
|
// block stays until attribution is registry-authoritative (gap 3).
|
||||||
if (typeof Fibers !== "undefined"
|
if (typeof Fibers !== "undefined"
|
||||||
&& typeof Fibers.finishContextSwitch === "function"
|
&& typeof Fibers.finishContextSwitch === "function"
|
||||||
&& !Fibers.__staleRewindGuardInstalled) {
|
&& !Fibers.__staleRewindGuardInstalled) {
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit a8d9ece31f9130dc5b8726924fd2f6f34f1b305f
|
Subproject commit 68787c1f4418998504a7d0f3b806a494f0c8d109
|
||||||
Loading…
Reference in a new issue