Skip to content

CLI: Update Go SDK to v0.153.0 - #322

Merged
hiroTamada merged 12 commits into
mainfrom
cli-coverage-update
Nov 20, 2026
Merged

hiroTamada merged 12 commits into
mainfrom
cli-coverage-update

Conversation

@kernel-internal

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

Copy link
Copy Markdown
Contributor

Summary

  • Update the Go SDK to v0.153.0.

Coverage

Kernel CLI SDK v0.153.0 coverage report

Result

Pass. /tmp/kernel-cli now depends on github.com/kernel/kernel-go-sdk v0.153.0, and the cumulative CLI work on cli-coverage-update covers the non-skipped SDK/OpenAPI surface introduced since the review base.

Review base: 9f5199cefc43acb8b46e5960d628e5f4f2f585a4
Branch HEAD reviewed: f322207 plus the uncommitted v0.153.0 dependency bump
Working-tree changes at completion: go.mod, go.sum only

No fetch, commit, push, or publish action was performed.

Dependency update

  • Updated github.com/kernel/kernel-go-sdk from v0.152.0 on the branch (v0.148.0 at the review base) to v0.153.0.
  • Ran go mod tidy; no unrelated dependency changes were introduced.
  • The public checksum database had not yet indexed the new tag during the initial download, so the official tagged module archive was obtained with GONOSUMDB=github.com/kernel/kernel-go-sdk.
  • go.sum contains the v0.153.0 module and go.mod checksums, and go mod verify passes.
  • No local replace directive remains in go.mod.

SDK/OpenAPI inventory and coverage

Operations and methods

  • OpenAPI operations: 218
  • x-cli-skip: true operations: 11
  • Non-skipped OpenAPI operations: 207
  • Seven of those are legacy /projects aliases of the seven /org/projects operations generated by the SDK.
  • Unique non-skipped operation semantics: 200
  • Generated primary SDK methods: 206
    • Required CLI methods: 200
    • Intentionally skipped generated methods: 6 Config Registry methods
  • SDK-to-command result: 200 covered, 6 intentionally skipped, 0 missing

The 11 skipped OpenAPI operations are:

  • Six Config Registry operations
  • MPP browser purchase
  • Current card-capture read and enroll
  • Card ingest
  • Auth handoff exchange

Parameters and flags

  • Enumerated all 206 SDK method signatures and request parameter types.
  • The method matrix contains 144 request parameter structs and 516 direct request fields, with path arguments reviewed from method signatures/endpoints.
  • Recursively crawled Cobra help for 276 canonical command nodes, including 221 leaf commands, and recorded every displayed flag.
  • The v0.148.0-to-v0.153.0 SDK delta added 160 request fields:
    • 126 are referenced directly by CLI code.
    • 34 are covered through deliberate abstractions rather than direct field-name references:
      • API-key and workload-identity policy JSON parsing
      • CAPTCHA solver object serialization, including explicit false
      • AgentCard --spec JSON parsing for cart lines and totals
      • Conditional service-account description assignment
      • The typed 1pw_disconnect operation constructor
  • Manual review found no uncovered request field or missing flag.

Audit artifacts:

  • /home/runner/work/_temp/cli-scratch/sdk-matrix.md
  • /home/runner/work/_temp/cli-scratch/cli-matrix.md
  • /home/runner/work/_temp/cli-scratch/sdk-command-coverage.md
  • /home/runner/work/_temp/cli-scratch/sdk-added-field-coverage.txt
  • /home/runner/work/_temp/cli-scratch/openapi-semantic-diff.txt

Cumulative CLI coverage since the review base

The branch adds the 27 commands corresponding to the 27 newly introduced non-skipped operations:

  • Tasks: create, get, list, link browsers
  • Reports: create, get, list
  • Report types: list, get, get version
  • Service accounts: create, get, update, list, archive
  • Workload identity issuers: create, get, update, list, archive, verify
  • Workload identity federation rules: create, get, update, list, archive
  • Workload identity authentication events: list

It also covers cumulative parameter and help changes for:

  • API-key service-account principals, policy replacement, source_ip conditions, new filters, and the expired lifecycle state
  • Browser and managed-auth CAPTCHA solver settings, deprecated stealth behavior, proxy semantics, and Linux fingerprints
  • AgentCard cart display fields and checkout authorization result semantics
  • Kernel-card browser routing during authorization
  • Vault event lookup with deleted resources
  • 1Password connect links, revoking state, disconnect operation, and pending provider revocation behavior
  • Auth-context service-account policy and workload-identity metadata

Help text review

Affected command descriptions and flag help were checked against the cumulative OpenAPI descriptions and constraints. The CLI now reflects:

  • Authorization requirements and API-key restrictions for service accounts and workload identity
  • Whole-object replacement behavior for federation-rule match and authorization objects
  • Optimistic concurrency through --expected-version
  • CAPTCHA solver versus proxy behavior and stealth deprecation
  • API-key policy replacement and source-IP allowlisting behavior
  • AgentCard display-only cart context and charged-amount caveats
  • 1Password link expiry, first-response settlement, revocation retry behavior, and disconnect semantics

No additional v0.153.0 help change was required: compared with v0.152.0, v0.153.0 only adds BrowserCost JSON helpers and the pending, provisional, and unavailable status constants. It adds no service method, request field, signature change, or request-field documentation change.

Pagination UX

All newly added offset-based list commands expose the required UX:

  • --page, default 1
  • --per-page, default 20, accepted range 1-99
  • Request limit is per-page + 1 to detect another page while staying within the API maximum of 100
  • Request offset is (page - 1) * per-page
  • Human output includes page, per-page, item count, whether more results exist, and a copyable next command that preserves filters
  • JSON output contains only the selected page's items

Validation

Completed successfully:

  • GONOSUMDB=github.com/kernel/kernel-go-sdk go mod verify
  • GONOSUMDB=github.com/kernel/kernel-go-sdk go test ./...
  • GONOSUMDB=github.com/kernel/kernel-go-sdk go vet ./...
  • GONOSUMDB=github.com/kernel/kernel-go-sdk go build ./cmd/kernel
  • git diff --check for both the working diff and the full diff from the review base
  • Recursive help enumeration of all 276 command nodes
  • SDK v0.153.0 BrowserCost JSON-helper/constant compile-and-decode check

Real API smoke tests

Read-only smoke tests succeeded for:

  • Browser list and deleted-browser detail lookup
    • The detail response included cost.status = "pending", exercising the v0.153.0 BrowserCost decoding path against the real API.
  • Task list and get
  • Report list and get
  • Report-type list, get, and version get
  • API-key list with the new creator/project/principal filters
  • API-key list with --status expired
  • Human page/per-page footer rendering

The available credential was an API key. The service-account and workload-identity list commands reached the real endpoints and received the documented rejection: API keys cannot read or manage workload identity resources. No live mutating operation was performed.

Sanitized smoke log: /home/runner/work/_temp/cli-scratch/smoke-results.txt

Full diff review

Full diff from 9f5199cefc43acb8b46e5960d628e5f4f2f585a4:

  • 37 files changed
  • 4,533 insertions
  • 170 deletions

The changed files are limited to the SDK dependency, command implementations, help/output updates, and tests associated with the v0.149.0-v0.153.0 coverage work. Follow-up commits on the branch correct or clarify the same vault/payment coverage. No unrelated source change, temporary debug code, local module replacement, generated binary, or credential was found in the repository diff.

Validation

  • Go build
  • Go vet
  • Go tests

Note

Medium Risk
Touches authentication (API keys, policies, service accounts), payment/vault flows, and broad flag semantics across browser commands; mistakes could misconfigure egress, credentials, or authorization in production automation.

Overview
Bumps kernel-go-sdk to v0.153.0 and adds CLI coverage for the new API surface: tasks, reports, report-types, and service-accounts (paginated list UX with --page / --per-page), wired from root.go.

API keys gain service-account-linked creation (with required project + policy), stricter JSON policy parsing including source_ip CIDR conditions, optional policy replacement on update, richer list filters (created-by, principal type, expired status), and principal/policy detail in tables.

Browser-related commands (browsers, browser-pools, auth connections) introduce --captcha-solver, mark --stealth as deprecated compatibility, adjust default proxy semantics when CAPTCHA solving is on, and block conflicting stealth/captcha flag combinations via shared helpers in browser_proxy.go. auth context now shows effective policy statements and workload-identity metadata for federated credentials.

Vaults updates include KERNEL-card authorize with --browser-id only, 1Password dual connect/action links and 1pw_disconnect, --include-deleted on item events, AgentCard cart-line spec help, and expanded delete/long-help text for payment and revocation behavior. Linux is added as a --fingerprint-os option alongside macOS.

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

@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.

Stale Bugbot comment from a previous run.

Comment thread cmd/tasks.go Resolved
Comment thread cmd/vaults_commands.go Resolved
bmsaadat and others added 2 commits November 18, 2026 12:57
…lt delete needs a retry

KERNEL retries the revoke, not the vault deletion, and a retry can end without
1Password's confirmation. A revoking account from a delete is removed, not
linked again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kernel-internal kernel-internal Bot changed the title CLI: Update Go SDK to v0.149.0 CLI: Update Go SDK to v0.150.0 Nov 19, 2026

@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.

Stale Bugbot comment from a previous run.

Comment thread cmd/auth_connections.go Resolved

@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.

Stale Bugbot comment from a previous run.

Comment thread cmd/vaults_commands.go Resolved
Comment thread cmd/vaults_commands.go Resolved
@kernel-internal kernel-internal Bot changed the title CLI: Update Go SDK to v0.150.0 CLI: Update Go SDK to v0.151.0 Nov 19, 2026
@kernel-internal kernel-internal Bot changed the title CLI: Update Go SDK to v0.151.0 CLI: Update Go SDK to v0.152.0 Nov 19, 2026

@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.

There are 6 total unresolved issues (including 5 from previous reviews).

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 3353180. Configure here.

Comment thread cmd/vaults_credentials.go Resolved
@kernel-internal kernel-internal Bot changed the title CLI: Update Go SDK to v0.152.0 CLI: Update Go SDK to v0.153.0 Nov 20, 2026
KERNEL cards take --browser-id alone; Link cards/payment_request items and
Shop Pay cards still need --browser-id and --page-url together.
@socket-security

socket-security Bot commented Nov 20, 2026 •

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.148.0 ⏵ v0.153.073 +1100100100100

View full report

tasks, reports, report-types, service-accounts, workload-identity issuers,
federation-rules, and authentication-events now print
{items, page, per_page, has_more} so scripts can paginate.
Managed-auth and pool configs treat captcha_solver as optional, so the zero
value printed false even when solving was on through legacy stealth.
@hiroTamada
hiroTamada merged commit 8fe6b5e into main Nov 20, 2026
8 checks passed
@hiroTamada
hiroTamada deleted the cli-coverage-update branch November 20, 2026 15:43
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.

2 participants