You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
wallet.backend selection is not wired into the merchant service (OpenWallet seam bypassed) #1139
State (2026-10-29): the selection machinery is complete and merged — tollwallet.OpenWallet(WalletConfig{Backend,Socket,...}) (src/tollwallet/select.go:29) returns the gonuts or sidecar WalletPort, and the policy manifests default cdk on every target (#1007). But the service never uses it: src/merchant/merchant.go:509 calls tollwallet.NewWalletPort (the legacy gonuts constructor) directly, and config_manager has NO wallet.* keys at all. The cdk backend is therefore unreachable from a running module — the parity lane (PR #1137) and the in-process cdk_static lane (commit 7b3f6de) exercise the wallet layer only.
What Phase 4 (module e2e, wallet.backend=cdk) needs:
config_schema.go: a wallet section — backend (enum default|cdk, default per policy) + socket (default /var/run/cdk-walletd.sock, the packaged daemon's path). Schema change → run the contract lints (js-schema-lint, build-purity, ssid-format) per AGENTS.
merchant.go: route newFullMerchant's wallet construction through tollwallet.OpenWallet, incl. the degraded-mode factory path (DefaultWalletFactory). Keep the gonuts path byte-identical when backend=default.
e2e leg in tests/cloud-lab: merchant service + cdk-walletd sidecar (the parity rig's daemon recipe), receive→session-grant through the FULL module, daemon-kill legs at the business boundaries (receive↔session, session↔gate-open), quote persistence across daemon restarts, ErrSidecarAmbiguous reconciliation path.
Progress on the module half, re-landed on current main as PR #1200 (the #1155 branch that carried this wiring is CONFLICTING with main after the mintUnits/#1040 merge, so the slice was extracted and re-based rather than re-reviewed as a 20-commit campaign).
merchant.go — newFullMerchant routes through openServiceWallet → tollwallet.OpenWallet (forwarding mintUnits, so the default path is argument-identical to the replaced NewWalletPort call), and all three degrade paths route through walletFactoryForBackend — this also covers Degraded-mode wallet factory bypasses wallet.backend (gonuts wallet constructed under backend=cdk) #1157's degraded-factory bypass, mutation-proven red on pristine main.
Still open (campaign work, intentionally out of #1200's slice):
3. e2e leg in tests/cloud-lab — the full module on wallet.backend=cdk with the parity rig's daemon recipe, daemon-kill legs at the business boundaries, quote persistence across daemon restarts, ErrSidecarAmbiguous reconciliation at module level. This needs the e2e/conformance-matrix commits currently living on the #1155 branch (7778f22, 7a46baf, 7f28a82, 3f4660b) rebased onto #1200 — after #1200 lands, that branch's remaining unique value is exactly this leg plus the ambiguity-surfacing fixes.
Suggested path: land #1200 (closes #1157, items 1+2 here), then rebase #1155's cloud-lab commits on it to finish item 3 and close this issue.
Activity
Amperstrand commentedon Nov 5, 2026
Progress on the module half, re-landed on current main as PR #1200 (the #1155 branch that carried this wiring is CONFLICTING with main after the mintUnits/#1040 merge, so the slice was extracted and re-based rather than re-reviewed as a 20-commit campaign).
Done in #1200:
walletsection:backend(enumdefault|cdk) +socket(default/var/run/cdk-walletd.sock). Schema fences green (js-schema-lint 115 entries, build-purity, ssid-format); legacy configs parse as Backend""→ in-process default (asserted).newFullMerchantroutes throughopenServiceWallet→tollwallet.OpenWallet(forwardingmintUnits, so the default path is argument-identical to the replacedNewWalletPortcall), and all three degrade paths route throughwalletFactoryForBackend— this also covers Degraded-mode wallet factory bypasses wallet.backend (gonuts wallet constructed under backend=cdk) #1157's degraded-factory bypass, mutation-proven red on pristine main.Still open (campaign work, intentionally out of #1200's slice):
3. e2e leg in tests/cloud-lab — the full module on
wallet.backend=cdkwith the parity rig's daemon recipe, daemon-kill legs at the business boundaries, quote persistence across daemon restarts,ErrSidecarAmbiguousreconciliation at module level. This needs the e2e/conformance-matrix commits currently living on the #1155 branch (7778f22, 7a46baf, 7f28a82, 3f4660b) rebased onto #1200 — after #1200 lands, that branch's remaining unique value is exactly this leg plus the ambiguity-surfacing fixes.Suggested path: land #1200 (closes #1157, items 1+2 here), then rebase #1155's cloud-lab commits on it to finish item 3 and close this issue.
fix(merchant): wire wallet.backend selection through the OpenWallet s…