ReviewOS

home-lang/home

Port jsonwebtoken maxAge option validation

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

Scope

Port Bun corpus position 4026, js/third_party/jsonwebtoken/option-maxAge.test.js.

Acceptance criteria

  • Verification accepts positive/negative numeric seconds and string timespans.
  • Invalid booleans, strings, arrays, and objects produce the exact upstream validation message in sync and callback paths.
  • Max-age errors retain concrete JWT error identity, claim iat, operation metadata, original cause, expiration time where applicable, and operation-aware cause stacks.
  • Focused, issued-at/max-age regressions, and permanent diagnostics pass.
10 days ago

Completed in 17f34b81d and pushed to main.

Home now passes Bun corpus position 4026, option-maxAge.test.js, at 10/10. Verification accepts positive/negative numeric seconds and string timespans, while invalid booleans, strings, arrays, and objects produce the exact upstream guidance in synchronous and callback paths: "maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60.

Structured max-age failures continue retaining concrete JWT identity, claim iat, operation metadata, original cause, expiredAt where applicable, and readable operation/cause stacks.

Verification:

  • focused maxAge file: 10/10
  • earlier issued-at/max-age matrix: permanently green
  • permanent third-party diagnostic contracts: 15/15
  • full third-party JWT/utility mini-suite: passed
  • formatting and diff checks: passed

Sign in to comment on this issue.