feat: integrate flamingo into walletkit-core - #508
Draft
Dzejkop wants to merge 10 commits into
Draft
Conversation
This was referenced Sep 4, 2026
Contributor
Author
|
@claude review |
There was a problem hiding this comment.
Pull request overview
This PR integrates the Flamingo attested face-matching flow into walletkit-core (replacing the prior DeepFace integration conceptually) and adds a walletkit-cli subcommand to exercise the published Flamingo verifier APIs end-to-end.
Changes:
- Adds a native-only
walletkit_core::flamingomodule exposing a UniFFI-friendlyFlamingoMatcherand match request/response types. - Introduces a
walletkit-cli flamingo matchcommand that reads input images, validates thumbnail commitments, performs an attested match, and emits a JSON artifact. - Updates workspace dependencies / lockfiles and Cargo-deny license clarifications to accommodate the new Flamingo/attestation crates.
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| flake.lock | Updates rust-overlay pin used by the Nix environment. |
| deny.toml | Adds a webpki license clarification needed by new deps. |
| crates/walletkit-core/tests/authenticator_integration.rs | Minor formatting cleanup in integration test output. |
| crates/walletkit-core/src/lib.rs | Exposes new flamingo module for non-wasm builds. |
| crates/walletkit-core/src/flamingo.rs | New core Flamingo matcher implementation + unit tests. |
| crates/walletkit-core/Cargo.toml | Adds native-only deps for Flamingo verifier + attested channel. |
| crates/walletkit-cli/src/commands/mod.rs | Wires a new top-level Flamingo CLI subcommand. |
| crates/walletkit-cli/src/commands/flamingo.rs | Implements CLI match demo + statement verification + tests. |
| crates/walletkit-cli/Cargo.toml | Adds CLI deps needed for attestation + statement verification. |
| Cargo.toml | Adds Flamingo + attestation crates to workspace dependencies. |
| Cargo.lock | Locks new transitive dependency graph for Flamingo integration. |
Suppressed comments (1)
crates/walletkit-cli/src/commands/flamingo.rs:415
- P2: The unit test currently asserts that
save_statementoverwrites existing files, which contradicts the CLI arg docs (“Existing files are never overwritten”) and encourages risky default behavior. Update the test to assert that the second write fails and the original contents remain (or update the docs if overwrite is intended).
#[test]
fn statement_output_overwrites_existing_files() {
let dir = tempfile::tempdir().unwrap();
let path = dir.path().join("statement.json");
save_statement(&path, &json!({"token": "longer original token"})).unwrap();
save_statement(&path, &json!({"token": "second"})).unwrap();
assert_eq!(
serde_json::from_slice::<Value>(&fs::read(path).unwrap()).unwrap()["token"],
"second"
);
}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+309
to
+310
| let mut options = fs::OpenOptions::new(); | ||
| options.write(true).create(true).truncate(true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR integrates attested Flamingo matching into WalletKit core.
attested-channel.Validation: 9 Flamingo core tests, 9 existing CLI unit tests, Clippy, and formatting pass on Rust 1.94.1. Live enclave E2E was not run.