Skip to content

📖 Sessions: single-owner Codex/OpenCode login docs, invariant test, live-install checklist - #18881

Merged
hivecommons-hive[bot] merged 6 commits into
v5from
fix/18740-session-login-nonrefreshing
Nov 18, 2026
Merged

hivecommons-hive[bot] merged 6 commits into
v5from
fix/18740-session-login-nonrefreshing

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Refs #18740 (does not close it: the live-install check needs a person).

Option 2 decision. Not shipped as a code change. Codex (tokens.refresh_token) and OpenCode (refresh of an oauth entry) keep the refresh token as a required field of their login file (from their sources; unconfirmed on a live install), so a refresh-less or placeholder session copy would sign the person out of the session. Per the issue, #18793's adopt-back stays the safety net. The shared login remains the single owner: adoption only writes the shared file, never the session copy.

Changes

  • Docs (security-model.md): reasoning, stale-file retention (auth.json.stale-<time>), audit entry, and a manual live-install checklist.
  • Comment update in usersession_login_rotating.go (no logic change).
  • Test: adoption never writes the session copy and a later agent refresh is not displaced; no token material in logs/audit (existing helper).

Manual checklist (needs a person): see the security-model.md section; attach a redacted real auth file as a fixture.

Highest risk: the docs claim about CLI schemas is from source knowledge, not a live check.

🤖 Generated with Claude Code

…Refs #18740)

A refresh-less session copy would log the CLIs out, so the adopt-back stays the safety net. Pins that adoption never writes the session copy, documents the reasoning and the manual live-install checklist.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 18, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nicholasjackson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 18, 2026
@hivecommons-hive

hivecommons-hive Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Failing checks:

  • PR Type

Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path.

Evidence bundle `#18881f951f9f` sha256:2519bca03db28f1f4b60d3a5c9045aff9a6578558e65f11dca232eb28a84df69 — download from the dashboard or `hivectl review evidence #18881`.

merged by Hive trusted-author auto-merge: author clubanderson holds role owner and GitHub permission admin on repo; CI green at f951f9f.

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#18868 ✨ Sandbox Jobs: authenticated GitHub reads via a read-only hive relay same files src/docs/security-model.md

@clubanderson clubanderson changed the title 📝 Sessions: single-owner Codex/OpenCode login docs, invariant test, live-install checklist 📖 Sessions: single-owner Codex/OpenCode login docs, invariant test, live-install checklist Nov 18, 2026

@hivecommons-hive hivecommons-hive Bot 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.

Read the PR at head 5081be3 against the tree: the stale-file retention the new docs describe is real (usersession_login_rotating.go:288 replaceSharedLogin -> preserveClaudeCredential, which keeps the replaced shared file as <name>.stale-<UTC time>, and the audit entry carries stale_shared_file at :330). The new test pins what the comment now says: adoption writes only the shared file, and a later agent refresh is not displaced. Looks correct to me; the code change is comment-only.

One docs nit (not blocking): in src/docs/security-model.md the manual checklist's last sentence ("Attach a redacted real file ... as the test fixture.") runs straight into the pre-existing "For all of these vendors a resume no longer overwrites ..." sentence on the same line, so the unrelated resume point now reads as part of the checklist. A line break before "For all of these vendors" would fix it. The double parenthetical "(from their source, not yet confirmed on a live install) (Codex: ...)" also reads awkwardly.

The Codex/OpenCode refresh-token-required claim is, as the PR says, from source rather than a live install, and I did not verify it either; Refs #18740 is right to leave the issue open for the manual check.

— hive: agent=reviewer backend=claude model=claude-sonnet-5-5 claude=2.1.326

@hivecommons-hive
hivecommons-hive Bot merged commit e3823a7 into v5 Nov 18, 2026
87 of 88 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/18740-session-login-nonrefreshing branch November 18, 2026 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant