docs(health-twin): cross-reference estate-safety-kit's mintId.ts - #1336
Merged
Conversation
…e fast-follow ids.ts's mint-not-derive pattern (fixed here in #1070) was independently re-derived a third time for bootProofRecord in socioprophet's server contracts (#484) — no code shared either time. That duplication is what SourceOS-Linux/sourceos-spec#276 exists to close: a canonical estate-safety-kit/js/mintId.ts generalizing this exact pattern, with a `bytes` parameter so a caller can request this file's own stricter 256-bit width instead of forking the helper. Not converting ids.ts to a vendored copy in this change: the kit's default width is 128 bits, and a blind file-swap would silently narrow every id this service mints from 256 to 128 bits unless every call site (server.ts, consult.ts, invariants.ts) is updated in the same change to request 32 bytes explicitly. That's a real, reviewable refactor, not a comment. Tracked as prophet-platform#1335. 23/23 health-twin tests still pass — comment-only change.
mdheller
enabled auto-merge (squash)
August 4, 2026 00:32
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.
What this is
Comment-only change to
apps/health-twin/src/ids.ts, cross-referencingSourceOS-Linux/sourceos-spec#276,
which generalizes this file's mint-not-derive id pattern (fixed here in
#1070, independently re-derived a third time for
bootProofRecordinsocioprophet#484) intoestate-safety-kit/js/mintId.ts.Deliberately not converting
ids.tsto a vendored copy here: the kit'smintIddefaults to 128 bits, while this file mints 256 (ID_PATTERNis64 hex chars) to satisfy the estate's "every emitted id carries a full
64 hex" ratchet. The kit's helper does support that width
(
mintId(prefix, 32)), but a blind file-swap would silently narrow everyid this service mints unless
server.ts,consult.ts, andinvariants.tsare all updated in the same change to request 32 bytes explicitly — a real
reviewable refactor, tracked as
#1335,
not something to do as a rushed comment-adjacent edit.
Verification
23/23
apps/health-twintests pass (npm test) — comment-only change, nobehavior touched.
Status
Small, low-risk, informational. Not part of the "held for human review of
the vendoring convention" set (#276, #550/#551) since it makes
no vendoring decision — happy to have this merge on its own timeline.