From cb7ea98f349d539d3606ad4d8cdcca703dd4a280 Mon Sep 17 00:00:00 2001 From: jochen Date: Tue, 24 Nov 2026 21:13:43 +0100 Subject: [PATCH] Design 08 sign-in-page: a session start is heard by file events The user manager sends no change signal for its environment (the property is annotated EmitsChangedSignal false), so DQ-9's trigger could never fire; the kernel's file events on the display sockets are the event that does. --- .../08-milestones/sign-in-page-lead-answers.md | 2 +- 03-DESIGN/01-to-be/08-milestones/sign-in-page.md | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/03-DESIGN/01-to-be/08-milestones/sign-in-page-lead-answers.md b/03-DESIGN/01-to-be/08-milestones/sign-in-page-lead-answers.md index c69dcc78..2bfbeafd 100644 --- a/03-DESIGN/01-to-be/08-milestones/sign-in-page-lead-answers.md +++ b/03-DESIGN/01-to-be/08-milestones/sign-in-page-lead-answers.md @@ -89,7 +89,7 @@ DQ-5 The guard's machine socket answers routes the same as the bus. Principle: o DQ-6 Yes: i3's force input and its answer fields (i3, watcher) are optional fields in node-display-session's definition. Principle: a seat's contract names every field a holder answers. DQ-7 open is class act and each call is written to the log of acts done by hand, with its caller and why, as issue 935 asks. Principle: an act on the person's screen by an agent is read back later (tools-are-how-a-module-is-spoken-to). DQ-8 "No holder" is read from the assignments, never from the bus's no-responders text. Principle: read the owner's state. -DQ-9 The watcher hears the user manager's environment change (org.freedesktop.systemd1.Manager PropertiesChanged on Environment on the person's systemd); the developer proves it with a unit test against a recorded signal and checks it once on the laptop; if the user manager sends no such signal, §15's file event on the X socket folder is the trigger and the design line says so. Principle: events first; evidence over assertion. +~~DQ-9 The watcher hears the user manager's environment change (org.freedesktop.systemd1.Manager PropertiesChanged on Environment on the person's systemd); the developer proves it with a unit test against a recorded signal and checks it once on the laptop; if the user manager sends no such signal, §15's file event on the X socket folder is the trigger and the design line says so. Principle: events first; evidence over assertion.~~ *Corrected (2026-11-24): `org.freedesktop.systemd1.Manager`'s property `Environment` carries the annotation `org.freedesktop.DBus.Property.EmitsChangedSignal` `false` in systemd's interface description (`org.freedesktop.systemd1.Manager.xml`, read by the lead on the laptop), so the user manager sends no `PropertiesChanged` for it. The trigger is the kernel's file events on `/tmp/.X11-unix` and on the session's `RuntimePath`, the environment reread at each for at most 60 s.* DQ-10 Yes: §16's WAYLAND_DISPLAY import applies to a Wayland session's start block only. DQ-11 Yes: correct design 42's citation to §29–§31. DQ-12 Yes: the contracts modules carry the generated packages; holders import them at the zero version (ADR 0573 §2, §4). diff --git a/03-DESIGN/01-to-be/08-milestones/sign-in-page.md b/03-DESIGN/01-to-be/08-milestones/sign-in-page.md index 2e0ab536..dc751cf8 100644 --- a/03-DESIGN/01-to-be/08-milestones/sign-in-page.md +++ b/03-DESIGN/01-to-be/08-milestones/sign-in-page.md @@ -277,14 +277,14 @@ by nothing (DMC-6). `DISPLAY` and `XAUTHORITY` (ADR 0208 §17): that is the X11 start block's import today; a Wayland holder's start block imports `WAYLAND_DISPLAY` (DQ-10). No such session, or no display named there, is no session. It reads no other module's files or code (ADR 0689 Considered Options). -17. **How it hears a session start** (DQ-9). It hears logind's `SessionNew` signal on the system bus. For a session - of its own account of type `x11` or `wayland`, it waits for the user manager's environment to name a display: it - hears the user manager's `PropertiesChanged` for `Environment` on `org.freedesktop.systemd1.Manager`, on the - session bus of §16, and rereads the environment at each, for at most 60 s, a stated constant (R2-7); past that it - writes to its journal that the session's start was not acted on. Then §15's third moment applies. The developer - proves the signal with a unit test against a recorded signal and checks it once on the laptop; if the user manager - sends no such signal, the trigger is the file events of the kernel on `/tmp/.X11-unix` (an X server's socket) and - on the session's `RuntimePath` (a Wayland socket) instead, and this line is corrected to say so. +17. **How it hears a session start** (DQ-9, as corrected). It hears logind's `SessionNew` signal on the system bus. + For a session of its own account of type `x11` or `wayland`, it waits for the user manager's environment to name a + display, rereading it at each file event of the kernel on `/tmp/.X11-unix` (an X server's socket) and on the + session's `RuntimePath` (a Wayland socket), for at most 60 s, a stated constant (R2-7); past that it writes to its + journal that the session's start was not acted on. Then §15's third moment applies. Why file events and not the + user manager's signal: `org.freedesktop.systemd1.Manager`'s property `Environment` is annotated + `org.freedesktop.DBus.Property.EmitsChangedSignal` `false` in systemd's interface description, so the user manager + sends no `PropertiesChanged` for it (read by the lead on the laptop, 2026-11-24). 18. **How it opens the page** (ADR 0689 §1; R2-3). It runs, with the session bus and `XDG_RUNTIME_DIR` of §16 in its environment, `systemd-run --user --collect --quiet --wait -- xdg-open
`, the address as one argument and never through a shell, so the browser runs under the person's user manager in their session and outlives the