Current D3DIM stream shutdown coverage — 2026-11-16

node test/test-d3dim-current-stream-shutdown.js exercises the current d3dim-gps endpoint through lib/gpu-stream-render-worker.js and a real lib/d3d-render-worker.js Worker. No production defect was reproduced and no production repair is claimed. The new test restores runnable coverage without bringing back the deleted GPU engine.

The historical readback, worker-close and passive-inspection tests remain unmodified, unadopted WIP. Their module loaders require lib/d3dim-gpu.js, deleted by 51ca79f5dc81d838b29f235776f6137153ce1829. The old readback test currently exits 1 with ENOENT. Their historical distinctions—normal completion before close, cancellation before disposal, late continuations, identity replacement, and passive observation versus publication proof—inform this test, but their PBO/fence promises are not current D3DIM capabilities. The requested d3dim-async-readback-regression-contract-20261113.md is absent. Ownership history and the retained new-file patches were reviewed before choosing to leave those old tests untouched.

Current contracts and assertions:

The current-tree test and the same test loading committed worker/adapter sources at 358a20bae58e01713036332cb443426d98cd7b48 both pass. The committed source loader runs inside the real Worker too. Foreign worker/adapter WIP is recorded as patches, remains unadopted and is not committed by this task. An isolated in-memory mutation removing both stream subscription generation checks fails at retired generation cannot drain replacement (done_seq 5 instead of 2). This is test sensitivity evidence, not a reproduced production defect. The existing doorbell-retirement regression also passes.

The canonical flock /tmp/wine-build.lock bash tools/build.sh passed, as did focused tests, syntax, test-tier membership and timeout checks. Evidence: scratch/runs/20261116-d3dim-current-stream-shutdown-crash-coverage/result.json. It retains exact Git identity, relevant binary diffs, owned new-file patches, source hashes, compact output and actual process wait/EOF records. Each run has a prearmed independent native Python supervisor deadline and process-group cleanup; the watchdogs did not fire. The process render Worker's STOP retires its heap but keeps its message port alive; the harness explicitly terminates that Worker and awaits its exit (1 for requested termination). The SYNC producer Worker exits normally with 0. No box was created: ID/expiry null, state NOT_CREATED, stop receipt not applicable.

Limits: the producer is the existing JS byte-for-byte shared-ring fixture, not a guest D3DIM/WAT producer invocation. Rendering evidence uses the real software WAT executor, not browser WebGL, native GPU fences, context loss, ImageBitmap disposal or the removed asynchronous PBO readback engine. Ring subscription identity is tested; guest surface generation and page publication joins are not inferred from it. No game, original media or input was used. Whole27, hardware behavior and general crash freedom remain unproved.

Next work, if requested, is browser WebGL stream lifecycle qualification against its actual synchronous presentation/readback contract; the old async test should not be counted as passing coverage in the meantime.