Skip to content

fix: Improve signal hashing cache#170

Open
Takaros999 wants to merge 4 commits intomainfrom
takis/signal-hashing
Open

fix: Improve signal hashing cache#170
Takaros999 wants to merge 4 commits intomainfrom
takis/signal-hashing

Conversation

@Takaros999
Copy link
Contributor

@Takaros999 Takaros999 commented Mar 11, 2026

This PR addresses an edge case in how we cache a signal. In the legacy flow, requesting VerificationLevel.Device could return an orb ZKP and we didn't inject the correct signal_hash to the response.

  • Create a CachedSignalHashes struct and document the correct behaviour
  • Add Eruda
  • Update native transport to match the desired behaviour

Before

IDKit.Next.js.Example.-.11.March.2026.mp4

After

IDKit.Next.js.Example.-.11.March.2026.1.mp4

@vercel
Copy link

vercel bot commented Mar 11, 2026

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

Project Deployment Actions Updated (UTC)
idkit-js-example Ready Ready Preview, Comment Mar 11, 2026 11:18pm

Request Review

@Takaros999
Copy link
Contributor Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 76ccc45de0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@andy-t-wang
Copy link
Collaborator

@codex review

@andy-t-wang
Copy link
Collaborator

@cursoragent

@cursor
Copy link

cursor bot commented Mar 12, 2026

Unable to authenticate your request. Please make sure to connect your GitHub account to Cursor. Go to Cursor

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ca3f077a11

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 671 to +673
let signal_hash = self
.signal_hashes
.get(item.verification_level.as_ref())
.cloned();
.cached_signal_hashes
.get(item.verification_level.as_ref());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve legacy hash fallback for multi-legacy responses

CachedSignalHashes::compute now stores legacy hashes separately instead of under legacy_verification_level, but this branch still resolves hashes only via item.verification_level; for legacy_responses, those identifiers are legacy levels (orb, document, etc.) and usually do not match the cached V4 keys (proof_of_human, passport, ...), so signal_hash is dropped in confirmed 3.0 results. This regresses bridge flows that return legacy_responses (notably legacy multi-credential paths) because callers that rely on injected signal_hash will now receive None even when a signal was provided.

Useful? React with 👍 / 👎.

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