Add health checks, auto-reauth, and record-session flags to managed auth#164
Add health checks, auto-reauth, and record-session flags to managed auth#164masnwilliams wants to merge 2 commits into
Conversation
Exposes the health monitoring controls in auth connection create and update. Bumps kernel-go-sdk to v0.55.0 so the new fields land on the SDK request/response types. Create: - --no-health-checks (opt out; defaults on server-side) - --no-auto-reauth (opt out; defaults on server-side) - --record-session (opt in) Update: - --health-checks / --no-health-checks - --auto-reauth / --no-auto-reauth - --record-session / --no-record-session Also surfaces the three booleans in the managed auth summary table. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Monitoring Plan: Auth Connection CLI — New Health/Session FlagsThis PR adds three new flags to Key risks to watch: (1) The new fields flowing through to the API could hit validation errors if the SDK v0.55 contract differs from what the server expects, surfacing as 4xx/5xx spikes on Status updates will be posted automatically on this PR as monitoring progresses. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8abaeaa. Configure here.
| if in.RecordSession.Set { | ||
| params.ManagedAuthUpdateRequest.RecordSession = kernel.Opt(in.RecordSession.Value) | ||
| hasChanges = true | ||
| } |
There was a problem hiding this comment.
Get view missing new health-monitoring boolean fields
Medium Severity
The Get function builds its own detailed table (not using printManagedAuthSummary) and already displays HealthCheckInterval, but was not updated to also display the three new boolean fields (HealthChecks, AutoReauth, RecordSession). These fields are shown after create and update via printManagedAuthSummary, but the get command — the primary way to inspect a connection — silently omits them. Users who set these flags won't be able to verify them through get.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 8abaeaa. Configure here.
There was a problem hiding this comment.
looks good to me, 2 nit (first one blocking, second one non-blocking):
Nit 1: the get command does not display HealthChecks, AutoReauth, or RecordSession. It builds its own table separately from printManagedAuthSummary. Users who set these flags on create/update will not be able to verify through get. Could you add the 3 lines there as well? (caught by Bugbot as well)
Nit 2: unlike the dashboard (which auto-disables auto-reauth when health checks are turned off), the CLI lets you pass --no-health-checks without --no-auto-reauth. The result is health_checks = false, and auto_reauth = true, which is harmless because of the way the temporal workflow works but could be potentially confusing. Worth either updating the API (also noted in the other PR), or making that change here in the CLI, or just adding a comment and explaining it's a no-op.
…auth-health-controls # Conflicts: # go.mod # go.sum


Summary
Flags
Create (server-side defaults: `health_checks=true`, `auto_reauth=true`, `record_session=false`):
Update (toggle both directions):
Conflicting flag pairs are marked mutually exclusive.
Test plan
🤖 Generated with Claude Code
Note
Medium Risk
Changes how operators configure session health checks, automatic re-authentication, and default session recording for managed auth—auth-adjacent behavior with server-side impact, but limited to CLI/API field wiring and covered by unit tests.
Overview
Exposes managed auth health-monitoring settings on
kernel auth connections createandupdate, wiring new SDK fields (HealthChecks,AutoReauth,RecordSession) through the CLI.Create uses opt-out / opt-in flags aligned with server defaults:
--no-health-checks,--no-auto-reauth, and--record-sessiononly send explicit values when set. Update adds paired toggles (--health-checks/--no-health-checks,--auto-reauth/--no-auto-reauth,--record-session/--no-record-session) with the sameBoolFlag+Changed()pattern assave-credentials, plus mutual exclusivity on each pair.After create/update, the managed auth summary table now always shows the three booleans. Tests cover create flag mapping and extend the update param-mapping test.
Reviewed by Cursor Bugbot for commit 9a7b8bf. Bugbot is set up for automated code reviews on this repo. Configure here.