You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(core): inject the SHA-256 digest in local-memory.ts and unify the meta-value sanitizer #1414
Part of #1084 (second-pass sink-file and boundary governance). Blocked on / coordinate with #820, which adds new sha256Hex call sites to this file — please sync with that PR's author before starting.
Scope
Replace the embedded hand-rolled SHA-256 in core/local-memory.ts (SHA256_K ~L209, sha256Hex/rotateRight/add32 ~L1000–1080) with the same digest-injection seam oauth-subscription.ts uses (Sha256Digest, ~L203–209 there): stableLocalMemoryEntryId/stableLocalMemoryProposalId (and feat(memory): add measurement foundation and scoped read gates #820's new call sites) take an injected digest. Node crypto produces identical hex, so persisted mem-/proposal- ids are unchanged.
Collapse the inline sanitizer in serializeMetaComment (~L831) onto normalizeMetaValue (~L900) — the two are currently byte-identical.
Invariants
Same as #1084: behavior-neutral; persisted id stability is a hard invariant; stable exports; flat PR off main.
Verification
Typecheck/build + a fixed-digest test pinning persisted-id stability.
Activity
1625567290 commentedon Aug 17, 2026
I'll take this.
Plan:
Sha256DigestintostableLocalMemoryEntryId/stableLocalMemoryProposalId(same seam as OAuth PKCE).serializeMetaCommentontonormalizeMetaValue.mem-/proposal-ids against Node crypto so existing files stay stable.#820 is closed, so this is no longer blocked.