8000 feat(minimal): log out deletes the sign-in and refuses every reference to it by minimal-foundry[bot] · Pull Request #2512 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

feat(minimal): log out deletes the sign-in and refuses every reference to it - #2512

Merged
norrietaylor merged 5 commits into
mainfrom
agent/2278-log-out-delete-the-sign-in-and-refuse-every-refe
Oct 24, 2026
Merged

norrietaylor merged 5 commits into
mainfrom
agent/2278-log-out-delete-the-sign-in-and-refuse-every-refe

Conversation

@minimal-foundry
@minimal-foundry minimal-foundry Bot commented Oct 24, 2026 •
Copy link
Copy Markdown
Contributor

T21 — Log out: delete the sign-in and refuse every reference to it

slice: S1
kind: task
covers: BEP-044
size: M
est: 220 code, 220 tests
executor: agent
difficulty: needs care
model: standard
diagnostics: min auth logout prints "Signed out of GitHub. Boxes created before now lose GitHub access at their next request." and, when GitHub cannot be reached, "GitHub did not confirm the sign-out; the sign-in is removed from this machine." on stderr, pinned by logout_revokes_at_github_best_effort
observability: one info log line per logout naming the account and whether GitHub confirmed the revocation
layers:
- cli:
- crates/minimal/src/cli.rs: min auth logout
- crates/minimal/src/cmd/auth.rs: deletes the item, asks GitHub to revoke best effort, reports either outcome without failing
test: cargo nextest run -p minimal logout_revokes_at_github_best_effort
test: cargo nextest run -p minimal sign_in_after_logout_revives_no_earlier_reference
- e2e:
- scripts/session-e2e.sh: adds the case
test: ./scripts/session-e2e.sh bep_logout_refuses_every_reference_at_next_request
produces: none
consumes: none
proof: After min auth logout, every running box's next GitHub request is refused, and signing in again revives none of them.
depends on:
- blocked by #2276

Proof

A person can run min auth logout. It deletes the GitHub sign-in from the host keychain and prints "Signed out of GitHub. Boxes created before now lose GitHub access at their next request." It then asks GitHub to revoke this host's token, so the account's other hosts stay signed in (the per-token endpoint, the owner's ruling on the escalation thread). When GitHub refuses or cannot be reached, it also prints "GitHub did not confirm the sign-out; the sign-in is removed from this machine." on stderr, and the logout still succeeds. The test sign_in_after_logout_revives_no_earlier_reference runs the proxy's real redeemer against a shared keychain. In that test, references for two boxes resolve before the logout and are refused after it. After a new min auth login they are still refused, and only a reference minted after the new sign-in resolves. The e2e case shows the same on running boxes, but no lane has run it yet (see notes).

Notes from the agent: Outside the layers: crates/minimal/src/cmd/mod.rs. I added one match arm (AuthCommand::Logout) and one re-export there. Without them the new cli.rs variant does not compile, because the min auth dispatch lives in that file.

The keychain delete is in auth.rs, not in bep::signin. bep::signin::Keychain has no delete, and the bep crate is outside the layers. auth.rs adds a local SignInItem trait for HostKeychain and MemoryKeychain. It runs security delete-generic-password on macOS and secret-tool clear on the token item, then the metadata item, elsewhere. After the delete it reads the item back. A later task can move this into bep::signin beside write.

Revocation: the logout sends DELETE https://api.github.com/applications/<client_id>/token with basic auth under the embedded client secret. The per-token endpoint revokes this host's token and its refresh token and leaves the App's grant for the account in place, so other hosts stay signed in (section 6.10 line 839 calls logout host-wide; the owner ruled this on the escalation thread, round 3). A build with no embedded secret cannot ask GitHub, so it prints the not-confirmed line. A token that already expired will likely make GitHub refuse the call, which also gives the not-confirmed line. The client neve…[truncated]

Tests

line exit tail
cargo nextest run -p minimal logout_revokes_at_github_best_effort 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-07dc... Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling paths v0.0.1 (/workbench/crates/paths) Compiling stdlib v0.0.22 (/workbenc
cargo nextest run -p minimal sign_in_after_logout_revives_no_earlier_reference 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-dc8d... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.
./scripts/session-e2e.sh bep_logout_refuses_every_reference_at_next_request 0 the 'min' and 'minimald' under /work/build-cache/target/debug report different versions; rebuilding the pair no usable 'min' and 'minimald' pair on PATH or under target/; building the pair this run drives (cargo build --locked -p minimal --bin min -p minimald --bin minimald) built the pair: /work/bu

Verify

min task run agent-verify exited 101 under rustc 1.98.1, which the repository does not pin (1.97.0 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.

the sandbox ran rustc (1.98.1), the repository pins 1.97.0 in rust-toolchain.toml; a failure here may be the newer toolchain's, not this change's
Applying loadouts: default
Running task runtime-implement-verify in session task-runtime-implement-verify-438b...
    Checking ot v0.0.1 (/workbench/crates/ot)
    Checking args v0.0.1 (/workbench/crates/args)
    Checking paths v0.0.1 (/workbench/crates/paths)
   Compiling stdlib v0.0.22 (/workbench/crates/stdlib)
   Compiling version v0.8.0 (/workbench/crates/version)
    Checking switch v0.0.1 (/workbench/crates/switch)
   Compiling minvmd v0.8.0 (/workbench/crates/minvmd)
    Checking diagnostics v0.0.1 (/workbench/crates/diagnostics)
    Checking mlog v0.0.1 (/workbench/crates/mlog)
    Checking bep v0.0.1 (/workbench/crates/bep)
    Checking async-dialog v0.0.1 (/workbench/crates/async-dialog)
    Checking common v0.0.1 (/workbench/crates/common)
    Checking boxes v0.0.1 (/workbench/crates/boxes)
    Checking sandbox v0.0.1 (/workbench/crates/sandbox)
    Checking mfile v0.0.1 (/workbench/crates/mfile)
    Checking minimald-rpc v0.0.1 (/workbench/crates/minimald-rpc)
    Checking checkouts v0.0.1 (/workbench/crates/checkouts)
    Checking decode v0.0.1 (/workbench/crates/decode)
error: using `chunks_exact` with a constant chunk size
   --> crates/minimald-rpc/src/trace.rs:199:46
    |
199 |     for (byte, pair) in out.iter_mut().zip(s.chunks_exact(2)) {
    |                                              ^^^^^^^^^^^^^^^
    |
help: consider using `as_chunks::<2>()` instead
   --> crates/minimald-rpc/src/trace.rs:199:46
    |
199 |     for (byte, pair) in out.iter_mut().zip(s.chunks_exact(2)) {
    |                                              ^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#chunks_exact_to_as_chunks
    = note: `-D clippy::chunks-exact-to-as-chunks` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::chunks_exact_to_as_chunks)]`

error: could not compile `minimald-rpc` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

Out of scope

These files are outside the task's layers:; see Layer exception below:

  • crates/minimal/src/cmd/mod.rs

Residuals

  • #2500 owns the live run of bep_logout_refuses_every_reference_at_next_request (arch C1): the case signs the runner out of GitHub, so it runs with E2E_BEP_LOGOUT=1 on the macOS lane once that lane has a proxy and a sign-in, and records NOT RUN everywhere else.

Layer exception

Two lines in crates/minimal/src/cmd/mod.rs, outside T21's layers, accepted under the owner's layer-exception rule of 2026-10-19 (required one-line changes that make an in-layer change compile): the cmd_auth_logout name added to the existing pub use auth::{…} re-export, and the AuthCommand::Logout arm in the min auth dispatch match. Without them the Logout variant that cli.rs adds does not compile, because the dispatch lives in mod.rs. No other file outside the cli and e2e layers changed.

Closes #2278


Generated by Claude Code

The logout deletes the sign-in item from the host keychain. The proxy
reads the item for each request, so every box's reference to it is
refused at its next request. The logout then asks GitHub to delete the
App's grant. A refused or unreachable revocation is reported on stderr
and does not fail the logout. A sign-in after the logout is a new
instance, so it revives no reference minted before it.
Add the bep_logout_refuses_every_reference_at_next_request case. Two
grant boxes answer gh api user, min auth logout runs, and both boxes
then fail gh api user while they keep running. min box audit shows a
refusal marked github_sign_in_required for each box. The case signs
the machine out, so it runs only with E2E_BEP_LOGOUT=1, and it runs
after every other live proxy case.
@coderabbitai
coderabbitai Bot commented Oct 24, 2026 •
Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 821bc65f-e6ee-44bc-8413-5a36baccba35

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@minimal-foundry
minimal-foundry Bot commented Oct 24, 2026 •
Copy link
Copy Markdown
Contributor Author

Reviewed: no findings; approval withheld, 1 thread unresolved at 7dee5222a49e.

APPROVE withheld: 1 unresolved thread — minimal-arch[bot] scripts/session-e2e.sh:12026. Resolving the last thread releases the approval on this head.

Resolve the open threads. Resolving the last one releases the approval on this head; no new review is required.

Clobber: none seen.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

minimal-review — advisory review

Verdict COMMENT — 2 findings, 2 inline.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

Comment thread crates/minimal/src/cmd/auth.rs Resolved
Comment thread crates/minimal/src/cmd/auth.rs Resolved
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arch-review: CONDITIONS · 2 conditions · the full ruling

The logout matches §6.10 line 839 in shape. It deletes the item first, refuses every reference through the per-request read, and calls GitHub best effort. Two conditions remain. C2: the delete read-back discards a read error and reports success. Line 839 makes local deletion the enforcement, so an unverified delete must fail. C1: the BEP-044 e2e leg is not_run unless E2E_BEP_LOGOUT=1, and no run is recorded. A not_run is not a pass. The grant endpoint revokes the App for the account on every host, but line 839 calls logout host-wide. A person must decide that question in the escalation.

Ruled at f359768 against gominimal/arch@109541a48c31 by claude-opus-5-5.

Comment thread crates/minimal/src/cmd/auth.rs Resolved
Comment thread crates/minimal/src/cmd/auth.rs Resolved
Comment thread scripts/session-e2e.sh Resolved
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on a failed check suite: the coder changed nothing. Noop. The two failed checks do not come from this pull request. cargo-deny fails on a new RustSec advisory ('Multiple timing variability issues in operations intended to be constant-time') against ecdsa/primeorder/rfc6979, which the tree reaches through russh 0.64.1. This branch does not change Cargo.lock or deny.toml. It changes only crates/minimal/src/cli.rs, crates/minimal/src/cmd/auth.rs, crates/minimal/src/cmd/mod.rs and scripts/session-e2e.sh. ci-success fails only because it aggregates the cargo-deny failure. The fix is a dependency bump or a deny.toml ignore on main, and both files are outside this task's layers. When main has that fix, a merge of main into this branch clears the checks. Not run here: ./scripts/session-e2e.sh bep_logout_refuses_every_reference_at_next_request. It needs a KVM host and a GitHub sign-in, and no code changed this round.

Copy link
Copy Markdown
Member

/revise Fix arch condition C2 and the two minimal-review findings at f359768. The arch escalation on the revocation endpoint (thread 4366102522) is with the owner; do not change the endpoint in this round. C1 (the unrun e2e leg) is held on #2500.

  • Thread 4366102518 (arch C2, crates/minimal/src/cmd/auth.rs:142): the delete read-back drops a read error with .ok().flatten() and the logout reports success. Gatehouse §6.10 line 839 makes local deletion the enforcement, so propagate the Err from metadata() and material() and fail the logout, the way HostKeychain::write does with self.metadata()?. Pin it with a test where the read-back errors.
  • Thread 4366095606 (LOW, correctness, run_logout, auth.rs:248): on Linux the token item is cleared first and the metadata item second; when the second secret-tool clear fails, the token is already gone but the command prints "The GitHub sign-in was not removed, so you are still signed in" and skips the GitHub revoke. Read the token before any delete, delete the metadata item before the token item or treat a half-deleted item as deleted, and make the printed text true for each outcome.
  • Thread 4366095608 (LOW, printed-text, NOT_CONFIRMED, auth.rs:121): the line joins two facts with a semicolon. Give each fact its own sentence (AGENTS.md user-facing text rule): GitHub did not confirm the revocation. The sign-in is removed from this machine. Then the one action: revoke the app in GitHub settings for certainty. Update the test that pins the text.

Keep the cli.rs variant, the mod.rs dispatch lines and the e2e case as they are.


Generated by Claude Code

The host keychain's read-back after a delete now propagates a read
error, so a logout whose deletion cannot be confirmed fails. The
logout reads the token before any delete. On Linux it clears the
metadata item before the token item. When a delete stops after the
token item is gone, the logout still asks GitHub to revoke the token
and says what is left and how to remove it. The not-confirmed line
gives each fact its own sentence and names one action.
@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

minimal-review — approval withheld

Verdict COMMENT — APPROVE withheld: 3 unresolved threads — minimal-foundry[bot] crates/minimal/src/cmd/auth.rs, minimal-arch[bot] crates/minimal/src/cmd/auth.rs, minimal-arch[bot] crates/minimal/src/cmd/auth.rs:308. 1 finding, 1 inline.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

Comment thread crates/minimal/src/cmd/auth.rs Resolved
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arch-review: PASS_WITH_CONDITIONS · 1 condition · the full ruling

The compare makes min auth logout fail closed. A read-back that fails is now an error. On Linux the metadata item goes first, and the redeemer needs that item, so every reference is refused (§6.10 line 839). BEP-044 conforms in code. The live e2e case still reports NOT RUN, and an open leg is not a pass. C1 keeps it open under #2500 until the macOS lane runs it.

Ruled at d543fc1 against gominimal/arch@109541a48c31 by claude-opus-5-5.

Comment thread scripts/session-e2e.sh Resolved
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Revise round 1 ran against ci-success, cargo-deny and left it red; a coder round cannot clear it, a person should look. No round was started for the failed suite on d543fc1740d5.

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 2 of 10 on a /revise note, pushed as d543fc1740d5.

line exit tail
cargo nextest run -p minimal logout_revokes_at_github_best_effort 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-f7e8... Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling paths v0.0.1 (/workbench/crates/paths) Compiling stdlib v0.0.22 (/workbenc
cargo nextest run -p minimal sign_in_after_logout_revives_no_earlier_reference 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-174e... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.
./scripts/session-e2e.sh bep_logout_refuses_every_reference_at_next_request 0 no usable 'min' and 'minimald' pair on PATH or under target/; building the pair this run drives (cargo build --locked -p minimal --bin min -p minimald --bin minimald) built the pair: /work/build-cache/target/debug/min and /work/build-cache/target/debug/minimald ::group::min auth logout: every box's

Verify min task run agent-verify exited 101 under rustc 1.98.1, which the repository does not pin (1.97.0 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.

the sandbox ran rustc (1.98.1), the repository pins 1.97.0 in rust-toolchain.toml; a failure here may be the newer toolchain's, not this change's
Applying loadouts: default
Running task runtime-implement-verify in session task-runtime-implement-verify-39db...
    Checking ot v0.0.1 (/workbench/crates/ot)
    Checking args v0.0.1 (/workbench/crates/args)
    Checking paths v0.0.1 (/workbench/crates/paths)
   Compiling stdlib v0.0.22 (/workbench/crates/stdlib)
   Compiling version v0.8.0 (/workbench/crates/version)
    Checking switch v0.0.1 (/workbench/crates/switch)
    Checking common v0.0.1 (/workbench/crates/common)
   Compiling minvmd v0.8.0 (/workbench/crates/minvmd)
    Checking diagnostics v0.0.1 (/workbench/crates/diagnostics)
    Checking bep v0.0.1 (/workbench/crates/bep)
    Checking async-dialog v0.0.1 (/workbench/crates/async-dialog)
    Checking boxes v0.0.1 (/workbench/crates/boxes)
    Checking sandbox v0.0.1 (/workbench/crates/sandbox)
    Checking mlog v0.0.1 (/workbench/crates/mlog)
    Checking mfile v0.0.1 (/workbench/crates/mfile)
    Checking minimald-rpc v0.0.1 (/workbench/crates/minimald-rpc)
    Checking checkouts v0.0.1 (/workbench/crates/checkouts)
    Checking decode v0.0.1 (/workbench/crates/decode)
    Checking graph v0.0.1 (/workbench/crates/graph)
    Checking lcache v0.0.1 (/workbench/crates/lcache)
error: using `chunks_exact` with a constant chunk size
   --> crates/minimald-rpc/src/trace.rs:199:46
    |
199 |     for (byte, pair) in out.iter_mut().zip(s.chunks_exact(2)) {
    |                                              ^^^^^^^^^^^^^^^
    |
help: consider using `as_chunks::<2>()` instead
   --> crates/minimald-rpc/src/trace.rs:199:46
    |
199 |     for (byte, pair) in out.iter_mut().zip(s.chunks_exact(2)) {
    |                                              ^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#chunks_exact_to_as_chunks
    = note: `-D clippy::chunks-exact-to-as-chunks` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::chunks_exact_to_as_chunks)]`

error: could not compile `minimald-rpc` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

Outside the task's layers::

  • crates/minimal/src/cmd/mod.rs

Converted to a draft: something above needs a person before review.

Review threads the coder judged:

  • 👍 valid — crates/minimal/src/cmd/auth.rs: run_logout reads the token before any delete. Linux now clears the metadata item before the token item. When a failed delete leaves no token, the logout still revokes at GitHub and fails with 'Part of the GitHub sign-in is still in the host keychain. Run min auth logout again to remove it'. When t
  • 👍 valid — PRRT_kwDOPdfcxM6v11ga: NOT_CONFIRMED is now three sentences: GitHub did not confirm the sign-out. The sign-in is removed from this machine. One action: revoke the app at https://github.com/settings/apps/authorizations. The test checks that the text has no semicolon. (not posted on the thread: not an open thread on the pull request)
  • 👍 valid — crates/minimal/src/cmd/auth.rs: The read-back moved to confirm_deleted, which propagates the Err from metadata() and material() with ?. A failed read-back fails the logout with a message to run min auth status. logout_revokes_at_github_best_effort pins this with a refused read-back and with a delete whose read-back errors.
  • 👎 invalid — crates/minimal/src/cmd/auth.rs:308: No change this round. This thread is an escalation, not a defect in the code. A person must decide the grant endpoint against the host-wide scope in section 6.10, and the /revise note holds the endpoint as it is until the owner rules.

After min auth logout, every running box's next GitHub request is refused, because the token item is deleted from the host keychain. A sign-in after the logout is a new instance, so it revives none of the earlier references. The logout now fails when it cannot confirm the deletion. When a delete stops after the token is gone, it still asks GitHub to revoke the token and tells the person to run min auth logout again.

Notes from the agent: This round changes only crates/minimal/src/cmd/auth.rs, as the directive asks. I did not run ./scripts/session-e2e.sh bep_logout_refuses_every_reference_at_next_request. It needs a live GitHub sign-in and a VM, and the directive holds condition C1 on #2500. The e2e case is unchanged. It still matches because the new stderr line starts with "GitHub did not confirm the sign-out." The task's diagnostics line pins the old NOT_CONFIRMED text. The directive replaces that text, so the diagnostics line and the spec must follow. The new text is: "GitHub did not confirm the sign-out. The sign-in is removed from this machine. To be sure GitHub revoked it, revoke the app at https://github.com/settings/apps/authorizations." I did not check that URL against a live GitHub account. This round adds three error texts: NOT_KNOWN (the keychain could not be read after a failed delete, then run min auth status), PARTLY_REMOVED (part of the sign-in is still held, then run min auth logout again), and NOT_REMOVED (the old text, kept). The cargo-deny failure is a RustSEC advisory on the russh dependency tree, and ci-success is the aggregator over it. Both are outside this task's layers. I did not change the revocation endpoint (thread 4366102522). That decision is with the owner, as the directive says.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft October 24, 2026 05:53
@norrietaylor
norrietaylor marked this pull request as ready for review October 24, 2026 06:09
@norrietaylor Claude
Copy link
Copy Markdown
Member

/revise

The owner ruled on the escalation in thread 4366102522 (BEP-044, min auth logout asks GitHub to revoke the sign-in): use the per-token endpoint, not the grant endpoint. Logout is host-wide (section 6.10 line 839): it revokes this host's token and leaves the account's other hosts signed in.

In crates/minimal/src/cmd/auth.rs:

  1. revoke() (line 308): change the URL from {api}/applications/{CLIENT_ID}/grant to {api}/applications/{CLIENT_ID}/token. Keep the method (DELETE), the basic auth (CLIENT_ID and the client secret), the {"access_token": token} body, the 15 s timeout and the 204 No Content success check. The GitHub endpoint is "Delete an app token"; it revokes the token and its refresh token, not the App's grant.
  2. Update the doc comment on revoke(): it asks GitHub to revoke this host's token, which also voids its refresh token; the App's grant for the account stays, so other hosts stay signed in.
  3. Update the two tests that pin the path (lines 948 and 1515) to /applications/{CLIENT_ID}/token, and keep their assertions on method, auth and body.
  4. Keep the NOT_CONFIRMED stderr text as it is: pointing the person at https://github.com/settings/apps/authorizations is still the right manual fallback when GitHub did not confirm.
  5. In the PR body, say in the Proof that revocation is per token (host-wide) and name the ruling.

Do not touch the keychain delete order or the partly deleted handling. One commit, Conventional Commits subject, body lines at most 100 characters.


Generated by Claude Code

Per the owner's ruling, use GitHub's per-token endpoint,
DELETE /applications/{client_id}/token, in place of the grant endpoint.
Logout is host-wide: it revokes this host's token and its refresh token,
and the App's grant stays, so the account's other hosts stay signed in.
The tests now pin the token path.
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arch-review: PASS_WITH_CONDITIONS · 1 condition · the full ruling

The new head changes only the GitHub revocation call. It now revokes this host's token, not the App's grant. Section 6.10 line 839 asks the logout to revoke the sign-in, and it calls logout host-wide, so this change conforms. The rest of the ruling on d543fc1 stands. C1 stays open: the e2e leg is NOT RUN, and #2500 owns its live run.

Ruled at 39c7f6b against gominimal/arch@109541a48c31 by claude-opus-5-5.

Comment thread scripts/session-e2e.sh Resolved
@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

minimal-review — approval withheld

Verdict COMMENT — APPROVE withheld: 2 unresolved threads — minimal-arch[bot] crates/minimal/src/cmd/auth.rs, minimal-arch[bot] scripts/session-e2e.sh:12021. No findings.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Revise round 1 ran against ci-success, cargo-deny and left it red; a coder round cannot clear it, a person should look. No round was started for the failed suite on 39c7f6b0293c.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

minimal-review — approved

Verdict APPROVE — every review thread is resolved; @norrietaylor closed the last one. The review of 39c7f6b0293c withheld this approval on the threads open then. Posted as a comment: the App cannot approve its own pull request; the check and the label carry it.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 24, 2026
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 3 of 10 on a /revise note, pushed as 39c7f6b0293c.

line exit tail
cargo nextest run -p minimal logout_revokes_at_github_best_effort 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-84a5... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling paths v0.0.1 (/workbench/crates/paths) Compiling stdlib v0.0.22 (/workbenc
cargo nextest run -p minimal sign_in_after_logout_revives_no_earlier_reference 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-4c5b... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.
./scripts/session-e2e.sh bep_logout_refuses_every_reference_at_next_request 0 no usable 'min' and 'minimald' pair on PATH or under target/; building the pair this run drives (cargo build --locked -p minimal --bin min -p minimald --bin minimald) built the pair: /work/build-cache/target/debug/min and /work/build-cache/target/debug/minimald ::group::min auth logout: every box's

Verify min task run agent-verify exited 101 under rustc 1.98.1, which the repository does not pin (1.97.0 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.

Checking module-lattice v0.2.3
    Checking lru v0.18.2
    Checking kem v0.3.0
    Checking data-encoding v2.11.1
    Checking sponge-cursor v0.1.0
    Checking compression-core v0.4.33
    Checking size v0.5.0
    Checking sha3 v0.12.0
    Checking compression-codecs v0.4.45
    Checking ml-kem v0.3.2
    Checking ratatui-core v0.1.2
    Checking mlog v0.0.1 (/workbench/crates/mlog)
    Checking op v0.0.1 (/workbench/crates/op)
    Checking heapless v0.9.3
    Checking ssh-key v0.7.0-rc.11
    Checking signal-hook-mio v0.2.5
    Checking generic-array v1.4.4
    Checking derive_more v2.1.1
    Checking russh-cryptovec v0.62.0
    Checking num-bigint v0.5.1
    Checking russh-util v0.52.0
    Checking hex-literal v1.1.0
    Checking constcat v0.6.1
    Checking tagptr v0.2.0
    Checking tinyvec_macros v0.1.1
    Checking managed v0.8.0
    Checking bitflags v1.3.2
    Checking moka v0.12.16
    Checking tinyvec v1.12.0
    Checking smoltcp v0.14.0
    Checking minimald-rpc v0.0.1 (/workbench/crates/minimald-rpc)
    Checking russh v0.64.1
    Checking crossterm v0.29.0
    Checking async-compression v0.4.50
    Checking async-tar v0.6.1
    Checking line-clipping v0.3.8
    Checking getrandom v0.2.17
    Checking object v0.40.0
    Checking is_executable v1.0.6
    Checking ring v0.17.14
    Checking clap_complete v4.6.11
    Checking ratatui-widgets v0.3.2
    Checking orchestrator v0.0.1 (/workbench/crates/orchestrator)
    Checking check v0.0.1 (/workbench/crates/check)
    Checking switch v0.0.1 (/workbench/crates/switch)
    Checking hickory-proto v0.26.3
    Checking pem v4.0.0
    Checking yasna v0.6.0
    Checking sysinfo v0.39.6
   Compiling minvmd v0.8.0 (/workbench/crates/minvmd)
    Checking rcgen v0.14.10
    Checking ratatui-macros v0.7.2
    Checking diagnostics v0.0.1 (/workbench/crates/diagnostics)
    Checking mctx v0.0.1 (/workbench/crates/mctx)
    Checking ratatui-crossterm v0.1.2
    Checking fuzzy-matcher v0.3.7
    Checking hashbrown v0.14.5
    Checking inquire v0.9.4
    Checking dashmap v6.2.1
    Checking ratatui v0.30.2
error: using `chunks_exact` with a constant chunk size
   --> crates/minimald-rpc/src/trace.rs:199:46
    |
199 |     for (byte, pair) in out.iter_mut().zip(s.chunks_exact(2)) {
    |                                              ^^^^^^^^^^^^^^^
    |
help: consider using `as_chunks::<2>()` instead
   --> crates/minimald-rpc/src/trace.rs:199:46
    |
199 |     for (byte, pair) in out.iter_mut().zip(s.chunks_exact(2)) {
    |                                              ^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#chunks_exact_to_as_chunks
    = note: `-D clippy::chunks-exact-to-as-chunks` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::chunks_exact_to_as_chunks)]`

error: could not compile `minimald-rpc` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

Outside the task's layers::

  • crates/minimal/src/cmd/mod.rs

Converted to a draft: something above needs a person before review.

After min auth logout, every running box's next GitHub request is refused, and signing in again revives none of them. Revocation is per token and host-wide: logout asks GitHub to revoke this host's token with DELETE /applications/{client_id}/token, and the account's other hosts stay signed in. This follows the owner's ruling on thread 4366102522.

Notes from the agent: Revise round 3: revoke() now calls the per-token endpoint DELETE /applications/{CLIENT_ID}/token. The method, basic auth, access_token body, 15 s timeout and 204 check did not change. The doc comment and the two fake-GitHub test paths now say token. NOT_CONFIRMED, the keychain delete order and the partly-deleted handling did not change. The PR body is written by the runner: put in the Proof that revocation is per token (host-wide), per the owner's ruling on thread 4366102522. I did not run ./scripts/session-e2e.sh bep_logout_refuses_every_reference_at_next_request because this box has no /dev/kvm. The e2e script did not change this round. Failed checks: cargo-deny fails on a RUSTSEC timing advisory in the ecdsa/primeorder chain under russh 0.64.1. It also warns that RUSTSEC-2026-0009 in deny.toml is not encountered. Both are outside this task's layers and are not caused by this diff. ci-success is the aggregator that reports that failure.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft October 24, 2026 19:20
@norrietaylor
norrietaylor marked this pull request as ready for review October 24, 2026 19:29
@norrietaylor norrietaylor changed the title T21 — Log out: delete the sign-in and refuse every reference to it feat(minimal): log out deletes the sign-in and refuses every reference to it Oct 24, 2026
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arch-review: PASS_WITH_CONDITIONS · 1 condition · the full ruling

The merge from main changes no file of this change. The ruling on 39c7f6b stands. The logout deletes the sign-in, reads the keychain back, and revokes at GitHub best effort, as section 6.10 line 839 requires. C1 stays open: the e2e leg records NOT RUN, and #2500 owns the live run. The change can merge with C1 open.

Ruled at 7dee522 against gominimal/arch@109541a48c31 by claude-opus-5-5.

Comment thread scripts/session-e2e.sh Resolved
@minimal-foundry minimal-foundry Bot removed the review:approved minimal-review approved the current head label Oct 24, 2026
@norrietaylor norrietaylor left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Babysitter approval at 7dee522: every merge gate passes at this head (arch PASS, zero open threads, every lane aggregator green, bot resolutions re-verified). Squash title feat(minimal): log out deletes the sign-in and refuses every reference to it and the squashed message pass commitlint. Queued for squash merge.


Generated by Claude Code

@norrietaylor
norrietaylor added this pull request to the merge queue Oct 24, 2026
Merged via the queue into main with commit 42cf41d Oct 24, 2026
37 checks passed
@norrietaylor
norrietaylor deleted the agent/2278-log-out-delete-the-sign-in-and-refuse-every-refe branch October 24, 2026 22:52
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.

T21 — Log out: delete the sign-in and refuse every reference to it

1 participant

0