Add vault item fill parameters and safe operation outcomes - #251
Merged
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
hiroTamada
marked this pull request as ready for review
September 14, 2026 13:26
rgarcia
approved these changes
Sep 14, 2026
rgarcia
left a comment
Contributor
There was a problem hiding this comment.
reviewed incrementally — the card-fill implementation, safety behavior, tests, documentation, and SDK upgrade look good.
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
vaults items invoke <vault> <key> <operation>with--paramsfor fill. Validate exact property names, duplicate keys, required browser/page inputs, field bindings, expiration formats, billing fields, and timeout bounds without echoing inputs. The positional operation suppliestype; parameters cannot override it.authorize --open. Re-fetch advertised availability, retain recovery-required guards and project scoping, and disable retries for both requests.SDK approach
Upgrade the Go SDK from v0.101.0 to released v0.102.0. Both authorize and fill use typed
PerformOperationrequests and its operation-response union, withWithMaxRetries(0). Fill bindings use the SDK's stored-field/expiration union constructors. No genericClient.Postcompatibility path remains. Keep strict CLI input validation and display-safe response projections so unknown response properties cannot expose values or selectors; authorize item responses retain the existing output/open behavior.Requires an API that advertises fill; older APIs remain gated by
available_operations. Browser session IDs are sent unchanged, never resolved as names. No SDK or API release/merge is part of this change.Validation
make test— passes (go vet ./...and fullgo test ./...).go test -race ./cmd -run 'TestVault' -count=1— passes.make build— passes.Production verification
Tested commit
b157880with SDK v0.102.0 against the production API using a new disposable vault, an explicitly connected Link wallet, and a user-approved card with a $1 spending limit. This was a fill-only test, not a purchase.The headless browser used controlled HTML fulfilled by Playwright, with a cross-origin iframe, password inputs, restrictive CSP, no third-party page scripts, and no form or submit controls. No merchant checkout was submitted. Assertions returned booleans only; card and billing values were not returned, logged, or screenshotted.
Limitations: this verifies production orchestration and browser writes on a controlled page, not merchant acceptance or payment settlement. Unknown outcomes/transport failures remain covered by mocked tests rather than deliberately induced against a live approved credential. Optional billing_line2 was not requested in production.
Note
High Risk
Touches payment credential orchestration and browser field writes with partial-failure semantics; mistakes could leave checkout partially filled or mishandle sensitive flows despite redaction guards.
Overview
Adds
filltokernel vaults items invokeso ready Link cards can write vaulted checkout fields into an attached browser via--paramsJSON (browser_id, exactpage_url, CSS field bindings, optionaltimeout_ms).authorizestays parameterless with--openonly; the positional operation setstypeand cannot be overridden in params.Invoke now routes through SDK v0.102.0 typed
PerformOperationunions: authorize returns a filtered item; fill returns a value-free per-field result with exit 0 oncompletedand nonzero onfailed/unknownwhile still printing JSON on stdout. Strict client-side param validation, display-safe result filtering, sanitized transport/API errors, and no retries or alias fallback. README, cobra help, anditems gethints document the flow; broad tests cover validation, redaction, authorize compatibility, and CLI subprocess outcomes.Reviewed by Cursor Bugbot for commit b157880. Bugbot is set up for automated code reviews on this repo. Configure here.