Skip to content

Complete Kernel-managed Visa card checkout in CLI - #283

Open
hiroTamada wants to merge 4 commits into
mainfrom
hypeship/kernel-vault-wallet-card
Open

hiroTamada wants to merge 4 commits into
mainfrom
hypeship/kernel-vault-wallet-card

Conversation

@hiroTamada

@hiroTamada hiroTamada commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

summary

  • support Kernel-managed wallet enrollment and card purchase requests, with Visa spend approval, token eligibility guidance, and the advertised browser fill flow
  • add confirm_transaction through --params or --spec-file, validating required fields, enums, integer amounts, uppercase currency, RFC3339 timestamps, and unknown/duplicate properties before any request; send the exact JSON body without automatic retries
  • allow only an explicitly advertised, parameterless restart_verification --open in recovery_required; hide and refuse all other operations even when advertised, retain the original refusal unless restart is advertised, and suppress stale recovery action URLs
  • document three-field Kernel card fill, merchant-page billing entry, and reporting the observed checkout outcome once without inferring success from fill or retrying unknown outcomes
  • merge main normally, retain its newer SDK/toolchain, preserve lowercase help/output, and reject card details including expiry inputs in Kernel wallet/card specs

compatibility

  • restart_verification depends on kernel/kernel#4760, currently deployed only to staging; availability is always gated on available_operations
  • the retained SDK does not yet generate confirm_transaction or restart_verification request types. confirmation uses option.WithRequestBody with validated JSON and option.WithMaxRetries(0); replace the raw body with the typed parameter once the SDK is regenerated. restart uses the existing advertised parameterless-operation path.

validation

  • make test passed (go vet ./... and go test ./...)
  • make lint completed successfully, but the repository's recipe masks lint failures: the full run reports 72 existing warnings (main reports 74); no unrelated lint cleanup included
  • golangci-lint run --new-from-rev=origin/main passed with 0 issues
  • make build and built-binary wallet/card/invoke --help checks passed
  • mock HTTP coverage for confirmation bodies via params/file/stdin, all enum and amount boundaries, invalid-input rejection before any request, reporting availability after consumption, no automatic retries, advertised/unadvertised recovery restart, advertised authorize/fill/preparation refusal without a POST, recovery display filtering and conditional restart guidance, explicit --open, three-field Kernel fill, card-data rejection, and updated guidance/examples
  • no live payment operations or real API resource mutations

Note

High Risk
Changes payment credential flows, recovery behavior, and outcome reporting—mistakes could cause duplicate charges, wrong reconciliation, or unsafe handling of card data.

Overview
Adds Kernel-managed vault payments to the CLI: kernel wallets/cards, vaults wallets get, hosted enrollment, token-eligibility guidance, browser fill for ready Kernel cards (no stored billing; origin locked to merchant_url), and blocking card PAN/CVC/expiry in --spec.

Introduces confirm_transaction via --params / --spec-file with strict local validation and a raw JSON POST (no retries) until the SDK exposes the operation type.

Tightens recovery_required: only an advertised, parameterless restart_verification (optional --open) may run; other operations stay blocked with updated errors and human guidance. README and command help document the full Kernel checkout flow (authorize → fill → one-time outcome report).

Reviewed by Cursor Bugbot for commit a18d8a8. Bugbot is set up for automated code reviews on this repo. Configure here.

@hiroTamada hiroTamada changed the title Support Kernel-managed vault wallets and cards in CLI Complete Kernel-managed Visa card checkout in CLI Oct 12, 2026
@hiroTamada
hiroTamada marked this pull request as ready for review October 12, 2026 19:09
@hiroTamada
hiroTamada requested a review from rgarcia October 12, 2026 19:17
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.

1 participant