Skip to content

fix: support admin console session timeout settings - #109

Merged
jaxxstorm merged 3 commits into
mainfrom
automation/tailscale-api-admin-session-timeout
Oct 29, 2026
Merged

jaxxstorm merged 3 commits into
mainfrom
automation/tailscale-api-admin-session-timeout

Conversation

@jaxxstorm

@jaxxstorm jaxxstorm commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

Historical compatibility backlog found during the first API watcher baseline on 2026-10-29; this is not a claim of a newly released change or a known introduction date.

The official current schema exposes TailnetSettings.adminConsoleSessionTimeoutMinutes (0–43200; 0 disables timeout), but current main cannot set it using tscli set settings and its typed models drop it.

  • Add --admin-console-session-timeout-minutes, validated before API requests.
  • Preserve explicit zero and omit the field when unspecified.
  • Add optional model fields, regression tests, and generated command documentation.

Sources: https://tailscale.com/api ; https://api.tailscale.com/api/v2?outputOpenapiSchema=true ; https://tailscale.com/docs/account/admin-console-session-timeout

Scope / existing work

Main advanced during this run: commit 7b12baa independently added postureStatus and routeSelection while draft #108 remains open. This branch now includes updated main (3bb4009) and preserves those changes; the functional PR diff adds only timeout support. The supported schema refresh adds the timeout field plus IPv4 400-response documentation; coverage accounting includes the timeout request and passes with no gaps. All tests/build/vet/docs and coverage-gaps-check passed again after resolving the main-branch conflict. No real tailnet API calls, merge, release, or deployment performed.

Actual validation

  • Baseline make test: passed.
  • RED: model round-trip lost timeout; CLI positive cases failed on unknown flag; range cases initially sent requests.
  • GREEN: explicit 0 and upper bound, invalid bounds, omitted field, and GET round-trip tests passed.
  • make test (main + tools modules): passed.
  • go build ./..., go vet ./..., go -C tools vet ./..., make docs-check: passed.
  • Diff/security/whitespace self-review passed. Local mock API only.

Commits are unsigned because configured GPG signing requires unavailable interactive pinentry; signing config was not changed.

Additional RED→GREEN: coverage request-field test failed before adding the timeout field to the coverage registry, then passed. Final make coverage-gaps-check, full tests, build, vet (both modules), and docs-check passed after the official schema refresh.

Copilot AI balanced review requested due to automatic review settings October 29, 2026 17:36
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T17:37:55.042033Z 87a0d30 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues block the admin console session timeout change.

No open issues 🎉

What changed in this PR

Adds admin console session timeout support to the settings CLI and typed API models, without refreshing the pinned schema or overlapping with #108’s posture and routing changes.

Changes:

  • Adds --admin-console-session-timeout-minutes with validation for 0–43200 before API requests.
  • Preserves explicit zero to disable the timeout and omits the field when unspecified.
  • Adds regression tests and updates generated command documentation.
File Description
test/​cli/​settings_timeout_test.go Tests GET/PATCH behavior, bounds validation, explicit zero, and omission.
pkg/​apitype/​settings_test.go Tests timeout preservation through JSON round-trips.
pkg/​apitype/​models.go Adds optional timeout fields to settings and update models.
docs/​commands/​tscli_set_settings.md Documents the new timeout flag and accepted range.
cmd/​tscli/​set/​settings/​cli.go Registers and validates the flag, including it in requests only when specified.

Review effort: Balanced

@jaxxstorm
jaxxstorm merged commit 0ad2b77 into main Oct 29, 2026
1 check passed
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