Upgrade Phases 3+4+5: bifold 3.0.16, credo-ts 0.6.3, React 19, RN 0.81, bc-wallet-mobile ports, VC 2.0#14
Closed
albertoleon7794 wants to merge 12 commits into
Closed
Conversation
… 0.6.3 Wire the app workspace to the upgraded bifold 3.x submodule: - deps: react-native 0.81.5 / react 19.1.0, @bifold/* 3.0.16 portals (incl. new @bifold/react-hooks), @credo-ts/* 0.6.3 with @credo-ts/didcomm, askar -> @openwallet-foundation/askar-react-native 0.6.0, expo modules, reanimated + keyboard-controller; adopt upstream patch set, drop 0.5.17 patches; remove Storybook entirely - bc-agent-modules: credo 0.6 module graph (DidCommModule config, KMS with askar + expo secure-environment, explicit JSON-LD/AnonCreds DIDComm format services, VRC document loader) - useBCAgentSetup: wallet id/key move into AskarModule store config (no agent.wallet.open()), didcomm transport registration, guarded indy-vdr pool warm-up - attestation: remove DRPC-based BC attestation flow (@credo-ts/drpc has no stable 0.6.x and Keyring does not use BC's attestation service); delete utils/drpc.ts; keep bifold AttestationMonitor interface - credo 0.6 API renames across hooks/utils (DidComm* types, proofExchangeRecordId, metadata keys from @credo-ts/anoncreds root) - jest/babel: sync transformIgnorePatterns with bifold core, map @bifold/* to sources, RN 0.81 Keyboard/BackHandler/reanimated mocks, drop module-resolver root '.' (rewrote node_modules '.' imports to app index.js), add export-namespace-from + reanimated babel plugins - snapshots updated for RN 0.81 style flattening; theme gains new bifold 3.x IBrandColors fields App gate (JS): typecheck 0 errors, eslint clean, jest 14 suites / 27 tests pass. Native Android/iOS project upgrade is the next step.
Android: compileSdk/targetSdk 36, kotlin 2.1.20, gradle 8.14.3, AGP from RN gradle plugin, newArchEnabled=true, expo modules autolinking (settings.gradle useExpoModules + ReactNativeHostWrapper/loadReactNative in MainApplication), react.internal.disableJavaVersionAlignment + subprojects Java 17 alignment (mirrors bifold samples/app), gradle lockfiles regenerated. assembleDebug green. iOS: Podfile gains expo autolinking (use_expo_modules! + expo_patch_react_imports!), pods reinstalled on RN 0.81.5. xcodebuild Debug (simulator) green. AppDelegate stays on RCTAppDelegate for now. Bundling (metro 0.83): exclusionList import moved to metro-config/private, package exports enabled with react-native/browser/require conditions, bifold/node_modules added to watchFolders/nodeModulesPaths, react-native-svg-transformer 0.14 -> 1.5.1. Release bundles green for both platforms. Deps: add zustand (bifold core lists it only as devDep) and @expo/app-integrity (used by bifold attestation hooks). Patch react-native-document-picker 9.3.1 to drop GuardedResultAsyncTask (removed in RN 0.81). Gates re-run after changes: typecheck 0 errors, eslint clean, jest 14/27 pass.
- metro: re-resolve react/react-native/react-dom/@credo-ts singletons from the app root when imported from outside app/ (bifold sources were pulling a second react copy from bifold/node_modules in dev bundles, crashing the hooks dispatcher); add @bifold/react-hooks to the dev source-resolution list - remove react-native-date-picker: unused, and 5.0.13 fails RN 0.81's RCTModuleProvider conformance check on iOS Verified: Android emulator reaches onboarding, iOS simulator reaches PIN unlock (existing askar store opens). Both native builds and release bundles re-verified after the changes; typecheck clean.
- attestation service: credo 0.6 renamed credential event payload credentialRecord -> credentialExchangeRecord (handler threw "Cannot read property 'id' of undefined" on every credential event) - index.js: LogBox.ignoreAllLogs() in dev — notification banners overlay bottom buttons (Done) and eat taps during E2E; everything still logs to metro/logcat/syslog - e2e: iOS caps get enforceAppInstall (stale simulator builds caused RN version-mismatch redbox), document ad-hoc signing requirement for keychain entitlements; acceptCredentialOfferFromChat retries the YES tap until the offer screen opens - resolutions: pin @hyperledger/indy-vdr-shared 0.2.4 (duplicate instance broke pool init) - bifold submodule: E2E fixes (event names, gesture-handler chat touchables, react-hooks memo loop fix, issuanceDate clock-skew backdate) - UPGRADE_PROGRESS.md: Phase 3 E2E gate green, fixes documented
… present The RN Modal hosting the camera-use disclosure occasionally fails to present when it mounts mid push-animation on iOS, leaving a blank Scan screen with no Continue or PasteUrlButton. Back out and re-enter the screen to re-present it. Also gitignore app/android/app/.cxx/ (CMake build cache).
run-store-migration.js installs the baseline apk (credo 0.5.17/askar 0.2.3, release build so its own JS is bundled), populates the old-format store with a real VRC exchange against the new iOS build, upgrades in place with `adb install -r`, and verifies the wallet unlocks and the contact + VRC survive. - deliver the invitation to the old android build via deep link (its QR bottom-sheet ignores appium synthetic taps; deep link is the real-user path anyway) - grant runtime permissions via `adb shell pm grant` (manual installs skip appium's autoGrantPermissions) - iOS: `simctl privacy grant camera` kills the app; terminate + wait + activate avoids a black-screen race on relaunch - app: run migrateRCardTemplateProofs() after agent.initialize() so legacy R-Card template records get a proof before any provider reads W3C credential records (bifold 3dd6a786) Signed-off-by: Alberto L <aleon@law.harvard.edu>
Signed-off-by: Alberto L <aleon@law.harvard.edu>
The baseline is one worktree of the root repo (submodule init for bifold), not two separate worktrees. Worktrees under /tmp were removed; the upgrade-baseline-p0 tags are the source of truth. Signed-off-by: Alberto L <aleon@law.harvard.edu>
…ive-mode pickup Port the generic app-layer improvements from upstream bc-wallet-mobile (BCSC-specific work intentionally skipped): - errors framework (src/errors/): AppError + trimmed ErrorRegistry + handler utils, ErrorInfoCard/AppErrorModal/ErrorBoundary components, ErrorAlertProvider/useErrorAlert context. Snowplow analytics coupling dropped; "Report this problem" ships the report to Loki via reportProblem() and surfaces a copyable reference code. App.tsx now uses our ErrorBoundaryWrapper and mounts ErrorAlertProvider. - PressableOpacity component (New-Architecture-reliable Pressable wrapper mimicking TouchableOpacity). - hooks: usePreventGestureBack, useDeclineCredentialOffer, useDeclineProofRequest, useAutoRequestPermission. - mediator pickup simplified to unconditional PickUpV2LiveMode (WebSocket push); legacy batch-pickup + 5s trust-ping polling loop removed and MEDIATOR_USE_V2_BATCH_PICKUP flag retired. Verified against the hosted mediator via the two-device VRC E2E. - i18n: en/fr/pt-br strings for the error modal reference-code UI. Gate: app jest 16 suites/70 tests, bifold core 155 suites/1398 tests, typecheck, and Android<->iOS VRC exchange E2E all green. Signed-off-by: Alberto L <aleon@law.harvard.edu>
This was referenced Jul 8, 2026
albertoleon7794
added a commit
that referenced
this pull request
Jul 8, 2026
…edo patch, merge plan) Bump the bifold submodule to the Phase 5 commit (RCard/VRC separation, JCS witness digest, VCDM 2.0 verification + negotiated issuance with RCE v2). Apply the @credo-ts/core 0.6.3 yarn patch in the app tree as well (accept the VC 2.0 context as first @context entry, make issuanceDate optional) so the wallet's own dependency graph resolves the same patched credo. Gates green 2026-07-08: app + bifold jest/typecheck/lint, two-device E2E VRC exchange on the VC 2.0 flow, and a backward-compat E2E where a Phase-4 baseline build exchanges with the new app (legacy 1.1 VRC with issuer object, no RCard) and then upgrades in place with its store intact. Adds MERGE_PLAN.md documenting the PR merge order (bifold #26 first as a merge commit, then wallet #13 and #14) and the submodule-pointer rules. Upstream credo issue: openwallet-foundation/credo-ts#2864.
…edo patch) Bump the bifold submodule to the Phase 5 commit (RCard/VRC separation, JCS witness digest, VCDM 2.0 verification + negotiated issuance with RCE v2). Apply the @credo-ts/core 0.6.3 yarn patch in the app tree as well (accept the VC 2.0 context as first @context entry, make issuanceDate optional) so the wallet's own dependency graph resolves the same patched credo. Gates green 2026-07-08: app + bifold jest/typecheck/lint, two-device E2E VRC exchange on the VC 2.0 flow, and a backward-compat E2E where a Phase-4 baseline build exchanges with the new app (legacy 1.1 VRC with issuer object, no RCard) and then upgrades in place with its store intact.
…y-pick) Pull in bifold 88f80fe8: embed Google's three published attestation roots (legacy RSA, re-signed RSA, RKP ECDSA) and validate Android hardware attestation chains against them only, instead of accepting the chain's own root as its anchor. Needed for real-device attestation with biometrics. Verified on the upgraded stack: 7/7 attestation JUnit tests, 29/29 BiometricSignatureVerifier TS tests, app assembleDebug green.
albertoleon7794
force-pushed
the
upgrade/phase3-bifold3
branch
from
July 9, 2026 17:49
331d1db to
a9ca437
Compare
Rewrite HARDWARE_ATTESTATION_FLOW for native verifyHardwareEvidence and preference-gated Secure Exchange. Add CRYPTO_SUITE_FOLLOWUP so Ed25519Signature2018 stays documented as intentional until a clean stack can take DataIntegrityProof (eddsa-rdfc-2022) as a separate project. Ship dual real-device VRC harness, RN Hermes SIGBUS yarn patch, and bifold bump for modal/a11y/credential-dump fixes. Signed-off-by: Alberto L <aleon@law.harvard.edu>
Collaborator
Author
Docs / debt note (2026-07-13)Pushed
Phase 5 on this PR = VCDM 2.0 payload; not DI suite migration. |
Collaborator
Author
|
Superseded by the consolidated upgrade PR #17, which folds phases 1–5 plus RCE v3 and the eddsa-rdfc-2022 Data Integrity work into a single review branch. Closing without merge — see the consolidated PR. |
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.
Summary
Stacked on #13 (Phase 2). Closes the app-layer portion of #10.
Phase 3 — platform upgrade
@bifold/*3.0.16 portals (incl. new@bifold/react-hooks),@credo-ts/*0.6.3 with@credo-ts/didcomm, askar →@openwallet-foundation/askar-react-native0.6.0, expo modules; Storybook removedbc-agent-modulesrewritten (DidCommModuleconfig, KMS with askar + expo secure-environment), wallet id/key move into the Askar store config, DIDComm type/event renames across hooks/utils, DRPC-based BC attestation flow removed (Keyring doesn't use BC's attestation service)react-native-document-pickerpatched for RN 0.81; unusedreact-native-date-pickerremovedPhase 4 lite — bc-wallet-mobile ports (
dc944fd)app/src/errors/):AppError+ trimmedErrorRegistry, handler utilities,ErrorInfoCard/AppErrorModal/ErrorBoundary,ErrorAlertProviderwired intoApp.tsx. Snowplow analytics dropped — "Report this problem" sends to Loki with a user-facing reference codePressableOpacityand small hooks (usePreventGestureBack,useDeclineCredentialOffer,useDeclineProofRequest,useAutoRequestPermission)PickUpV2LiveMode(WebSocket push); batch pickup, 5s trust-ping polling, and theMEDIATOR_USE_V2_BATCH_PICKUPenv flag removed (supersedes feat: enable Pickup V2 batch pickup via env flag #7)Verification
yarn typecheckandyarn lintclean; app jest 16 suites / 70 tests passassembleDebug(New Arch) andxcodebuildDebug both green; release JS bundles build for both platformsPhase 5 — DTG spec alignment + VC 2.0 (
b346f0a+ bifold Phase 5 commit)RelationshipCardcredential (hidden from chat/notifications/wallet list); contact display resolves from the newest received RCard with legacy-issuer fallback@credo-ts/coreyarn patch in BOTH trees (accepthttps://www.w3.org/ns/credentials/v2as first @context, optionalissuanceDate) + bundled v2 context documentvrc:rceVersion:2; v2 peers get VCDM 2.0 credentials (validFrom/validUntil, Ed25519 suite context included at build time), v1 peers keep the full legacy exchange (1.1 VRC with embedded issuer object, no RCard)Phase 5 verification
Attestation hardening (
a9ca437)88f80fe8: Google attestation trust anchors from keyring-bifold#23 cherry-picked onto the upgrade branch (embedded published Google roots, no self-as-anchor). Verified on the upgraded stack: 7/7 attestation JUnit tests, 29/29 BiometricSignatureVerifier TS tests, appassembleDebuggreenDo not merge without approval — merge order is coordinated by the repo owner (bifold #26 first, as a merge commit so the pinned submodule commit stays reachable).