Skip to content

docs(session): idle-exempt sessions also end on an account switch - #18225

Merged
iamwhatever merged 1 commit into
kirodotdev:mainfrom
unstablebrainiac:docs/idle-exempt-identity-sweep
Oct 9, 2026
Merged

iamwhatever merged 1 commit into
kirodotdev:mainfrom
unstablebrainiac:docs/idle-exempt-identity-sweep

Conversation

@unstablebrainiac

@unstablebrainiac unstablebrainiac commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: The session.idle_exempt_keys help text and docs say that a Kiro account switch or sign-out also ends a listed session with no tab, and when it does, instead of claiming that only the RSS limit or a gateway restart does.

#16034 added session.idle_exempt_keys. In five places it says that a listed key no tab ever claimed, such as a cron job that runs without one, is ended only by the RSS recycle or a gateway restart. That is wrong. The identity sweep also ends it. At the next dashboard chat turn after a Kiro account switch or sign-out, retire_kiro_identity_sessions (session_lifecycle.py) retires each idle kiro-backed session not spawned under the live account. A Kiro sign-out from the dashboard runs it at once with no live account, so it retires every idle kiro-backed session, whatever account each signed in with. The sweep reads no list.

Why it matters

An operator who trusts "only" expects a listed session to outlive everything but a restart. After an account switch it starts cold anyway, which is the cold start the setting exists to avoid. The reverse case is missing too: after a sign-out in a terminal, on a host where only crons run, a listed session keeps working on the previous account until a dashboard chat takes a turn, and no doc says so.

Not a goal

  • Making the identity sweep honour the list. A session spawned under the previous account must not keep answering on it, which is what the sweep is for.
  • Running the identity sweep when a cron fires. That changes behaviour; this PR documents the current behaviour.
  • Naming every path that can end a session. The text drops "only" instead of growing a longer list that claims to be complete.

What changed (motivation → approach → change)

The five places now say that a listed session with no tab keeps running after its job is deleted, and that the RSS limit or a gateway restart still ends it. On the kiro-cli or KAS backend, so does a Kiro sign-out or account switch: a Kiro sign-out from the dashboard ends it at once, whatever account it signed in with, and any other switch or sign-out of the account it signed in with ends it at the next dashboard chat turn. None of them says "only" any more.

Place Change
Help text in config/sections.py, and config-baseline.json Names the account switch or sign-out and when it takes effect. The baseline was regenerated, and the help string is the only line in it that changed.
docs/configuration.md The session.idle_exempt_keys row carries the same sentences.
docs/system-specs/modules/session.md ("Idle cleanup") and docs/system-specs/modules/config.md (SessionConfig) Name the identity sweep, say it reads no list and covers kiro-backed sessions, and name what runs it.

dashboard/chat_runner.py runs the sweep before each dashboard chat turn, and the dashboard's Kiro sign-out in dashboard/handlers/kas_login.py runs it at once with no live account. A cron fire does not run it. The sweep walks every session, leaves alone providers that do not use the Kiro identity store and sessions spawned under the live account, and retires the rest; with no live account it spares no kiro-backed session. A busy one is flagged and retired later. The sweep landed in #4159, before #16034, so the "only" was wrong from the start.

Backwards compatibility

Compatible: only prose changes; no key, default, type or code path differs.

Removes nothing: the diff rewords one help string, its copy in the baseline, and three doc passages.

Tests

No test is added or changed, since only prose changes. test/test_config_baseline.py (test_committed_snapshot_matches_generator) checks the regenerated config-baseline.json, and test/test_session_idle_exempt_keys.py passes unchanged.

Manual verification

N/A: no behaviour changes. The new sentences were checked against main. retire_kiro_identity_sessions walks owner._sessions, skips only providers that do not use the Kiro identity store and sessions spawned under the live account, and never reads session.idle_exempt_keys. Its callers are _retire_sessions_on_identity_change, which _run_chat awaits before each dashboard turn, and _retire_runtimes_after_sign_out on the dashboard's Kiro sign-out, which passes no fingerprint, so spawned_under spares no session. The cron callback in slack/gateway.py acquires its session without either.

Related Issues

Follows #16034, which added the setting for issue #16618.

no linked issue: a wording fix to docs that #16034 added, with no separate issue.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@github-actions github-actions Bot added readiness: checking Automated validation is still running fork Pull request from a fork (external contributor) labels Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — ⏭️ skipped

Revision 95ef7c8ffee11850945f986e8a3427758b863c65 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Advisory — does not block merge.

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of 95ef7c8ffee11850945f986e8a3427758b863c65 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Nothing to check.

[DESIGN-REVIEWED] 95ef7c8

Description read

[DESCRIPTION-READ] 9d5fb490e95924890797d9d07ea2afd988298e627350bbc4a2ee55b89f350c49

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

Reviewed 95ef7c8ffee11850945f986e8a3427758b863c65 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 95ef7c8

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — ✅ PASS

Premise-level review of 95ef7c8ffee11850945f986e8a3427758b863c65 via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Before merge, check that the help text's "mid-turn ... at a later dashboard chat turn" sentence matches how a busy session actually gets retired.

What this change ships

Inventory (4 items) — 4 justified

Intent: an operator gets correct docs on what still ends an idle-exempt session. This is a FIX.

  1. The session.idle_exempt_keys help text, and its copy in the config baseline, no longer say "only" and now name the Kiro sign-out and account-switch retirement — justified
  2. The configuration.md row for the same key gets the same wording — justified
  3. The session.md "Idle cleanup" section names the identity sweep and the two places that run it — justified
  4. The SessionConfig comment in config.md names the identity sweep and the two places that run it — justified

[FIRST-PRINCIPLES-REVIEWED] 95ef7c8

Description read

[DESCRIPTION-READ] c77e366d9a25121680c196bd4175d21a5e281492556b2441eb0aa0903a59fdb3

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed 95ef7c8ffee11850945f986e8a3427758b863c65 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 95ef7c8

@unstablebrainiac
unstablebrainiac force-pushed the docs/idle-exempt-identity-sweep branch from 344a088 to 8625b71 Compare October 8, 2026 21:25
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 8, 2026
@unstablebrainiac
unstablebrainiac force-pushed the docs/idle-exempt-identity-sweep branch from 8625b71 to 5b92130 Compare October 8, 2026 23:35
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 8, 2026
@unstablebrainiac
unstablebrainiac force-pushed the docs/idle-exempt-identity-sweep branch 2 times, most recently from 3850375 to de575c1 Compare October 9, 2026 01:27
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 9, 2026
The session.idle_exempt_keys help text and docs said that only the RSS
limit or a gateway restart ends a listed session with no tab. The identity
sweep (retire_kiro_identity_sessions) also retires one after a Kiro account
switch or sign-out, and it reads no list. It runs before each dashboard chat
turn and at once on a dashboard sign-out, not on a cron fire. The five
places drop "only", name the account switch and say when it takes effect.
@unstablebrainiac
unstablebrainiac force-pushed the docs/idle-exempt-identity-sweep branch from de575c1 to 95ef7c8 Compare October 9, 2026 06:49
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 9, 2026
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 9, 2026

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

This PR corrects the session.idle_exempt_keys help text and docs. They claimed a listed session with no tab is ended only by the RSS limit or a gateway restart, but the Kiro identity sweep also ends it. I checked the new wording against main. retire_kiro_identity_sessions (session_lifecycle.py:1963) reads no exempt list, chat_runner.py calls it before each dashboard turn with the live fingerprint, and kas_login._retire_runtimes_after_sign_out runs it on a dashboard sign-out. Busy sessions are flagged and retired later, which matches the new mid-turn sentence. Only prose changes: one help string and its regenerated baseline line, plus three doc passages. No identity or auth code path changes, so no hold rule applies. All lanes PASS on the current head, CI is green, the PR is mergeable on main and nobody has requested changes. — crew-pr-reviewer

@iamwhatever
iamwhatever enabled auto-merge (squash) October 9, 2026 19:34
@iamwhatever
iamwhatever merged commit 0fc3cda into kirodotdev:main Oct 9, 2026
104 checks passed
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants