Store runtime schemas with useDiscrete and activate verified revisions #34
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "codex/discrete-schema-storage"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Editable schema definitions now live in NextGraph YMap documents read through React
useDiscrete.useMemoderives the ORM shapes from the verified Atomic JSON-AD. RDF stores only the schema document pointer and active content-addressed revision, plus legacy schema literals until their next save.Saving stages and verifies a JSON revision before a guarded SPARQL request activates its pointer together with any RDF predicate migration. SHA-256 revision IDs bind the exact canonical definition; object-key reordering survives native CRDT round trips, while changed contents under an existing revision ID are rejected. Resource IDs, URI property keys and metadata are preserved through a reversible path-safe payload codec.
The pinned ORM does not await its discrete engine write in
commitTransaction, so the application bridge tracks that write and verifies storage through a fresh engine read. Failed writes remain inactive and can be retried. Existing schema-editing drafts remain mounted while an incoming revision is verified. The shopping list’sFieldSpec.readKindssupport and integer-position migration from #33 are unchanged.Validation:
Storage and permissions: new schema documents are created in the current wallet’s private store. Sharing a data graph does not automatically share its schema document; readers need access to both. Activation is staged, not a transaction spanning the JSON CRDT and RDF store; rejected activation can leave an inactive revision or unlinked document. Revision pruning and automatic sharing are not implemented. Concurrent record writes during preflight remain subject to RDF conflict behavior. Native checks cover the local engine, not peer transport or durable restarts; the broker-backed suite was not rerun.