Share asset decoding validation and reject truncated payloads
This commit is contained in:
+29
@@ -86,6 +86,35 @@ surfaces unless the caller violated the structural ABI.
|
||||
Do not reopen FS public API scope while wiring internal async-lane consumers.
|
||||
The lane can support FS-style work without deciding request/poll semantics.
|
||||
|
||||
## Share format rules without sharing execution strategy
|
||||
|
||||
The glyph, sound and scene decoders now consume one private driver validation
|
||||
module. Complete-buffer decoding can materialize a whole payload, while the
|
||||
shared worker retains state and reads at most 4096 bytes per decode step. Sharing
|
||||
validation does not require replacing cooperative IO with a full-buffer read.
|
||||
|
||||
A differential test alone is insufficient: both paths can agree on a mistake.
|
||||
Use independent expected banks and rejection fixtures, then compare each entry
|
||||
point against those expectations. Include physical file carriers: an in-memory
|
||||
slice rejects an out-of-range request before a decoder runs, which can conceal
|
||||
a short-file discrepancy in a reader that accepts EOF. The initial corpus found
|
||||
that legacy PCM and scene loads accepted missing declared bytes. After an
|
||||
explicit compatibility decision, both modes reject those files while still
|
||||
ignoring a physically present odd PCM tail.
|
||||
|
||||
The production pressure regression pauses the real decoder after a safe step,
|
||||
queues a persistent memcard save, and observes save writes and synchronization
|
||||
before the next asset step. It checks all three multi-chunk asset kinds, the
|
||||
single worker identity, complete output, deferred frame publication and saved
|
||||
data after remount. This establishes priority and retained progress through
|
||||
observable ordering, rather than a host-specific latency threshold. Separate
|
||||
regressions cover cancellation, superseding and preload publication.
|
||||
|
||||
This refinement follows [DEC-0064](../../workflow/decisions/DEC-0064-q7-share-asset-decoding-validation-and-conformance.md).
|
||||
The published contract is [Asset Management](../../../docs/specs/runtime/15-asset-management.md#43-decoding-validation-and-physical-payload-completeness).
|
||||
The ordering fixture uses the persistent transaction protocol with a deterministic
|
||||
storage backend; file-host latency measurements remain separate evidence.
|
||||
|
||||
## Takeaways
|
||||
|
||||
- A runtime async lane is an ownership boundary, not just an implementation
|
||||
|
||||
Reference in New Issue
Block a user