Skip to content

CLI: Update Go SDK to v0.154.0 - #326

Open
kernel-internal[bot] wants to merge 1 commit into
mainfrom
cli-coverage-update
Open

kernel-internal[bot] wants to merge 1 commit into
mainfrom
cli-coverage-update

Conversation

@kernel-internal

@kernel-internal kernel-internal Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Update the Go SDK to v0.154.0.

Coverage

Kernel CLI coverage report: kernel-go-sdk v0.154.0

Result

  • CLI repository: /tmp/kernel-cli
  • Review base: 8fe6b5ee90a4c56bcf56cd53818bba3169bbbf1d
  • Base SDK: github.com/kernel/kernel-go-sdk v0.153.0
  • Target SDK: github.com/kernel/kernel-go-sdk v0.154.0
  • Final result: all generated SDK methods have a corresponding CLI path except methods whose OpenAPI operations are explicitly marked x-cli-skip: true; all v0.154.0 input and output changes are covered.
  • No SDK methods were added or removed in this release. The release adds request fields/union variants, response fields/types, validation-bound changes, and descriptions.
  • No pagination behavior was added or changed by this SDK/OpenAPI diff.

Exhaustive inventories

Inventory Count Result/artifact
SDK methods parsed from api.md 206 200 covered by CLI paths; 6 excluded because their operations are x-cli-skip
SDK method parameter types 144 Fully enumerated with Go names, wire names, types, tags, comments, and nested paths
Direct parameter fields 519 Audited against positional operands, flags, structured inputs, aliases, or automatic pagination behavior
Flattened parameter entries 2,233 Includes nested request objects and union variants
Cobra commands 278 246 runnable
Unique CLI flag names 338 2,347 command/flag associations including inherited flags
OpenAPI x-cli-skip operations 11 6 generated SDK methods plus 5 operations also marked x-stainless-skip

Detailed inventories:

  • SDK method/command matrix: /home/runner/work/_temp/cli-scratch/sdk-coverage-matrix.md
  • Machine-readable SDK method coverage: /home/runner/work/_temp/cli-scratch/sdk-coverage.json
  • SDK parameter and flattened-field matrix: /home/runner/work/_temp/cli-scratch/sdk-param-field-matrix.md
  • Raw SDK methods: /home/runner/work/_temp/cli-scratch/sdk-methods.json
  • Raw SDK parameter metadata: /home/runner/work/_temp/cli-scratch/sdk-params.json
  • CLI command/local-flag matrix: /home/runner/work/_temp/cli-scratch/cli-coverage-matrix.md
  • Full Cobra metadata, including help, flag types/defaults, and inherited flags: /home/runner/work/_temp/cli-scratch/cli-commands.json
  • OpenAPI exclusions: /home/runner/work/_temp/cli-scratch/x-cli-skip-operations.md

The field audit normalized expected CLI representations rather than requiring literal Go-field-to-flag spelling. These include positional IDs/paths/URLs, established aliases such as TimeoutSeconds → --timeout, repeated flags for slices/maps, flattened dedicated flags for nested structs, --params/--spec-file for high-dimensional unions, and automatic/page-based pagination where the CLI intentionally owns the SDK cursor or offset.

Method and input coverage findings

There are no missing non-skipped command paths. The only generated methods without CLI commands are the six Config Registry methods whose operations explicitly opt out of CLI coverage.

The v0.154.0 input changes map as follows:

SDK input CLI representation Status
BrowserNewParams.Platform.Os `kernel browsers create --platform-os <linux macos>`
BrowserGetParams.IncludeCost kernel browsers get <id-or-name> --include-cost Added; sends include_cost=true only when requested
VaultItemPerformOperationParams.OfLinkBalanceSetup Existing kernel vaults items invoke ... link_balance_setup operation operand Added union branch
OfLinkBalanceSetup.DesiredBalanceAmount --params or --spec-file field desired_balance_amount Added; integer, minimum 100, multiple of 100
OfLinkBalanceSetup.DesiredTransactionLimit --params or --spec-file field desired_transaction_limit Added; integer, 100–50,000, multiple of 100
WorkloadIdentityTokenValidationParam.MaxLifetimeSeconds Existing --token-max-lifetime-seconds Maximum updated from 86,400 to 172,800

Unknown Link balance setup fields are rejected rather than dropped. Omitting both optional amount fields produces the required operation discriminator only.

OpenAPI/SDK diff coverage checklist

Diff change CLI coverage
Workload identity max_lifetime_seconds maximum raised to 172,800 Validation, error text, and create/update flag help updated; boundary tests cover 172,800 and 172,801
Generic error unsupported_fields added Cleaned SDK errors now include the incompatible browser fields; unit-tested
BrowserOS, BrowserPlatform, and create request platform.os Added --platform-os; help distinguishes host OS from fingerprint OS and documents current macOS availability/restrictions
Browser platform added to create/get/update/list, pool-acquire, and invocation-browser responses Human output now shows Host OS in every corresponding structured output; JSON already preserves SDK fields; absent platform is rendered as Linux per the schema
Browser GET include_cost Added --include-cost and SDK query mapping
Browser cost visibility/description Get output shows cost status, estimated USD amount, and as_of; help states omission rules, provisional gross-meter semantics, non-invoice caveat, pending/unavailable states, and continued accrual risk
link_balance_setup request/result union variants Added parsing, validation, invocation, safe JSON/human output, and optional --open behavior
Link eligibility and setup semantics Help documents connected-wallet advertisement, live eligible_for_balance check/409, target-balance behavior, threshold-step behavior, user-final-choice semantics, whole-dollar bounds, $150 add limit, and Kernel-card approval limitation
Non-expiring Link setup result URL Human/JSON output exposes only type and url; intended capability URLs remain usable even with a query key such as code; unrelated provider fields remain filtered
Vault payment-method balance.available Filtered JSON and human tables expose amount and currency; help documents live/non-persisted data, absent values, minor units, and lowercase ISO 4217 currency
link_balance_setup added to advertised-operation enums Generic available-operation handling recognizes and invokes it only when advertised

Explicit x-cli-skip exclusions

These operations were intentionally not implemented:

Method Path Notes
GET /config-registry Generated SDK method; x-cli-skip
POST /config-registry/lookup Generated SDK method; x-cli-skip
POST /config-registry/resolve Generated SDK method; x-cli-skip
GET /config-registry/analyses Generated SDK method; x-cli-skip
GET /config-registry/analyses/{id} Generated SDK method; x-cli-skip
POST /config-registry/analyses/{id}/cancel Generated SDK method; x-cli-skip
POST /mpp/browsers Also x-stainless-skip; no SDK method
GET /vault/card-captures/current Also x-stainless-skip; no SDK method
POST /vault/card-captures/current Also x-stainless-skip; no SDK method
POST /vault/card-ingest/{payment_method_id} Also x-stainless-skip; no SDK method
POST /auth/connections/{id}/exchange Also x-stainless-skip; no SDK method

Implemented files

Published-code changes are limited to:

  • go.mod, go.sum
  • cmd/browsers.go, cmd/browsers_test.go
  • cmd/invoke.go
  • cmd/vaults.go
  • cmd/vaults_commands.go
  • cmd/vaults_operation_params.go
  • cmd/vaults_output.go
  • cmd/vaults_payment_method_operations_test.go
  • cmd/workload_identity_issuers.go, cmd/workload_identity_test.go
  • pkg/util/errors.go, pkg/util/errors_test.go

The complete reviewed patch is at /home/runner/work/_temp/cli-scratch/full-cli-diff.patch.

Validation

Static/build/unit validation

All final commands passed:

  • gofmt on all changed Go files
  • go vet ./...
  • go test ./...
  • go build ./...
  • final binary build to /home/runner/work/_temp/cli-scratch/kernel
  • git diff --check 8fe6b5ee90a4c56bcf56cd53818bba3169bbbf1d

Logs:

  • /home/runner/work/_temp/cli-scratch/go-vet.log
  • /home/runner/work/_temp/cli-scratch/go-test.log
  • /home/runner/work/_temp/cli-scratch/go-build.log

New tests cover browser platform serialization/validation/help/output, cost query/output/help, update response platform output, Link setup request bodies and bounds, parameterless Link setup, capability URL output/open behavior, response filtering, live balance JSON/table output, workload identity boundaries/help, and unsupported_fields error rendering.

Help smoke tests

Final binary help was checked for:

  • browsers create --help: --platform-os, platform/fingerprint distinction, macOS restrictions, unsupported_configuration
  • browsers get --help: --include-cost and cost caveats
  • vaults items invoke --help: link_balance_setup, eligibility and amount semantics
  • vaults wallets payment-methods --help: live/non-persisted balance semantics
  • workload-identity issuers create --help: 172,800-second maximum

Captured help is under /home/runner/work/_temp/cli-scratch/.

Production API smoke test

Both newly added flags were exercised against the real API:

  1. Created a temporary browser with browsers create --platform-os linux --output json.
  2. Verified the response reported platform.os = linux.
  3. Fetched it with browsers get <session> --include-cost --output json.
  4. Verified cost.status = provisional and platform.os = linux.
  5. Verified human output included Host OS, linux, Cost Status, and provisional.
  6. Deleted the temporary browser successfully.

Artifacts:

  • /home/runner/work/_temp/cli-scratch/browser-create-platform.json
  • /home/runner/work/_temp/cli-scratch/browser-get-include-cost.json
  • /home/runner/work/_temp/cli-scratch/browser-get-include-cost.txt
  • /home/runner/work/_temp/cli-scratch/browser-delete-platform.log

No production resource was left behind.

Live-test limitations

  • link_balance_setup was not invoked against production because it requires an eligible, already-connected Link wallet and an interactive Link user flow. It is covered by an HTTP contract test that verifies advertised-operation gating, exact POST bodies with both or neither optional fields, sanitized output, capability-query URL preservation, --open, and validation failures.
  • The workload identity 172,800-second boundary was not applied to a production issuer because that would mutate organization security configuration. It is covered by unit boundary and help tests.
  • A macOS browser request was not sent because the target specification states that macOS is currently unavailable. The new --platform-os transport path was verified in production with linux, and macOS serialization/restriction behavior is unit-tested.

Final review

The complete working-tree diff was reviewed against the requested base commit. Changes are scoped to the v0.154.0 SDK/OpenAPI delta and supporting tests. No repository build or scratch artifacts were added to published paths. The working tree remains intentionally uncommitted; nothing was pushed or published.

Validation

  • Go build
  • Go vet
  • Go tests

Note

Medium Risk
Touches browser creation/query, vault payment flows, and workload-identity validation; changes are mostly additive but affect billing visibility and payment setup URLs.

Overview
Bumps kernel-go-sdk to v0.154.0 and wires new browser, vault, workload-identity, and error surfaces into the CLI.

Browsers: Adds --platform-os on create (host OS vs --fingerprint-os), shows Host OS in list/get/pool/update/invoke output, and adds browsers get --include-cost with provisional cost fields in table output. Create/get help documents macOS availability and cost semantics. SDK errors with unsupported_configuration now list unsupported fields via CleanedUpSdkError.

Vaults: Supports link_balance_setup (optional desired_balance_amount / desired_transaction_limit, --open, sanitized URL output) and surfaces live Link balance amounts on payment-method tables and expanded JSON.

Workload identity: Raises --token-max-lifetime-seconds max from 86400 to 172800 (48h).

Tests and help text were extended for the new flags, operations, and bounds.

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

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgolang/​github.com/​kernel/​kernel-go-sdk@​v0.153.0 ⏵ v0.154.073 +1100100100100

View full report

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 54a8ec3. Configure here.

Comment thread cmd/vaults_commands.go
--open only on that user's machine, otherwise share it privately. do not assume completion:
inspect wallets payment-methods for a balance method and its live available amount. Kernel
cards do not yet use Link's approval policy, so they still require user approval even when
funded from the balance.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vaults copy uses Kernel and URL

Low Severity

New vaults user-facing copy writes the product name as Kernel and the acronym URL in help, info lines, and labels. Adjacent vaults help already uses KERNEL for the product and lowercase url in the same kind of copy, so this new Link balance setup and payment-methods text is inconsistent with that convention.

Additional Locations (2)
Fix in Cursor Fix in Web

Triggered by learned rule: Vaults user-facing copy is lowercase; KERNEL for product

Reviewed by Cursor Bugbot for commit 54a8ec3. Configure here.

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.

0 participants