Skip to content

docs(health-twin): cross-reference estate-safety-kit's mintId.ts - #1336

Merged
mdheller merged 1 commit into
mainfrom
docs/health-twin-mintid-crossref
Aug 4, 2026
Merged

docs(health-twin): cross-reference estate-safety-kit's mintId.ts#1336
mdheller merged 1 commit into
mainfrom
docs/health-twin-mintid-crossref

Conversation

@mdheller

@mdheller mdheller commented Aug 4, 2026

Copy link
Copy Markdown
Member

What this is

Comment-only change to apps/health-twin/src/ids.ts, cross-referencing
SourceOS-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 bootProofRecord in
socioprophet#484) into estate-safety-kit/js/mintId.ts.

Deliberately not converting ids.ts to a vendored copy here: the kit's
mintId defaults to 128 bits, while this file mints 256 (ID_PATTERN is
64 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 every
id this service mints unless server.ts, consult.ts, and invariants.ts
are 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-twin tests pass (npm test) — comment-only change, no
behavior 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.

…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
mdheller enabled auto-merge (squash) August 4, 2026 00:32
@mdheller
mdheller merged commit 62baf06 into main Aug 4, 2026
90 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant