[codex] Structure macOS passkey signing failures#3303
Conversation
Co-authored-by: codex <codex@users.noreply.github.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
ApprovabilityVerdict: Approved Build script refactor that replaces generic errors with typed error classes for macOS passkey signing configuration failures. No changes to validation logic or runtime behavior - purely improves error structure and explicitly avoids leaking sensitive data in error messages. You can customize Macroscope's approvability policy. Learn more. |
Co-authored-by: codex <codex@users.noreply.github.com>
Dismissing prior approval to re-evaluate c70f014
Co-authored-by: codex <codex@users.noreply.github.com>
Dismissing prior approval to re-evaluate 5fc6c47
Summary
Validation
vp test scripts/build-desktop-artifact.test.ts(21 tests)vp checkvp run typecheckNote
Low Risk
Changes are confined to desktop build-script validation and error shaping for signed macOS passkey configuration, with no runtime auth behavior changes.
Overview
macOS passkey signing validation in the desktop build script now throws distinct schema-tagged errors instead of generic
Errormessages, with RP-domain failures carrying a reason code and input length rather than echoing the raw domain string.BuildScriptError.fromMacPasskeySigningConfigurationpasses the known configuration error union through unchanged at staging time and wraps only unknown defects behind a fixed message, keeping publishable keys and parser cause text out of surfaced messages. Tests were extended to lock in those types, redaction onJSON.stringify, and boundary behavior.Reviewed by Cursor Bugbot for commit 5fc6c47. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Structure macOS passkey signing failures into typed error classes
InvalidMacPasskeyRpDomainError,InvalidMacPasskeyPublishableKeyError,MissingMacPasskeyProvisioningProfileError, etc.) in build-desktop-artifact.ts to replace genericErrorthrows across passkey signing validation.normalizePasskeyRpDomainnow emitsInvalidMacPasskeyRpDomainErrorwith structured reason codes (e.g.port-not-allowed,path-not-allowed) and does not leak the raw domain string in error messages.resolveMacPasskeySigningConfigurationemits specific typed errors for all validation paths: invalid team ID, missing provisioning profile, bad publishable key, and missing RP domains.BuildScriptError.fromMacPasskeySigningConfigurationpreserves known passkey config errors as-is and wraps unknown defects with a generic message that omits the original cause text.buildDesktopArtifactno longer copies the cause message into the wrappingBuildScriptErrorfor unknown defects, and known errors now propagate with their original type.Macroscope summarized 5fc6c47.