Skip to content

CLI: Update Go SDK to 6e62bf5b91e5d315b90b6c9c7296e09e312fb338 - #231

Open
kernel-internal[bot] wants to merge 4 commits into
mainfrom
cli-coverage-update
Open

CLI: Update Go SDK to 6e62bf5b91e5d315b90b6c9c7296e09e312fb338#231
kernel-internal[bot] wants to merge 4 commits into
mainfrom
cli-coverage-update

Conversation

@kernel-internal

@kernel-internal kernel-internal Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

This PR updates the Go SDK to 6e62bf5b91e5d315b90b6c9c7296e09e312fb338 and adapts the CLI to a changed managed-auth response field.

SDK Update

  • Updated kernel-go-sdk to 6e62bf5b91e5d315b90b6c9c7296e09e312fb338

Coverage Analysis

This PR was generated by performing a full enumeration of SDK methods and CLI commands.

All 140 methods in api.md were checked against the CLI's service interfaces and direct client calls. 4 endpoints are marked x-cli-skip: true in openapi.yaml and are excluded (post /site-configs/lookup, post /site-configs/resolve, get /site-configs/analyses/{id}, post /auth/connections/{id}/exchange). The remaining 136 all have CLI commands. Every field of every *Params struct was also matched against the CLI's registered flags — no missing flags were found.

New Commands

None — the SDK diff between v0.92.0 and this revision adds no new endpoints or params.

Changed Behavior

The canonical managed-auth input field was reshaped in this SDK release:

  • ManagedAuthField.ReplaceExisting (bool) was removed
  • ManagedAuthField.Reason ("missing" | "rejected") was added

kernel auth connections get and the kernel auth connections follow event stream previously rendered a replace-existing marker on a field. They now render reason=<why>, which still surfaces the rejected-credential case and additionally distinguishes it from a simply-missing value. Without this change the CLI does not compile against the new SDK.

Testing

  • go build ./... and go test ./cmd/... pass
  • Live API: auth connections list, auth connections get <id> (table and -o json), browsers create -t 60, browsers get <id>, browsers delete <id>
  • Unit coverage for the new field added to TestAuthConnectionsGet_PrintsCanonicalInputMetadata

Triggered by: kernel/kernel-go-sdk@6e62bf5
Reviewer: @kernel-internal[bot]


Note

Low Risk
Read-only org entitlements command and managed-auth display tweaks aligned with the SDK; no changes to auth flows or credential handling logic.

Overview
Bumps kernel-go-sdk and adds CLI support for newer API shapes.

kernel org entitlements get shows effective plan (including effective plan vs contractual, trialing, billing status, trial end), per-feature enablement with constraints (e.g. extension caps, replay retention, managed auth connection and health-check intervals), and org concurrency limits. Nullable caps render as unlimited; missing plan fields as -. Supports --output json. Documented in the README.

Managed auth connections (get / follow): canonical input fields now surface reason from the API (e.g. reason=rejected when a stored credential was refused) instead of the removed replace-existing metadata.

Tests cover entitlements rendering, null/unlimited handling, and the updated field formatting.

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

Bump github.com/kernel/kernel-go-sdk to
v0.91.1-0.20260817203807-0a287359dcc5 (0a28735).

Coverage gap found by enumerating all 140 methods in the SDK's api.md
against the CLI command tree: the new Organization.Entitlements resource
had no CLI surface. Everything else was already covered.

New command:
- `kernel org entitlements get` for client.Organization.Entitlements.Get
  (GET /org/entitlements). Renders Plan, Features, and Limits sections;
  supports --output json.

Null constraint values mean unlimited in this API, and the SDK models
them as non-pointer int64, so rendering keys off respjson field validity
rather than the zero value.

Tested against the real API:
- kernel org entitlements get (table output, ENTERPRISE plan)
- kernel org entitlements get --output json
- kernel org entitlements get --output yaml (rejected as expected)
- go build ./... and go test ./... pass, including 5 new unit tests
  covering populated constraints, null-as-unlimited, null plan fields,
  invalid --output, and API errors.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@socket-security

socket-security Bot commented Aug 17, 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.91.0 ⏵ v0.92.1-0.20260818210401-6e62bf5b91e572 +1100100100100

View full report

Updates github.com/kernel/kernel-go-sdk from
v0.91.1-0.20260817203807-0a287359dcc5 to v0.92.0.

## Coverage Analysis

Diffing the two module sources shows the SDK API surface is byte-identical
between these versions -- the only changes are release metadata
(.release-please-manifest.json, CHANGELOG.md, README.md, internal/version.go).

A full enumeration was still performed:
- All 140 SDK methods in api.md have corresponding CLI commands.
- The 4 x-cli-skip endpoints (/site-configs/lookup, /site-configs/resolve,
  /site-configs/analyses/{id}, /auth/connections/{id}/exchange) are absent
  from the SDK surface, so nothing to skip.
- All params struct fields are covered by CLI flags except three, each
  intentional:
  - AuthConnectionLoginParams.BrowserTelemetry -- deprecated in favor of
    browser.telemetry, which the CLI already uses via ManagedAuthBrowserConfigParam.
  - AuditLogListParams.PageToken -- opaque cursor handled internally by
    ListAutoPaging; CLI exposes --limit instead.
  - BrowserCurlParams.TimeoutMs / ResponseEncoding -- `browsers curl` is
    implemented against browsers.HTTPClient rather than the SDK curl endpoint;
    --max-time covers the timeout and raw bytes are streamed, so response
    encoding is not applicable.

No coverage gaps found; no new commands or flags added.

## Tested
- go build ./... and go vet ./... clean
- go test ./... all packages pass
- Smoke tested rebuilt binary against the live API: `kernel browsers list`

Triggered by: kernel/kernel-go-sdk@a156820

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@kernel-internal kernel-internal Bot changed the title CLI: Update SDK to 0a28735 and add new commands/flags CLI: Update Go SDK to a1568205c576686eeafc634fff0ea72b75c28c0e Aug 17, 2026
kernel-internal Bot and others added 2 commits August 18, 2026 21:08
Bumps kernel-go-sdk to 6e62bf5b91e5d315b90b6c9c7296e09e312fb338.

That SDK release reshapes the canonical managed-auth input field: the
boolean `replace_existing` is gone and a `reason` enum ("missing" |
"rejected") takes its place, so `auth connections get` and the
`auth connections follow` event stream now render `reason=<why>` instead
of the `replace-existing` marker. A rejected credential is still visible,
now alongside the missing-value case it could not previously express.

A full enumeration of api.md against the CLI's service interfaces and
flags found no other coverage gaps: all 136 non-x-cli-skip SDK methods
have commands, and every params field maps to an existing flag.

Tested: auth connections list, auth connections get <id> (table + json),
browsers create -t 60, browsers get <id>, browsers delete <id> against
the live API; go build ./... and go test ./cmd/... pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@kernel-internal kernel-internal Bot changed the title CLI: Update Go SDK to a1568205c576686eeafc634fff0ea72b75c28c0e CLI: Update Go SDK to 6e62bf5b91e5d315b90b6c9c7296e09e312fb338 Aug 18, 2026
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