Skip to content

jco host polish: import-failure taxonomy misfile, stale typedef, JSDoc conventions #288

Description

@lann

Low-severity items from adversarial review of js/jco/webcrypto.js:

  • invalidKey (4377-4379) maps every platform import rejection to invalid-key, while the host's own taxonomy maps NotSupportedError to unsupported (251-262). On an engine lacking an algorithm entirely, import reports "bad key" instead of "not served". Unobservable on the conformance matrix's platforms.
  • Stale doc: the EcdsaAlgorithm typedef (85-89) mentions "the curve OID the PKCS#8 wrapping needs"; no OID field or PKCS#8 construction exists (all PKCS#8 imports are platform pass-throughs).
  • JSDoc convention: prose block + separate bare /** @type */ block (270-271, 330-331, 420-421, ...) detaches the prose from the symbol for tooling; the componentize shim merges them. Also errMessageTooLong (5360) sits ~5,000 lines from the err* family (119-155), and errOther (202) below its consumer.
  • The configure() doc (3512-3514) ends in an objection-answering clause ("so without this the new capacity would go unused...") — the rationale already lives in the right place, js/jco/test/admission.test.js:190.
  • Note for an upstream pin: bytesToStream (3600-3614) releases its pool reservation on pull-completion or cancel(); this relies on jco mapping guest-side stream drop to cancel() (version-anchored to jco-transpile 0.5.2 in the header). Worth a pinned test when the toolchain moves.

Related: #28.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions