Uh oh!
There was an error while loading. Please reload this page.
feat(persona): add Persona identity verification integration - #4967
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
waleedlatif1
commented
Jun 11, 2026
waleedlatif1
commented
Jun 11, 2026
@cursor review |
PR SummaryHigh Risk Overview Implementation follows existing integration patterns: 26 Reviewed by Cursor Bugbot for commit ca6853d. Configure here. |
Uh oh!
There was an error while loading. Please reload this page.
Greptile SummaryAdds a full Persona identity-verification integration: 26 tools covering the inquiry lifecycle (create/get/list/update/approve/decline/review/resume/expire/redact), account management (create/get/list/update/import/redact), cases, screening reports (watchlist/adverse-media/PEP), verifications, documents, and inquiry templates. A shared
Confidence Score: 5/5Safe to merge. The integration is self-contained new code with no changes to existing tool paths. All direct-API tools route through the shared parsePersonaResponse guard, the CSV import route enforces auth and file-ownership checks, and print_inquiry_pdf branches correctly on response.ok before the binary read. Every tool either uses the shared parsePersonaResponse helper (which throws on non-2xx before any mapping) or has its own response.ok guard. The generate_inquiry_link and resume_inquiry tools throw explicitly when expected meta fields are absent. The create_report validation guard letting a middle-name-only query through is a minor quality nit that won't break callers. No existing code is modified, and the new route follows the established internal-auth + file-access pattern correctly. No files require special attention. create_report.ts has a minor validation gap (accepting nameMiddle alone as a sufficient search term) but it does not break callers. Important Files Changed
Sequence DiagramsequenceDiagram
participant User as User / Workflow
participant Block as Persona Block
participant ToolExec as Tool Executor
participant ImportRoute as /api/tools/persona/import-accounts
participant Storage as File Storage
participant PersonaAPI as Persona API
User->>Block: Trigger operation (e.g. create_inquiry)
Block->>ToolExec: params(operation, apiKey, …)
alt Direct API tool (24 tools)
ToolExec->>PersonaAPI: "fetch(url, {headers: buildPersonaHeaders(apiKey), …})"
PersonaAPI-->>ToolExec: JSON:API response
ToolExec->>ToolExec: parsePersonaResponse() — ok? map resource : throw
ToolExec-->>Block: "{success: true, output: {inquiry/account/…}}"
else import_accounts (CSV)
ToolExec->>ImportRoute: "POST /api/tools/persona/import-accounts {apiKey, file}"
ImportRoute->>ImportRoute: checkInternalAuth + parseRequest + assertToolFileAccess
ImportRoute->>Storage: downloadFileFromStorage(userFile)
Storage-->>ImportRoute: Buffer
ImportRoute->>PersonaAPI: "POST /importer/accounts {data: base64 CSV}"
PersonaAPI-->>ImportRoute: "{data: importer resource}"
ImportRoute-->>ToolExec: "{success: true, output: {importer}}"
ToolExec-->>Block: "{success: true, output: {importer}}"
else print_inquiry_pdf
ToolExec->>PersonaAPI: "GET /inquiries/{id}/print Accept: application/pdf"
PersonaAPI-->>ToolExec: PDF bytes (or error JSON)
ToolExec->>ToolExec: ok? base64(arrayBuffer) : parse error + throw
ToolExec-->>Block: "{success: true, output: {file}}"
end
Reviews (8): Last reviewed commit: "improvement(persona): require session to..." | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
waleedlatif1
commented
Jun 11, 2026
waleedlatif1
commented
Jun 11, 2026
@cursor review |
Greptile SummaryThis PR adds a comprehensive Persona (withpersona.com) identity verification integration with 17 tools covering inquiries, accounts, cases, reports, verifications, and documents. The implementation follows established codebase patterns: internal-routed CSV import with auth/file-access checks, file-upload canonical subBlock pairs for the block UI, JSON:API response mapping to flat camelCase types, and a pinned
Confidence Score: 3/5Safe to merge after fixing the two broken-response paths in generate_inquiry_link.ts and print_inquiry_pdf.ts; all other tools and the import route are well-structured. The one-time link generator silently delivers an empty string when Persona does not return a link, and the PDF printer wraps non-2xx Persona error bodies into a fake successful file output — both produce wrong data on normal error paths. All 15 other tools and the import route follow established patterns correctly. apps/sim/tools/persona/generate_inquiry_link.ts and apps/sim/tools/persona/print_inquiry_pdf.ts need attention; all other files look solid. Important Files Changed
Reviews (2): Last reviewed commit: "feat(persona): complete API coverage — i..." | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…ate/redact, report listing, template discovery
… fix tags wand generation type
343c284 to
99fbbb6Compare…xplicit error when one-time link missing
waleedlatif1
commented
Jun 11, 2026
waleedlatif1
commented
Jun 11, 2026
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit b082119. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
waleedlatif1
commented
Jun 11, 2026
waleedlatif1
commented
Jun 11, 2026
@cursor review |
Uh oh!
There was an error while loading. Please reload this page.
…d of returning an empty importer
waleedlatif1
commented
Jun 11, 2026
waleedlatif1
commented
Jun 11, 2026
@cursor review |
Uh oh!
There was an error while loading. Please reload this page.
waleedlatif1
commented
Jun 11, 2026
waleedlatif1
commented
Jun 11, 2026
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit ca6853d. Configure here.
waleedlatif1
commented
Jun 11, 2026
@greptile review |
Uh oh!
There was an error while loading. Please reload this page.
Summary
/api/tools/persona/import-accounts) withcheckInternalAuth→parseRequest→verifyFileAccess→downloadFileFromStorage, and the block uses the file-upload basic/advanced canonical-param pattern withnormalizeFileInput; inquiry PDF download returns a stored execution filePersona-Version: 2025-12-08and map JSON:API kebab-case resources to flat camelCase outputs with typed output properties; validated against Persona's official OpenAPI specType of Change
Testing
Typecheck, biome, and
check:api-validationpass; request builders and response transforms for all 17 tools exercised against fixtures derived from Persona's OpenAPI specChecklist