Repository navigation
docs: canonical JSON and content IDs (closes #74) - #114
Merged
Merged
Conversation
Documents the public @triplex-build/triplex/content encoder and content IDs: the byte-identity contract (UTF-16 key order, undefined handling, -0, finite numbers, rejected types and cycles), what it does not promise (RFC 8785 conformance, Unicode normalization), domain-separated ContentId.hash, and how a host moves its own encoder onto it without changing stored hashes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Documentation preview removed (PR closed). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #74. Docs only; no package change, so no changeset.
Canonical JSON and content IDs
New page
docs/content-hashing.md(Reference sidebar, after Storage footprint) for the public@triplex-build/triplex/contentexports:CanonicalJson.encodeOrThrow/CanonicalJson.encode(Effect),ContentId.hash(domain, payload),isContentId,ContentIdSchema,short,Sha256.hex. Checkedts checkexample.undefinedproperties omitted,undefinedarray slots asnull; shortest round-trip numbers with-0→0; non-finite numbers,Date,BigInt, functions, symbols, class instances and cycles rejected with aCanonicalEncodingErrorcarryingreasonandpath.ContentId.hash; use your own names, nottriplex/*.Every behaviour on the page was checked against the build:
{z:-0,a:[undefined,1]}→{"a":[null,1],"z":0};{b:1.0,a:{y:undefined,x:"é"}}→{"a":{"x":"é"},"b":1}; aDateatattrs.whenfails withunsupported_typeat pathattrs.when.pnpm docs:checkandpnpm docs:buildpass (55 local links).Branches deleted on 2026-11-18 (restore record)
Ben approved deleting these 24 remote branches. Each still exists as the head of its PR, and any one can be restored with:
bench/tx1-baseline-source(the exact source #61 measured) is kept. So aremain,changeset-release/main, and the open Dependabot branches for #112 and #113.bench/tx1-position-contention842129fbbde17702b7853764d5edb4c57cb7f927conductor/entity-write-helpers3eefe14a3b541818fd91ef0ada05c374d1e3badfconductor/large-incremental-commits-in-memory56998c8fd31c6157189b76e81a4970b04e881f9econductor/triplex-commit-validators220f8f4e8c8fae5223a54929f99a9b993e35c7eeconductor/worldvm-rollout-triplexfbfd874cc1c0df363b561d3e4c095b2b02b5b596design/tx1-late-allocation75d8ef67ca5ca61c4396e28ba60992fccdcc86aedesign/tx1-scoped-concurrencyec948a59b2d8c7c75252dd752d67f22767d7c184docs/operational-followup-issues77a161f810b955abe549945879b6b2b4de2e6347docs/tx3-host-sealing-rfc69d9eea1b8f0f020760d52b03b3604b0fdbd2cc6ergonomics/next-29e039b55b44eac9cd809be62f4b460902f670fa6ergonomics/one-packagee92d440203a0c5d14a3f78bb7651d064fa35c8bffeat/tx4-operational-entries68e25ebaec69c426d84bbfff58d8a822bef90b3ffeat/tx8-schema-guard3885a8f84b37c7d42a195153d9a7560a6faf2e5bfix/tx2-host-position-basisa87d485b050465a7a116459e095a27a597519fd8investigate/tx1-invariant-scopes9c3a939dd29bd28572d628fa09fd1d01c7286982investigate/tx1-ordered-publication3cb0118584bf22085ac1b10dfca7592dabde70adsensitive/erasured759f6eacb74362e9ca0e90b067bd54eb48e5fe5sensitive/no-token-copiesef188a32b893e24b5f94a30f787c0b826970144fsensitive/sql-key-provider3d712da59a4f5ff5cfa680cb563c9917bc3b89bashanghai-v5d6ae24a8ab154fdfea85485bcd8ea2ab09877aa1site/hero-animationc96bf6412b464b5832d77a24cbdb4bd162fecf9asite/wave-one734a542e8f972f274480a0fe45419a0cc59c1284ulaanbaatarcc9c98475226b9e52631b759adb9bfa8d8243150worldvm/kv-memory-performance51696ac2d6e5940dc4ba5cdb55b84215f53258d8🤖 Generated with Claude Code