ReviewOS

also looking at this

craft-native/craft

fix(types): declare canonical native bridge error codes

#304
Merged glennmichael123 wants to merge codex/typed-native-error-codes into main
3 files +86 -1
11 days ago

Summary

  • Add the complete canonical NativeBridgeErrorCode union to the mobile bridge declaration and include it in CraftErrorCode.
  • Preserve existing mobile/shim code names for source compatibility; document that old names are not silently rewritten wire aliases.
  • Compare the declaration with Zig's actual errorCodeString mapping and compile an isolated consumer that accepts native/legacy codes while rejecting misspellings.

Closes #266.

Validation

  • Before: the isolated consumer rejects BUSY, and the canonical vocabulary parity test fails.
  • After: both regression tests pass, covering all 17 native codes and compiler-enforced rejection of invalid names.
  • Root typechecks, focused Pickier and diff checks pass.

3 changed files on the files tab, with 0 review threads.

Sign in to comment on this pull request.