Skip to content

feat: add deep face failure reason enum - #364

Closed
danielle-tfh wants to merge 1 commit into
mainfrom
deepface-failure-reasons
Closed

danielle-tfh wants to merge 1 commit into
mainfrom
deepface-failure-reasons

Conversation

@danielle-tfh

@danielle-tfh danielle-tfh commented Oct 28, 2026 •

Copy link
Copy Markdown

defines the deep face failure reason vocabulary once so world app and relying parties share it.

Notes

  • add DeepFaceFailureReason next to AppError in rust/core/src/error.rs - same derives (serde snake_case, uniffi enum under ffi, EnumIter under conformance), plus from_code
  • values come from the two app PRs that just aligned on one list: https://github.com/worldcoin/world-app-ios/pull/8849 and https://github.com/worldcoin/wld-android/pull/9474. its the union of what either app sends on the bridge
  • reason stays optional and is not wired into Status yet. unknown strings parse as unknown, so this is additive
  • export DEEP_FACE_FAILURE_REASONS, the DeepFaceFailureReason type and a deepFaceFailureReason() parser from @worldcoin/idkit-core - same shape as APP_ERROR_CODES / IDKitErrorCode
  • add the list to the conformance manifest and check JS against it (runtime and type level) - so the two lists cant drift
  • swift and kotlin get the enum from uniffi. no hand-written wrapper since nothing surfaces it there yet
  • ran cargo fmt, cargo clippy --all-targets --all-features -D warnings, cargo test -p idkit-core (with and without conformance), pnpm lint:js, pnpm build, pnpm type-check, pnpm test, pnpm test:conformance (all green; the fast-check case needed --testTimeout=120000 locally, it times out at 5s on the debug binary)

Note

Low Risk
Additive enum and exports with unknown-string fallback; no changes to verification flow, auth, or result shaping.

Overview
Introduces a shared vocabulary for World App’s optional Deep Face bridge reason (alongside error_code), aligned with iOS/Android so RPs and apps parse the same snake_case strings.

Rust adds DeepFaceFailureReason next to AppError (serde, UniFFI, from_code, #[serde(other)] → unknown). JS exports DEEP_FACE_FAILURE_REASONS, the DeepFaceFailureReason type, and deepFaceFailureReason() for unrecognized values.

The conformance manifest now includes deep_face_failure_reasons, with runtime and compile-time checks so Rust and @worldcoin/idkit-core cannot drift. reason is not wired into Status yet—this is additive parsing/types only.

Reviewed by Cursor Bugbot for commit 0654b35. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
idkit-js-example Ready Ready Preview Oct 28, 2026 2:19pm UTC

Request Review

@Takaros999

Copy link
Copy Markdown
Contributor

this doesn't achieve what we want, let me make a PR for it

@Takaros999 Takaros999 closed this Oct 28, 2026

This branch was successfully deployed

1 active deployment
Preview — 0654b350 Deployed Oct 28, 2026 by vercel[bot]
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.

2 participants