7.4 KiB
id, ticket, title, created, tags
| id | ticket | title | created | tags | ||||
|---|---|---|---|---|---|---|---|---|
| LSN-0070 | runtime-branch-quality-review | Runtime Quality Needs Independent Oracles and Owned Evidence | 2026-10-14 |
|
Context
A branch review found eight gaps spanning deadline reasons, coverage ownership, one-shot audio, recurring VM allocations, callback reclamation, CI enforcement, asset decoder parity and string provenance lookup. Accepted decisions DEC-0058 through DEC-0065 were executed by PLN-0189 through PLN-0196. This lesson preserves the resulting reasoning after removal of those workflow artifacts; the linked published contracts remain normative.
The common failure mode was evidence that proved a nearby property while leaving the intended property unchecked. A callback can avoid locks while still freeing memory. Two decoders can agree on output while accepting the same malformed file. A coverage percentage can rise because ownership moved, without any new test. A fast lookup can hide expensive construction and uncharged metadata.
Key Decisions
Observe the boundary where the guarantee becomes true
The memcard contract keeps the first deadline escalation reason stable while distinguishing durable completion from pending or failed work. Fake-clock boundary tests and explicit publication ordering make those distinctions observable without sleeping.
The audio contract distinguishes one-shot completion from looping and logical inactivity from physical ownership. A finished voice may become silent before its sample can be reclaimed. Two bounded return packets move sample and vector owners to host service; pool exhaustion retains bounded ownership and defers delivery. Count both allocations and frees inside the callback, then independently prove eventual owner release outside it.
Shared mechanics still need independent expected results
The asset contract uses common metadata validation and decoding mechanics for synchronous and incremental paths. Conformance checks include independently specified pixels, palette bytes and PCM, plus malformed metadata and physically truncated payloads. Agreement between two entry points is useful, but cannot by itself establish correctness.
The real production decoder/save ordering fixture pauses at a safe decode step, queues persistent work and checks writes and synchronization before decode resumes. That deterministic ordering oracle is stronger evidence of priority than a latency threshold on one host. Host latency remains a separate observation.
Move cost deliberately and account for the destination
Recurring VM stack/return work reuses capacity after warmup; release allocator checks measure the execution region separately from setup. String provenance uses image and session indices under existing ownership quotas. Index metadata and construction cost are charged and measured, including collision and refusal paths. See the Registry contract and provenance qualification. Lookup improvements do not establish faster game frames or cheaper construction.
The repository owns acceptance and measurement identity
The coverage policy assigns each source to exactly one domain, includes module descendants, and keeps acceptance floors independent of observed percentages. Ownership repair and behavioral improvement must be evaluated separately against the same report before comparing fresh runs.
The shared strict gate records source/config identity, preserves command failures, removes stale reports and publishes available evidence even when a stage fails. Local execution and CI call the same target. A successful focused test does not replace the full gate; a successful local gate does not certify an unexecuted OS.
Published Evidence and Its Limits
The final source commit is 3f9d2355462d3b5675f5edc6e488ab325eb024d8, with Rust
fingerprint 309a069f8b0560d1e9d1f9f4e011b709c89729383aeacd100c8c2ff5c3cff28d.
On macOS/aarch64 with rustc 1.98.1, all twelve make ci-domains stages passed:
1,060 ordinary tests, five socket tests, three runner tests and all fifteen fixed
coverage floors. Thirteen ordinary tests were ignored. The fresh coverage replay
also passed 1,060 tests; those are repeated tests, not additional unique cases.
Current coverage evidence
retains the earlier ownership-repair comparison and identifies the final corpus.
The ten focused coverage tests and two release/all-feature VM allocation tests
passed again during closure without source changes.
Audio qualification retains the named physical-device smoke and the initial device failures. Complementary release measurement ran 1,000 sixteen-voice callbacks while a separate process repeated the real production decoder/FileMemcard fixture fourteen times. Callback p50/p95/p99/max were 14.542/97.667/399.041/1,070.708 microseconds against a nominal 5,333.333-microsecond period. Callback allocation/free counts were both zero; sample owners went from sixteen to zero after teardown. The measurement record records overlapping process intervals, environment and individual pressure rounds.
This is host-concurrent pressure evidence, not same-process console integration or a worst-case latency guarantee. Each pressure round alternates twenty production loads and durable 64-KiB commits; the separate deterministic fixture establishes save preemption during decoding. Physical audio, synthetic timing, allocator counts and save ordering answer different questions and retain separate scopes. No Linux/remote CI, human listening assessment, long-duration soak or gameplay speedup is claimed by this closure.
Related Domain Lessons
- Save publication and resource ownership.
- Repository-owned domain gates.
- Audio delivery and lifecycle.
- Materialization and recurring VM cost.
- Serial async lanes.
- Registry boundaries and owned values.
Pitfalls and Takeaways
- Test the promised boundary with an independent oracle, including failure paths.
- Separate admission, execution, publication and reclamation when reasoning about cost.
- Preserve owner counts and quota accounting when replacing scans or moving work.
- Bind acceptance evidence to source/config fingerprints, not merely a nearby commit.
- Close deferred gates on the final source, while keeping environmental limits explicit.
- Preserve reusable reasoning and durable measurements; discard completed workflow scaffolding.