Skip to content

feat: enable Pickup V2 batch pickup via env flag#7

Closed
albertoleon7794 wants to merge 1 commit into
mainfrom
feat/configurable-mediator-v2-batch-pickup
Closed

feat: enable Pickup V2 batch pickup via env flag#7
albertoleon7794 wants to merge 1 commit into
mainfrom
feat/configurable-mediator-v2-batch-pickup

Conversation

@albertoleon7794

@albertoleon7794 albertoleon7794 commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replace hardcoded BC Gov mediator URL check with MEDIATOR_USE_V2_BATCH_PICKUP env flag
  • When true, agent startup initiates Pickup V2 live mode + batch pickup (required for Credo-TS mediators)
  • When false/unset, no special startup pickup — avoids wrong strategy for legacy acapy mediators
  • Document flag in app/.env.sample (defaults to false; prod URL stays in env config only)

Closes #4

Context

Dropped connections and missed offline messages were traced to implicit/V1 pickup against mediators that don't handle batch delivery well. Credo-TS mediators need explicit V2 + batch pickup. This keeps the wallet code mediator-agnostic: set MEDIATOR_URL + flip the flag when pointing at Credo.

Prod cutover (set staging/prod MEDIATOR_URL, enable flag, smoke tests) tracked in #5.

Test plan

  • Local dev: MEDIATOR_USE_V2_BATCH_PICKUP=true + Credo mediator → V2 live mode + batch pickup in logs
  • Offline basic messages recovered on wallet reopen (3 queued messages)
  • Offline VRC/credential exchange recovered on wallet reopen (full protocol + attestation)
  • CI passes
  • Reviewer: flag unset → no V2 pickup initiated on startup

Replace hardcoded BC Gov mediator URL check with
MEDIATOR_USE_V2_BATCH_PICKUP. When true, agent startup initiates
Pickup V2 live mode and batch pickup for Credo-TS mediators.

Refs #4

Signed-off-by: Alberto L <aleon@law.harvard.edu>
@albertoleon7794

Copy link
Copy Markdown
Collaborator Author

Superseded by #14 (Phase 4): the mediator pickup was simplified to unconditional PickUpV2LiveMode (WebSocket push from the mediator), and the MEDIATOR_USE_V2_BATCH_PICKUP env flag this PR introduced was removed entirely. Verified via two-device E2E VRC exchange against the hosted mediator on live-mode-only pickup.

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.

Configurable Pickup V2 + batch pickup for Credo-TS mediators

1 participant