You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pjson object storage is intentionally waiting on PMM rather than building a private workaround. The dependency is distributed across several PMM issues: relocation-safe pmap, relocation-safe forest registry, binary-safe pstringview keys, an executable pmap<K,V> lifetime restriction, and collision-safe persistent type identity for typed handles.
Without one explicit readiness contract, the upper layer can start against a subset of these guarantees and accidentally encode temporary compatibility storage that becomes permanent architecture.
Goal
Define a narrow PMM→pjson handoff contract for persistent JSON object keys/values. This issue does not implement JSON semantics; it proves that the storage primitives required by pjson#34 are stable enough to consume directly.
the identity used by pmap is stable across supported compilers and reloads and does not depend on RTTI, compiler-specific type strings or process addresses;
the exact pjson-shaped value handle (pptr<pjson::node_payload<Manager>> at the consumer boundary) can be represented by an explicit stable pointee identity rather than a pjson-only map registry;
existing primitive/scalar pmap domain identity remains compatible unless an explicit migration is proven necessary.
Add a PMM-level consumer-shaped test using the same representation shape intended by pjson#34: persistent pstringview key handle plus a distinct tagged persistent value-handle pointee that mirrors pjson's node_payload boundary without importing pjson.
The test must cover:
insertion of ordinary UTF-8 key;
insertion of embedded-NUL key distinct from its prefix;
lookup after forced arena relocation;
two semantically distinct typed-handle pmap specializations remain in distinct forest domains;
erase and reinsert;
save/load or equivalent persistence round-trip reproduces the same domain identity;
verify().ok throughout.
Do not import pjson into PMM; mirror only the minimal representation boundary so dependency direction remains PMM → pjson.
Parent: #399
Depends on: #404, #410, #415, #416, #426
Related: #418, #419, #422, #428
Consumer:
netkeep80/pjson#34Problem
pjsonobject storage is intentionally waiting on PMM rather than building a private workaround. The dependency is distributed across several PMM issues: relocation-safepmap, relocation-safe forest registry, binary-safepstringviewkeys, an executablepmap<K,V>lifetime restriction, and collision-safe persistent type identity for typed handles.Without one explicit readiness contract, the upper layer can start against a subset of these guarantees and accidentally encode temporary compatibility storage that becomes permanent architecture.
Goal
Define a narrow PMM→pjson handoff contract for persistent JSON object keys/values. This issue does not implement JSON semantics; it proves that the storage primitives required by
pjson#34are stable enough to consume directly.Required PMM guarantees
Object container
pmap<K,V>mutation survives whole-arena relocation;K/Vsupported lifetime class is compile-time explicit (Define and enforce pmap key/value object-lifetime contract #415);Persistent type identity
pptr<T>representations cannot silently alias one pmap forest domain because their size/traits happen to match (Make pmap persistent type identity collision-safe for typed handles #426);pptr<pjson::node_payload<Manager>>at the consumer boundary) can be represented by an explicit stable pointee identity rather than a pjson-only map registry;Object keys
pstringviewidentity is(length, bytes), not C-string termination (Make pstringview interning length-aware and embedded-NUL safe #416);Registry / bootstrap
.incimplementation is gone;Pointer lifetime
Failure behavior
Conformance test
Add a PMM-level consumer-shaped test using the same representation shape intended by
pjson#34: persistentpstringviewkey handle plus a distinct tagged persistent value-handle pointee that mirrors pjson'snode_payloadboundary without importing pjson.The test must cover:
verify().okthroughout.Do not import pjson into PMM; mirror only the minimal representation boundary so dependency direction remains PMM → pjson.
Documentation closure
pstringviewnode/interner API.Non-goals
$refbehavior;Acceptance criteria
pjson#34are documented in this issue or existing API docs;pjson#34can begin without adding a storage/lifetime/type-identity workaround beneath its JSON semantics.