docs: close runtime quality review with consolidated lesson
Intrepid/Prometeu/Runtime/pipeline/pr-master There was a failure building this commit
Intrepid/Prometeu/Runtime/pipeline/pr-master There was a failure building this commit
This commit is contained in:
+122
@@ -0,0 +1,122 @@
|
||||
---
|
||||
id: LSN-0070
|
||||
ticket: runtime-branch-quality-review
|
||||
title: Runtime Quality Needs Independent Oracles and Owned Evidence
|
||||
created: 2026-10-14
|
||||
tags: [quality, runtime, ownership, validation]
|
||||
---
|
||||
|
||||
## 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](../../../docs/specs/runtime/08-save-memory-and-memcard.md)
|
||||
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](../../../docs/specs/runtime/05-audio-peripheral.md) 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](../../../docs/specs/runtime/15-asset-management.md) 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](../../../docs/specs/runtime/02c-program-registry-and-pbx-v1.md)
|
||||
and [provenance qualification](../../../docs/vm-arch/string-provenance-qualification.md).
|
||||
Lookup improvements do not establish faster game frames or cheaper construction.
|
||||
|
||||
### The repository owns acceptance and measurement identity
|
||||
|
||||
The [coverage policy](../../../docs/vm-arch/COVERAGE_DOMAINS.md) 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](../../../docs/vm-arch/COVERAGE_DOMAINS_CURRENT.json)
|
||||
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](../../../docs/vm-arch/audio-callback-qualification.md) 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](../../../docs/vm-arch/audio-production-pressure-qualification.json)
|
||||
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](../DSC-0061-memcard-fixed-slots-v1/LSN-0067-save-publication-and-resource-ownership-are-separate.md).
|
||||
- [Repository-owned domain gates](../DSC-0002-runtime-edge-test-plan/LSN-0037-domain-gates-must-be-owned-by-the-repository.md).
|
||||
- [Audio delivery and lifecycle](../DSC-0055-guest-audio-voice-control/LSN-0069-audio-admission-needs-a-delivery-boundary-and-independent-lifecycle-control.md).
|
||||
- [Materialization and recurring VM cost](../DSC-0014-perf-vm-allocation-and-copy-pressure/LSN-0035-first-materialization-is-not-the-same-as-hot-path-copy-pressure.md).
|
||||
- [Serial async lanes](../DSC-0009-perf-async-background-work-lanes-for-assets-and-fs/LSN-0050-serial-async-lanes-bound-backlog-complexity.md).
|
||||
- [Registry boundaries and owned values](../DSC-0058-program-registry-type-and-function-metadata/LSN-0059-registry-boundaries-and-owned-values.md).
|
||||
|
||||
## 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.
|
||||
Reference in New Issue
Block a user