ReviewOS

home-lang/home

Bun parity: finish core Web Crypto lifecycle and validation

#331
Closed chris opened this 10 days ago ·
10 days ago

Tracks the copied Bun corpus gap at position 4096: js/web/crypto/web-crypto.test.ts.

Scope:

  • preserve crypto.subtle under assignment while accepting the setter
  • expose native SHA-1/SHA-2 digest behavior to the corpus adapter and model the child digest/event-loop fixture
  • align CryptoKey / SubtleCrypto constructor metadata and branding
  • settle JWK unwrap parse failures with structured DataError / TypeError rejections and causal stacks
  • preserve AES/HMAC behavior and oversized BufferSource rejection
  • add Ed25519 key metadata without a namedCurve field

Focused verification is currently 10 passed, 0 failed, 0 unsupported. The issue will close after permanent queue/build validation and push.

10 days ago

Implemented and pushed in 7295618c3 (fix(crypto): complete Web Crypto lifecycle parity).

Delivered:

  • no-op crypto.subtle setter that preserves the original object
  • native one-shot SHA bridge for arbitrary corpus digest inputs
  • validated Web Crypto child digest adapter with structured WebCryptoChildError metadata and causal stacks
  • CryptoKey / SubtleCrypto naming and prototype branding
  • settled JWK unwrap failures (DataError for malformed JSON, TypeError for missing kty) with operation metadata and causes
  • Ed25519 key-pair/import metadata without namedCurve

Verification:

  • js/web/crypto/web-crypto.test.ts: 10 passed, 0 failed, 0 unsupported
  • permanent HTTP/web tail queue: passed
  • clean zig build --cache-dir /private/tmp/home-zig-abi-cache: passed

Only the intended adapter registration hunk was committed; pre-existing local adapter edits were left unstaged.

Sign in to comment on this issue.