Skip to content

fix(detect): add realm-global brand for cross-copy HelpfulError detection#39

Merged
uladkasach merged 1 commit into
mainfrom
vlad/fix-branded-detection
Jul 19, 2026
Merged

fix(detect): add realm-global brand for cross-copy HelpfulError detection#39
uladkasach merged 1 commit into
mainfrom
vlad/fix-branded-detection

Conversation

@ehm-a-seaturtle

Copy link
Copy Markdown
Contributor

fix(detect): add realm-global brand for cross-copy HelpfulError detection

  • stamp every HelpfulError class with a Symbol.for brand carrying the package version
  • add isHelpfulError type guard for cross-copy, minification-proof detection
  • support a version.min gate on isHelpfulError to assert a stamped-version floor
  • add getHelpfulErrorVersion to read the stamped version off any branded value
  • brand is static + immutable via Object.defineProperty, so it survives redact
    and never leaks into toJSON
  • source version at runtime via direct package.json import, no codegen

🐢🌊 surfed in by seaturtle[bot]

…tion

- stamp every HelpfulError class with a Symbol.for brand carrying the package version
- add isHelpfulError type guard for cross-copy, minification-proof detection
- support a version.min gate on isHelpfulError to assert a stamped-version floor
- add getHelpfulErrorVersion to read the stamped version off any branded value
- brand is static + immutable via Object.defineProperty, so it survives redact
  and never leaks into toJSON
- source version at runtime via direct package.json import, no codegen

Co-authored-by: Ulad Kasach <uladkasach@gmail.com>
@uladkasach
uladkasach merged commit ac3c6c6 into main Jul 19, 2026
16 checks passed
@uladkasach
uladkasach deleted the vlad/fix-branded-detection branch July 19, 2026 03:27
@rhelease rhelease Bot mentioned this pull request Jul 19, 2026
@rhelease

rhelease Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

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