🏷️ Issue: Support Parent-Aware Deferred Packing for Large Objects
Summary:
PAOSP currently defers packing of large objects (e.g. nested maps, slices, containers) that exceed the 8KB container limit. This issue formalizes the behavior where such objects are logically retained by the parent frame via placeholder headers and offset patching, enabling scalable, recursive encoding without breaking offset provenance.
📌 Goals
- Preserve logical ownership of large deferred objects within their parent container
- Maintain offset-indexed framing and reproducible layout across multi-container structures
- Ensure teardown-safe patching and GC neutrality during deferred packing and decoding
🔄 Packing Strategy
-
Placeholder Header Emission
When a large object is encountered, emit a TypeContainer header in the parent with a reserved offset (e.g. 0xFFFF) signaling deferred packing.
-
Deferred Queue Management
Add the object and its logical parent offset to a packing queue for post-container processing.
-
Child Container Encoding
Encode the deferred object into a new PAOSP container, preserving offset domains and type tags.
-
Offset Patching
After encoding, patch the parent’s placeholder header with the final offset of the child container.
🧪 Teardown & GC Implications
- Validate offset patching logic to prevent cross-container contamination
- Ensure GC neutrality by avoiding retained slices during queue processing
- Benchmark allocation discipline across parent-child container chains
- Surface risks of offset chain corruption or decoder misalignment
✅ Acceptance Criteria
- Large objects (>8KB) are deferred and encoded into child containers
- Parent headers are correctly patched with child offsets
- Decoder traverses offset chains recursively and teardown-safely
- Binary layout remains reproducible across runs and packing variants
Issue rewritten by Copilot
🏷️ Issue: Support Parent-Aware Deferred Packing for Large Objects
Summary:
PAOSP currently defers packing of large objects (e.g. nested maps, slices, containers) that exceed the 8KB container limit. This issue formalizes the behavior where such objects are logically retained by the parent frame via placeholder headers and offset patching, enabling scalable, recursive encoding without breaking offset provenance.
📌 Goals
🔄 Packing Strategy
Placeholder Header Emission
When a large object is encountered, emit a TypeContainer header in the parent with a reserved offset (e.g. 0xFFFF) signaling deferred packing.
Deferred Queue Management
Add the object and its logical parent offset to a packing queue for post-container processing.
Child Container Encoding
Encode the deferred object into a new PAOSP container, preserving offset domains and type tags.
Offset Patching
After encoding, patch the parent’s placeholder header with the final offset of the child container.
🧪 Teardown & GC Implications
✅ Acceptance Criteria
Issue rewritten by Copilot