Home Contact
Universal Substratev1.4
/
For agents Markdown

Appendix G. Exact wire, digest, append, event, and query reference vectors

These compact vectors make the prose testable. The maintained conformance repository must provide byte files, expected digests, detached proofs, SQL setup/teardown and multi-language runners. Ellipses in explanatory panels are not fixtures; executable…

Concept & directionLNK

These compact vectors make the prose testable. The maintained conformance repository must provide byte files, expected digests, detached proofs, SQL setup/teardown and multi-language runners. Ellipses in explanatory panels are not fixtures; executable vectors contain complete 64-hex digests and complete IDs.

#G1. Canonical JSON rejection and acceptance matrix

Input differenceCanonical dispositionReason
object members arrive in another orderaccept; canonical bytes sort membersmember order has no semantic meaning under the JSON profile
set-valued subjects arrive in another orderaccept; schema total-key sortsthe schema—not the field name—declares set semantics
ordinary array arrives reordereddifferent record or invalidsequence semantics are preserved
duplicate JSON memberreject before object constructionparsers must not choose first/last value differently
internal canonical text is decomposed Unicoderejectsigned internal lexical form must already be canonical
external serial uses variant spacing/casepreserve sourceValue; optional attributed normalized derivationsource evidence is not silently rewritten
open interval includes end:nullrejectabsence means open; JSON null is not a canonical union member
number is 1e3, +1, 01, -0 or NaNrejectnumeric lexical forms are closed and deterministic
unknown body field outside extension pointrejectclosed schemas prevent accidental semantic drift
unknown namespaced extension with valid lockaccept and round-tripextension preservation supports open-world growth
Table
Reference verifier order
# byte-level verifier outline
raw = read_exact_bytes(limit=8_MiB)
obj = strict_parse(raw, reject_duplicate_keys=True, reject_invalid_utf8=True)
locks = registry.resolve_local(obj.schemaLock, obj.vocabularyLocks)
schema.validate_closed(obj)
lexical.validate_without_mutation(obj)
canonical = jcs_profile_1.serialize(obj, schema_set_sort_keys=locks.setKeys)
assert jcs_profile_1.serialize(strict_parse(canonical)) == canonical
recordDigest = sha256(b"RTRACER\x00RECORDCORE\x00v1.3\x00" + canonical)
verify_detached_proofs(recordDigest, current_trust_snapshot)

# never hash parsed dictionaries, ORM objects, protobuf messages, pretty JSON,
# database text, decompressed guesses or a projection as RecordCore bytes.

#G2. Admission race oracle

Concurrent request pairPermitted committed resultClient outcome
same scoped idempotency key + same request digestone record, one receipt, one outbox eventboth receive original receipt; later response may be replay
same scoped key + different request digestat most first requestother receives equivocation conflict and security finding
different keys + same recordId/digestone unique record admissionother resolves duplicate record receipt or explicit conflict by profile
different keys + same stream expected sequenceone next sequenceloser receives expected-sequence conflict and reloads
old writer epoch + correct expected sequenceno append by stale writerterminal fencing failure for that writer
outbox publish crashes after broker ackone outbox row, possible duplicate deliveriesconsumers converge by stable eventId

#G3. Canonical record, receipt, event, and projection digest boundaries

Changed factDigest that must changeDigest that must not change
portable body or semantic fieldrecord/body; downstream receipt/projectionunrelated records
detached signature addedProofRecord/proof setRecordCore digest
tenant, stream sequence or received timeadmission receiptportable RecordCore
broker retry or consumer offsettransport-operation telemetry onlycanonical eventData, eventId, record and receipt
audience/policy/redaction/as-of timeprojection digest/ETagsource records/receipts
object encryption nonceencoded artifact/envelope digestplaintext artifact digest
schema migration projectionnew record/projection/migration receipthistorical source bytes

#G4. Stateful API transcript requirements

  1. Create two principals and two sender-bound credentials; prove that a token for service A fails at service B.
  2. Append a record at expected stream sequence zero; verify canonical bytes, record digest, receipt digest, sequence one and outbox event.
  3. Repeat the exact request after simulating a connection loss; obtain the same receipt and no second record/event.
  4. Retry the key with one changed body byte; receive the equivocation code without revealing prior private body content.
  5. Build public and owner projections at the same checkpoint; prove distinct projection digests and public non-interference after a private record is added.
  6. Replay broker delivery twice; materialized view and checkpoint advance once while delivery metrics count both attempts.
  7. Export the checkpoint-pinned dossier, verify every digest offline, import into another tenant as external assertions, and prove local grants/ownership are not copied.