Skip to content

laptop keyring stays locked after daemon restart — Secret Service consumers (agy) blocked until manual unlock #10724

Open

Description

@dezren39

Symptom

After the laptop's 2026-11-16 ~05:35–05:39 CT outage and recovery, gnome-keyring-daemon restarted (05:38) outside a desktop login session and stayed locked. agy's login lives in that keyring (Secret Service, go-keyring scheme), so the Antigravity account switch ordered by Drew was blocked at the delete step — "Cannot delete a locked item" — until Drew physically unlocked the keyring at the laptop screen.

Why it should not happen

The keyring normally unlocks via PAM at desktop login. A daemon restart during service recovery bypasses that, leaving every keyring consumer (agy today; anything else using Secret Service) silently unauthenticated until a human goes to the screen. Drew's position: "it should unlock itself."

Scope

  • Make keyring unlock survive daemon/service restarts on the laptop: e.g. tie the daemon to the desktop session so a recovery restart re-unlocks the way login does, or an equivalent mechanism that does not store the keyring password in plaintext.
  • Verify agy (and other Secret Service consumers) can read their items after a daemon restart with no manual unlock.

Acceptance check

Restart gnome-keyring-daemon out-of-session (simulating the recovery path), then confirm agy --print authenticates with no unlock prompt and no manual step.

Refs

Activity

  1. developing-today commented on Nov 16, 2026

    @developing-today
    Contributor
  2. added
    work/assigned
    queue/claimed
    status/in-progress
    on Nov 16, 2026
  3. dezren39 commented on Nov 16, 2026

    @dezren39
    MemberAuthor

    code-j pickup (task 17508): claimed the left-on-ground checker for keyring self-unlock. Issue OPEN, no PRs reference it yet, no held/Drew-owned flags. Plan: inspect current daemon state on laptop, determine fix location, attempt fix + acceptance (out-of-session restart, agy read with no unlock), post proof, close. Run budget ~10 min remaining; will park with resume brief if fix needs more.

  4. added
    queue/parked
    status/parked
    and removed
    status/in-progress
    queue/claimed
    on Nov 16, 2026
  5. dezren39 commented on Nov 16, 2026

    @dezren39
    MemberAuthor

    code-j parked (task 17508, 20min delay): run budget ended, claim parked — not evaporated. Diagnosis recorded in task checkpoints: daemon (PID 29771, up since 05:38 recovery) is dbus-activated, which bypasses PAM login-unlock — that is the root cause shape. Login collection currently unlocked (manual unlock held). Restart-test deliberately deferred: re-running it now would re-lock the live daytime keyring. Resume needs: fix-location call (nix repo vs code repo) + fix implementation + out-of-hours acceptance test.

  6. dezren39 commented on Nov 16, 2026

    @dezren39
    MemberAuthor

    code-f pickup (task 17508): re-claimed the checker. Issue still OPEN, no PRs reference it, no held/Drew-owned flags. Found an orphaned fix draft uncommitted in the laptop primary clone (intent-to-add staged, written ~15:33–15:37Z, no live owner found): nixos/services/keyring-auto-unlock/ (module + stash/unlock scripts + isolated test) with wiring in nixos/hosts/default.nix + nixos/users/user/default.nix. Repo files untouched; live keyring untouched.

    code-f parked (task 17508): verified the draft in isolation (private bus, scratch HOME, scratch kernel key — never touched the live keyring) and found a critical bug: the scripts query D-Bus interface org.freedesktop.secrets.Service / .Collection, but the real interface is org.freedesktop.Secret.Service / org.freedesktop.Secret.Collection (proven against the live daemon introspection — the plural form fails identically there). As drafted the collection resolves empty and the unlocker exits 0 silently forever: the fix would deploy dead. Test harness also needs repair: it never creates ${T}/run (dbus-run-session XDG dir), uses conflicting --start --foreground, and its step-1 assumption is false (fresh daemon + --unlock leaves login Locked=true — the isolated test must simulate PAM: create collection + set default alias). Shellcheck on the scripts is otherwise clean (only benign SC2097/2098 in the test). Resume: (1) fix Secret.* names in both scripts + test, (2) repair harness, prove ALL PASS isolated, (3) commit onto queue/17508-10724-<slug> + PR, (4) nixos-rebuild switch + out-of-hours live acceptance (restart daemon out-of-session, agy reads with no manual unlock — do NOT restart mid-day, it re-locks the live keyring).

  7. added
    queue/claimed
    status/in-progress
    and removed
    status/parked
    queue/parked
    on Nov 16, 2026
  8. 46 remaining items

  9. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · acceptance-proof conditions re-checked overnight, still unmet — task 17508 (lane code-a)

    • Fresh check 2026-11-17T06:54Z (00:54 CST): the graphical session timestamp is still Mon 2026-11-16 05:37:37 CST (no fresh graphical login — the stash step of the acceptance proof has nothing new to capture); load average 38.82 / 38.93 / 31.45 (heavier than the evening checks, fleet builds running); opencode.service active; current system generation unchanged (nixos-system-amd-26.11.20261102.f9887a8, no keyring-auto-unlock units in the live system).
    • Every resume condition from the earlier checkpoints therefore still fails, and the deployment switch remains Drew-gated (no passwordless sudo for nixos-rebuild). Restarting the live keyring daemon under this load, with opencode live and no fresh login to stash from, would re-lock the keyring the proof depends on.
    • Task 17508 re-parks for 1h on the same conditions: fresh graphical login + quiet laptop + the Drew-gated switch reaching the live system. PR feat(nixos): keyring auto-unlock after out-of-session daemon restarts (code#10724) #10829 (the fix) remains merged; laptop keyring stays locked after daemon restart — Secret Service consumers (agy) blocked until manual unlock #10724 stays open for the proof.
  10. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    Agent note — task 17508 re-parked (lane any-t): acceptance-proof conditions re-checked, still unmet

  11. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    Parked — task 17508 (lane code-d): acceptance proof still gated on a fresh graphical login (fresh evidence)

    Re-checked the resume conditions directly this shift (2026-11-17, ~04:10 CST):

    • Stash key absent (the binding condition). The deployed mechanism (keyring-auto-unlock.path active/waiting; service reads the kernel user keyring entry keyring:login-unlock, written by keyring-password-stash at graphical login) has nothing to read: keyctl search @u user keyring:login-unlock → "Required key not available", and keyctl show @u lists no such key. The only graphical session (seat0/tty2) still dates from Mon 2026-11-16 05:37:37 CST (loginctl), which predates the deployed fix — no post-deploy login has occurred, so no stash can exist.
    • Restarting the daemon now would cause the outage, not prove the fix. The auto-unlock script itself, finding no cached password, logs "leaving locked". The running daemon is currently unlocked only because of Drew's manual unlock on 2026-11-16; killing it for the proof would strand Secret Service consumers (agy) locked until the next physical unlock. I did not restart it.
    • Quiet window also unmet: load average 19.4 / 37.1 / 42.0 at check time (fleet builds running).

    Resume condition (unchanged, now with the exact probe): after the next graphical login on the laptop, verify keyctl search @u user keyring:login-unlock succeeds, then restart gnome-keyring-daemon out-of-session and confirm agy --print authenticates with no prompt. Task 17508 is parked with a 7-day term so it stops re-serving every cycle before its condition can be true; the first lane to see the stash key present can run the proof in minutes.

  12. removed their assignment
    on Nov 20, 2026
  13. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Merged work, still open. Every pull request that references this issue has merged (#10829, #10932) and none is open, but the issue kept status:in-review. Tasks that name it as a blocker have been waiting on it.

    status:in-review is removed. Whoever takes this next: run the issue's done check against main. Close the issue if it passes; if not, list what is left here and carry on with it (AGENTS.md, "Finishing work").

    By: Claude, 2026-11-22 flow review.


    Generated by Claude Code

  14. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Agent note · task 17508 parked (lane code-j): acceptance proof still needs a live graphical login

  15. added
    stray-work
    stray/needs-parent
    priority/normal
    on Nov 27, 2026
  16. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Census 2026-11-29 (Felix): full recheck of this issue — details, labels, blockers, priority (rechecked from scratch; prior detail did not exempt it).

    STRENGTHS:

    GAPS FOUND:

    • no priority label
    • no kind label (kind not unambiguous from title/body — left for the picking-up lane to set)
    • no concrete file/module pointers in the body

    FIXES I APPLIED:

    • added priority/normal (sound fix/feature with clear value (default band))

    PICKUP NOTES (added by this census so the next agent can resolve this cold):

    REMAINS: nothing — ready for pickup

  17. added
    kind/bug
    area/infra
    effort/m
    on Nov 29, 2026
  18. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Issue census — 2026-11-29

    Wave-2 residual pass. A parallel census note (Census 2026-11-29 (Felix)) already covers this issue today, and wave 1 of this census audited the head of this group; their verdicts are not duplicated here. This note records only the residual fixes applied after re-verifying the live state (state, body, labels, recent comments) immediately before editing.

    Residual gaps found: no kind/* label (a parallel census note today left it for the picking-up lane; set here from the title/body); no app/*/area/* label although the owning project is clear from the title/body; no effort/* label.

    Actions taken: labels added: kind/bug, area/infra, effort/m.

    Priority: priority/normal retained — matches the work's urgency as evidenced on the issue; no band change in this pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/infraeffort/mkind/bugpriority/normalqueue/parkedstatus/parkedstray-workstray/needs-parentwork/assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions