Repository navigation
fix(flatpak): default keyring, withdrawn pairings, launcher lifetime and logs - #98
Merged
Merged
Conversation
…and logs Fixes from the Flatpak's test on a real Snow install (2026-10-26): - secrets: read the default alias and make the default collection when the session has none, as libsecret does; retry once on a stale path. - syncer, hub: probe the secret store before pairing, and withdraw a pairing the device cannot keep (DELETE /sync/device); the hub deletes a device that never made a request. - launcher: end flatpak-spawn once notesd answers, so the window's sandbox can exit; --background logs to notesd.log with one old log. - engine: read a vault path under /home as /var/home when only that exists (the sandbox on Snow). - ADR-0031: the test evidence and the fixes.
…no live log From the cross-review of #98: a failed pairing puts back the token the store held, under a lock with the hub check and the row, and a second frostnotes --background no longer moves a running notesd's log.
…ast a cancelled call From re-review 1 of #98: notesd -log rotates and opens its log only once it holds the data directory's lock, so no launcher can move a live log; restore puts the old token back with a context of its own.
…closes From the Snow retest (T269): godbus closes the signal channel with the connection, and the wait read a nil signal and panicked; a service that crashed during a prompt held sync for ever. The wait now ends with ErrUnavailable on either. ErrDismissed names any prompt, not only an unlock. ADR-0031: the retest's evidence, the locked Default keyring at each login, and this fix.
bketelsen
approved these changes
Oct 26, 2026
This was referenced Oct 27, 2026
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.
Fixes from Duncan's test of the Flatpak (#97, CI run 40389390295) on a real Snow install in an incus VM, 2026-10-26. All 6 ADR-0031 items passed there; this PR fixes the 2 defects and 2 notes the test found, and records the evidence in ADR-0031 (still Proposed, for Brian to accept).
A. Hub join without a
loginkeyring.secrets: set hub/<id>/token: Object does not exist at path "/org/freedesktop/secrets/collection/login".internal/secrets:Setreads thedefaultalias (ReadAlias); with none, or with a stale path, it callsCreateCollectionwith the aliasdefault("Default keyring"), as libsecret does, and retries once.ErrNoKeyringnamesFROSTNOTES_SECRETS=file.internal/syncer:sync.pairwrites and deletes a probe secret before it contacts the hub, so the keyring's prompt comes first and a store that cannot keep a token fails without a pairing.DELETE /sync/device(device token, not throughauthenticated, which would mark it seen): the hub deletes a device that never made a request (204), else 409.sync.pairedwithdraws after any failure once the token is handed out (sameHub,Secrets.Set,PutSyncHub). Lodge forwards any method on device routes (checked in lodge'sgateway/kinds.go).B. The window's sandbox stays alive. The launcher ends
flatpak-spawnwithSIGKILLoncenotesctl helloanswers (it forwards catchable signals to notesd; without--watch-busthe portal keeps notesd).C. Autostart logs to the journal.
frostnotes --backgroundappends to$XDG_STATE_HOME/frostnotes/notesd.log, keeping one old log over 1 MiB.D.
/homepaths on Snow.vaultPathreads/home/...as/var/home/...when/homeis missing and/var/homeexists.Specs:
sync-protocol.md(endpoint, pairing rules),lodge-app.md. Design:app.md(the Flatpak),sync.md(pairing).Checks:
make checkpasses;go test -raceon secrets, hub, syncer, store, engine passes; the smoke test (now through the launcher with a stand-inflatpak-spawn, checking it ends and the log turns over) passes on the host;shellcheckclean. The real portal paths need a re-run of items 3 and 4 on the Snow VM; asked through Odrade.Coder: deepseek/deepseek-flash (code, tests, specs); Irulan (docs, review).