P03: establish integration digest authority - #29
Merged
Conversation
Make identity.mjs the one P03 digest authority behind every RunIdentityV1 surface and register the centrally ratified R1 label set: - IDENTITY_LABELS becomes a frozen null-prototype closed registry of the three established RunIdentityV1 spellings (run-manifest.v1, assignment-prompt.v1, child-envelope.v1) plus the ratified R1 surfaces (run-identity.v1, child-identity.v1, resolution-snapshot.v1, resolved-lane-binding.v1, workspace-anchor.v1, workspace-identity.v1, dispatch-attempt.v1, provider-operation.v1, provider-run-identity.v1, request-idempotency.v1, provider-capability.v1, evidence-bundle.v1, verification-policy.v1, verification-command-descriptor.v1, verification-executable-closure.v1, verification-command-plan.v1, and verification-execution-receipt.v1). No runtime registration exists: membership is fixed at module load. - Export exact caps MAX_IDENTITY_DIGEST_PARTS = 16 and MAX_IDENTITY_DIGEST_INPUT_BYTES = 4_194_304. - Every digest path now resolves its label through the closed registry, so callers can never hash under an arbitrary or unregistered label: grammar-only admission is gone and unregistered strings fail with a stable unknown_label error before any byte is read. - Byte parts must be ordinary Buffer instances: live and revoked Proxies are rejected before any trap dispatch, non-Buffers and typed-array views/DataViews/ArrayBuffers/SharedArrayBuffers/growable ArrayBuffers fail closed, and custom prototypes fail against an exact Buffer.prototype check. No coercion ever runs. - Lengths and viewed backing stores are read only through trusted %TypedArray% internal slots. Bytes are snapshotted so later caller mutation cannot drift a digest. Part count and total input bytes are checked against the exact caps with stable parts_exceeded / unbounded_input errors in a fixed validation order. - Indexed descriptors are captured through precomputed numeric keys. Buffer writeUInt32BE, hash update/digest, JSON stringify, String, and reflection/collection/typed-array intrinsics are captured at clean import. - Add identityDigestV1(label, parts), the generic downstream entry point. It accepts only closed-registry constants. - Preserve P02 identity semantics: an own diagnostic-partial authorization of exactly false normalizes like absence; exact true remains identity-distinct. The framing is untouched — length-prefixed domain, big-endian version, length-prefixed label, length-prefixed parts — so all existing manifest, assignment-prompt, child-envelope, and prompt-golden digests keep their exact bytes.
Add the P03 adversarial suite for identityDigestV1 and the closed label registry. Coverage includes unregistered and unratified labels, ordinary Buffer-only parts, SharedArrayBuffer and growable ArrayBuffer rejection, zero-trap Proxy and getter rejection, O(1) decorated-container handling, detached-backing normalization, exact 16-part and 4MiB caps, captured writeUInt32BE/hash/JSON/String seams, framing uniqueness, and golden stability for the existing RunIdentityV1 surfaces on the accepted product-foundation base.
Record the closed IDENTITY_LABELS registry, identityDigestV1 Buffer-only digest authority, exported 16-part/4MiB caps, P02 diagnostic-partial identity normalization, and the captured-intrinsic hardening of detached, SharedArrayBuffer, and growable backing stores.
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.
Publishes the accepted P03 integration-digest authority slice.
05446608855ea55ee6e559d31bb9d3a4be4e1819b7e4b20dbcabeb04e7e1b3886e98a1f39582b27dACCEPTED_CLEAN_LINEAGE1a1c28c05c2fa1367708eb2f1a7041065530a78f04491ffb02cf86cec1164a94b7e5b58ef5613a8bae06889381328320716c28b3b6f9b28e4fbe7503cd7ce247Review and CI authority applies only to the exact final head/tree above. The unrelated rejected PR #28 head
9a37eba62dd35a6b54d96e11105ea9deadec0a10is absent from this ancestry.