Runnable Human Review SDK examples
Each supported SDK includes a runnable callback receiver. Every receiver uses the same callback path, published v1 wire contract, durable-receipt meaning, and application milestones:
ready → waiting_for_review → received → applied → acknowledged
These are maintainer examples. Their commands run from a checkout of the
VeriProof SDK source repository. To add human review to your own
application, use the SDK review runtime: pass review options to govern,
save the checkpoint from the review_required result, and let the review
runtime receive callbacks and resume the action. See the Developer tab in
Core Human Review by role and your SDK guide, such as
Add human review for Python.
Begin with the review brief
The runnable receivers begin after VeriProof has created a case. In a real application, the path starts earlier:
- Select the published human-input profile by its stable key.
- Build a short review brief with an execution summary, proposed-action summary, and usually three to six typed business facts.
- Save the application checkpoint, protected payload, captured request, and response binding together.
- Create the review case and leave the workflow paused.
When you pass review options to govern, the core SDK builds the brief, the
captured request, and the checkpoint for you.
The application supplies the facts it understands. It does not copy profile fields or calculate their digests, and it does not need a VeriProof session-step ID. Application references are opaque labels, not links or proof. VeriProof adds the policy reason and authorized captured-session evidence in the portal. Keep raw tool arguments, prompt history, secrets, and the protected payload in application storage.
These examples use loopback listeners and local durable stores for synthetic testing. Replace the store, workload credential provider, and local listener with production infrastructure before deployment.
What the examples prove
The callback request is POST /v1/review-outcomes. Every example:
- reads the untouched request bytes;
- verifies the timestamp and VeriProof’s signature, then the schema and exact continuation binding, before trusting JSON;
- stores an accepted outcome before returning
2xx; and - distinguishes first acceptance, exact replay, and conflicting delivery.
The full continuation examples, including Python, also let a worker claim the directive, revalidate current policy, apply the protected action once, and acknowledge the result. The .NET receiver example stops at durable callback acceptance.
The customer application team owns the production listener, durable store,
worker, revision path, and protected side effect. The listener must only verify,
store, signal the worker, and respond. For typed outcomes, follow the
lifecycle response and resume-mode matrix;
route_to_revision enters application-owned revision work and does not execute
the superseded protected payload.
A durable callback receipt does not prove that the protected action ran.
VeriProof may show Application resumed only after the execution
acknowledgment says resumed.
Shared configuration meaning
Use the configuration names in your language’s column. The examples share the same concepts, but some runtime names differ.
| Meaning | TypeScript | Python | .NET | Go | Java | Rust |
|---|---|---|---|---|---|---|
| Tenant | VERIPROOF_TENANT_ID | From the SDK key | VERIPROOF_TENANT_ID | VERIPROOF_TENANT_ID | VERIPROOF_TENANT_ID | VERIPROOF_TENANT_ID |
| Application | VERIPROOF_APPLICATION_ID | From the SDK key | VERIPROOF_APPLICATION_ID | VERIPROOF_APPLICATION_ID | VERIPROOF_APPLICATION_ID | VERIPROOF_APPLICATION_ID |
| Environment | VERIPROOF_ENVIRONMENT | From the SDK key | VERIPROOF_ENVIRONMENT | VERIPROOF_ENVIRONMENT | VERIPROOF_ENVIRONMENT | VERIPROOF_ENVIRONMENT |
| VeriProof API | VERIPROOF_ENDPOINT | VERIPROOF_ENDPOINT | Not used by the receiver | VERIPROOF_ENDPOINT | VERIPROOF_ENDPOINT | VERIPROOF_ENDPOINT for server revalidation |
| Application credential | VERIPROOF_APPLICATION_CREDENTIAL | VERIPROOF_API_KEY | Not used by the receiver | VERIPROOF_API_KEY | VERIPROOF_API_KEY | VERIPROOF_API_KEY for server revalidation |
| Published signing keys | Loaded from VERIPROOF_ENDPOINT | Loaded from VERIPROOF_ENDPOINT | Loaded from VERIPROOF_ENDPOINT | Loaded from VERIPROOF_ENDPOINT | Loaded from VERIPROOF_ENDPOINT | Loaded from VERIPROOF_ENDPOINT |
| Pinned signing keys (optional) | VERIPROOF_WEBHOOK_KEY_SET | VERIPROOF_WEBHOOK_KEY_SET | VERIPROOF_WEBHOOK_KEY_SET | VERIPROOF_WEBHOOK_KEY_SET | VERIPROOF_WEBHOOK_KEY_SET | VERIPROOF_WEBHOOK_KEY_SET |
| Registration version | VERIPROOF_CALLBACK_REGISTRATION_VERSION | From the signed callback | From the signed callback | From the signed callback | From the review case | VERIPROOF_CALLBACK_REGISTRATION_VERSION |
| Listener | VERIPROOF_CALLBACK_BIND_PORT | VERIPROOF_CALLBACK_BIND and VERIPROOF_CALLBACK_PORT | ASPNETCORE_URLS | VERIPROOF_CALLBACK_ADDRESS | VERIPROOF_CALLBACK_BIND_PORT | VERIPROOF_CALLBACK_BIND_PORT |
Do not save an application credential with the checkpoint. Resolve a current credential for each server call, including calls made after a long pause.
Run one receiver
These maintainer commands run from the root of the VeriProof SDK source repository. Use only synthetic identities, a non-production callback registration, and an isolated store.
Each receiver checks callbacks with the signing keys VeriProof publishes. The
commands below pin the key set from a local VeriProof Ingest API so the
receiver works offline. To load the keys from a hosted endpoint instead, leave
VERIPROOF_WEBHOOK_KEY_SET unset and point the endpoint setting at it.
TypeScript
Example: sdk/typescript/veriproof-sdk-core/examples/human-review-receiver.mjs
Set-Location sdk/typescript/veriproof-sdk-core
npm install
npm run build
$env:VERIPROOF_TENANT_ID='tenant-test'
$env:VERIPROOF_APPLICATION_ID='application-test'
$env:VERIPROOF_ENVIRONMENT='local'
$env:VERIPROOF_CALLBACK_REGISTRATION_VERSION='1'
$env:VERIPROOF_WEBHOOK_KEY_SET=(Invoke-WebRequest 'http://localhost:7074/.well-known/veriproof-webhook-keys.json').Content
$env:VERIPROOF_ENDPOINT='http://localhost:5100'
$env:VERIPROOF_APPLICATION_CREDENTIAL='synthetic-local-application-key'
$env:VERIPROOF_CALLBACK_BIND_HOST='127.0.0.1'
$env:VERIPROOF_CALLBACK_BIND_PORT='18083'
$env:VERIPROOF_CONTINUATION_STORE_PATH="$PWD\.veriproof\typescript-review-state.json"
$env:VERIPROOF_PROTECTED_MARKER_DIRECTORY="$PWD\.veriproof\typescript-markers"
node examples/human-review-receiver.mjsThe Node example reads the request stream into bytes and gives the untouched
bytes to HumanReviewOutcomeReceiver. For Express, use the
route-scoped raw-body pattern.
Use the shared conformance harness
This maintainer tool is part of the VeriProof SDK source repository. The harness builds and launches the installed artifacts for all six languages, gives each process an isolated port and durable store, sends the fixed signed fixture, and checks duplicate, conflict, restart, lost-checkpoint, and multi-branch behavior.
Set-Location sdk/human-review-e2e
npm test
npm run gatenpm run gate is the installed-package synthetic conformance lane. It does not
replace the separate server-driven release lane. npm run gate:server must
create a real server case, Inbox item, authorized decision, queued callback,
durable receipt, execution acknowledgment, and correlated audit evidence before
that wider gate can pass.
Before adapting an example to a durable application worker, read Recover a long-paused continuation for per-request credential refresh, exact branch binding, lost-checkpoint handling, and restart recovery.
The control routes used by the harness exist only when both
VERIPROOF_E2E_CONTROL_ENABLED=true and VERIPROOF_ENVIRONMENT=test. They bind
to loopback and are not production management endpoints.
Before deployment
- Replace each local file, SQLite, or in-memory adapter with the application’s transactional durable store.
- Use workload identity or an OAuth client-credentials provider with
review-continuations.write; refresh credentials for every server call. - Use public HTTPS and register the exact tenant, application, environment, domain, port, and callback path in VeriProof.
- Keep callback receipt fast. Queue application work after the durable write.
- Use
protectedActionIdin the same transaction as the protected side effect. - Monitor callbacks, incidents, missing acknowledgments, and key expiry.
- Complete your organization’s release review and confirm approval for real customer data.