Repository navigation
fix: support admin console session timeout settings - #109
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
There was a problem hiding this comment.
🟢 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-minuteswith 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
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 usingtscli set settingsand its typed models drop it.--admin-console-session-timeout-minutes, validated before API requests.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
make test: passed.make test(main + tools modules): passed.go build ./...,go vet ./...,go -C tools vet ./...,make docs-check: passed.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.