Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Docs are split by the question they answer:
- [0060 — Publish omarchy-apps through the apt-publisher](adr/0060-publish-omarchy-apps-through-the-apt-publisher.md)
- [0061 — Add the image APT component on the first publication run](adr/0061-add-the-image-apt-component-on-the-first-publication-run.md)
- [0062 — Make each desktop suite app a standalone Flatpak, with lodge as an opt-in mode](adr/0062-make-desktop-suite-apps-standalone-flatpaks-with-opt-in-lodge.md)
- [0063 — Uphold notesd's service as well as its socket](adr/0063-uphold-notesds-service-as-well-as-its-socket.md)

### Design

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ packages.
[flatpak-index#2](https://github.com/frostyard/flatpak-index/issues/2)
- Amended in part by: [ADR-0062](0062-make-desktop-suite-apps-standalone-flatpaks-with-opt-in-lodge.md)
(the desktop side: each app is a standalone Flatpak with its daemon)
- Amended in part by: [ADR-0063](0063-uphold-notesds-service-as-well-as-its-socket.md)
(the `notesd` row: its service is upheld too)
- Supersedes in part: frostmail
[ADR-0013](https://github.com/frostyard/frostmail/blob/main/docs/adr/0013-app-as-a-local-flatpak.md)
(the release build and install of the app)
63 changes: 63 additions & 0 deletions docs/adr/0063-uphold-notesds-service-as-well-as-its-socket.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# 0063 — Uphold notesd's service as well as its socket

- **Status:** Accepted (2026-10-27)
- **Date:** 2026-10-27

## Context

[ADR-0058](0058-ship-suite-desktop-apps-as-flatpaks-and-services-as-sysexts.md)
gives `notesd` only `frostnotes-lodge.socket` in its `Upholds=` table. Its
own rule says the service is upheld too when the daemon works without a
client.

notesd at `v0.1.0` works without a client. It watches each vault with
fsnotify and a 5-minute rescan, and it prunes versions at start and every
24 h
([frostnotes `internal/vault/watch.go`](https://github.com/frostyard/frostnotes/blob/v0.1.0/internal/vault/watch.go),
[`internal/vault/manager.go`](https://github.com/frostyard/frostnotes/blob/v0.1.0/internal/vault/manager.go)).
`frostnotes.service` has no `Condition*=`, reads nothing in `/etc`, and has
`Requires=` and `After=` on the socket.

With only the socket upheld, notesd starts on the first connection. lodge
polls each app's socket every 15 s
([lodge `internal/apps/apps.go`](https://github.com/frostyard/lodge/blob/v0.1.0/internal/apps/apps.go),
`PollEvery`). So, with no other client, notesd starts at lodge's first
poll, and not from boot: socket activation does not run the vault work
until a connection comes. No suite daemon exits when idle.

## Decision

The `notesd` sysext upholds `frostnotes-lodge.socket` and
`frostnotes.service`, in the drop-in `multi-user.target.d/10-notesd.conf`,
and its preset `40-notesd.preset` enables both.

This row replaces ADR-0058's `notesd` row. The other rows and rules of
ADR-0058 do not change.

## Consequences

- The vault work runs from boot, whether lodge runs or not.
- notesd runs on a host where lodge's sysext is disabled.
- If notesd exits, also with status 0, `Upholds=` starts it again. Its unit
has `Restart=on-failure`, which does not cover a clean exit. To stop it
for longer, an administrator disables the feature or masks the unit, as
ADR-0058 says.
- Snosi's `sysext-upholds-guard` checks the service, and passes it: the
unit has no condition.
- The `v0.1.0` `.deb` fits: no frostnotes release is needed.

## Alternatives considered

- **Socket only, as ADR-0058's row has it:** rejected. The vault work then
does not run from boot: it waits for a first connection, which, with no
other client, is lodge's poll. One sysext's housekeeping should not wait
for another sysext.

## References

- Amends in part:
[ADR-0058](0058-ship-suite-desktop-apps-as-flatpaks-and-services-as-sysexts.md)
(the `notesd` row of the `Upholds=` table)
- Shapes: [Plan 0010](../plans/0010-suite-packaging.md) (Phase 3)
- Snosi's [design/sysexts.md](https://github.com/frostyard/snosi/blob/main/docs/design/sysexts.md)
(Service Activation Pattern)
Loading
Loading