fix App, clean up, add metadata convergence

This commit is contained in:
2026-03-24 13:42:48 +00:00
parent ee6b1b54c9
commit f34c5a7691
10 changed files with 309 additions and 623 deletions
@@ -94,6 +94,17 @@ Rules:
- `output.metadata` carries runtime-relevant format-specific detail;
- codec must remain explicit and must not be hidden inside format naming.
## Metadata Source Segmentation and Runtime Sink
`asset.json` may keep metadata segmented by concern during authoring.
Rules:
- declaration-time metadata may come from multiple sources under the asset contract (for example, format metadata, codec-related metadata, and build/pipeline-derived declarations);
- this segmentation exists for authoring clarity and does not define multiple runtime sinks;
- runtime consumers must read effective metadata from the runtime asset entry metadata sink (`AssetEntry.metadata`);
- convergence/normalization behavior is normative in the build artifact specification.
## Build
`build` is optional and process-oriented.
@@ -79,6 +79,17 @@ Rules:
- no synthetic dense reindexing layer;
- `asset_name` remains present as logical/API-facing metadata.
### Asset Entry Metadata Convergence
Each emitted asset entry has one runtime metadata sink: `AssetEntry.metadata`.
Rules:
- packer materialization must normalize all runtime-consumable metadata-producing sources into `asset_table[].metadata`;
- equivalent declaration/build inputs must produce equivalent normalized metadata;
- metadata key collisions across independent sources must fail build unless the family/format spec declares an explicit merge rule;
- normalization behavior must be testable and covered by conformance-oriented tests.
### Preload
Preload is emitted deterministically from per-asset declaration.
@@ -114,6 +125,12 @@ Rules:
- any required alignment must be normative and visible;
- emitted offsets are always relative to the payload region, never the start of the full file.
Offset ambiguity guardrail:
- `asset_table[].offset`/`asset_table[].size` describe payload slicing inside `assets.pa`;
- internal pipeline indexing data (for example per-sample ranges for audio banks) must live under `asset_table[].metadata`;
- internal indexing fields must not be interpreted as payload slicing fields.
## Determinism
Equivalent build inputs must produce equivalent outputs.
+1 -2
View File
@@ -8,8 +8,7 @@ Specs define the official packer contract.
They exist to make behavior, constraints, interfaces, and artifact guarantees stable across implementation and review.
The current domain also has a bootstrap draft in [`../Prometeu Packer.md`](../Prometeu%20Packer.md).
That draft can be used as source material, but long-term normative content should be decomposed into focused specs here.
The packer normative content is maintained directly in this `specs/` corpus.
## Expected Format