LMarbles connected-send freshness repair, 2026-11-18
The reproduced delayed-connect gap is repaired in tools/native-supervisor-common.cjs and tools/lmarbles-controller.cjs. A guarded POST now waits for an assigned, connected, writable TCP socket before a synchronous final check and req.end of the complete, previously serialized body. The controller rechecks native PID/start token and listener ownership, permanent closure, owner identity, the complete review records/image binding, Quit policy, targeting freshness and the existing admission/release bounds. An error destroys the request and closes the controller permanently after the already armed independent release. Other callers retain the existing transport behavior. No deadline or native consumption guard changed.
This closes the demonstrated preconnection queueing hole. It does not promise kernel delivery or guest consumption before expiry: the production native guard and consumption receipt checks remain necessary. The earlier authored endpoint's expired body receipt was not proof of native expired acceptance, and this task makes no such claim.
Evidence: scratch/runs/20261118-lmarbles-connected-send-freshness-repair-puzzle8/. The tracked test/test-lmarbles-connected-send.cjs runs the real controller, real loopback HTTP/TCP and production guarded-input implementation, with its real separate release process. Six cases pass: ordinary and strict fresh delivery, delayed socket assignment past review expiry, delayed TCP connection past expiry, owner replacement, and endpoint UNKNOWN. Both expired connections establish an actual connection after the targeting deadline with zero guarded DOWN bodies or guest DOWNs. Fresh delivery verifies body length and owner/epoch/nonce integrity, actual guarded consumption before deadline, release armed before DOWN, matching owner release and physical UP. Failure cases retain release, permanent UNKNOWN and zero later requests on a subsequent pulse. These checks do not substitute HTTP receipt for consumption.
Existing cold threaded desktop startup/source-integrity, sealed resolution and guarded-input regressions passed under finite tools/native-supervise.cjs supervision, as did flock /tmp/wine-build.lock bash tools/build.sh. The actual native SDL windib controller regression passed positive and refusal cases, including strict finite input, independent physical UP, postrelease progress, production queued presentation and complete lossless pixels. All native/supervisor waits and both stream EOFs are retained. An initial DirectX invocation of that fixture failed its black/green pixel oracle; its input/release path completed. Rerunning the fixture's default windib route passed. The failed route remains explicit evidence, not an original-game or browser acceptance claim. The final six-case test rerun also asserts that the connected sockets are actually past expiry. The invoking tool does not expose separate stdout/stderr EOF for that direct rerun; the earlier supervised six-case run does.
One fresh bounded original ran on the native CLI with the exact locked-build module 0d383140f6d4207d18860e3cb22fc8fcc47a5d260b8d5f2443222396b245fdd5, sealed runtime sources and normal real ticks/calendar/timezone. The retained historical module differed from current compiler sources, so the required locked build produced the one new module; no subsequent compilation was repeated. Runtime source hashes and exact relevant Git diffs preserve the tested dirty graph, including foreign WIP without modifying or committing it. The compressed unique tested module is retained with a recovery recipe. There was no browser run.
Actual disk permitted admission above 1.5 GB, with no RAM or additional reserve gate. The complete menu/setup and Tutorial board were personally reviewed. Two ordinary Enter inputs reached Tier 1 Puzzle 1, with matching independent releases. No marble slide occurred. A 100 ms disk sampler observed 1,499,926,528 bytes available and permanently closed the scope at epoch 1795005618.101; its final drain minimum was 1,499,836,416. The attempted ordinary Puzzle8 selection was refused locally by sticky UNKNOWN before any endpoint request. No original was replayed, no further endpoint was queried and no Quit was attempted after closure. The normal harness wait exit 0 follows supervisory cancellation and is not guest Quit evidence. Puzzle8 clear, tally/onward and ordinary Quit remain unproved. The earlier 31 slides remain separate historical evidence. The global writer responsible for this task's floor crossing is not established here.
A local manual wrapper initially tried to create the binding review twice; its exclusive-save refusal happened outside the controller before input. The wrapper was corrected to reuse that immutable review and continued. No solver, autoplay, OCR, board memory/state read, configuration/save/media/clock/polling/focus change was used. Intermediate menu images and superseded authored fixture output were pruned only from this owned run; named initial/setup/Tutorial and native consequence images remain. No foreign cleanup, workers, boxes, Python, Wine or deployment. Box ID null, state NOT_CREATED, expiry null, stop receipt null. The author tests, commits and strictly pulls/pushes the repair in this task, then releases ownership and stops.