From d79c5de9dbf77c06fb2174782093051786be2153 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 1 Nov 2026 15:50:00 -0300 Subject: fs: /sessions, the pardes daemon's registry in every session's tree, as pardes --ps lists it and a record a line, as the daemon says it (daemon ; session tty|gui attached|detached , a shell line for each shell it holds; orphan ): a snapshot frozen at the open as /listeners is, its read the daemon's `list` asked out of the turn as a tape site (`sessions`), so a replica reads the authority's answer; none in a build with no daemon (web, esp32), and `no pardes daemon answers` with none running or one too old to list; README, the reference and Scripting's ls say it; test/daemon.py --manage reads it beside --ps Co-Authored-By: Claude Opus 5.5 --- test/daemon.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/daemon.py b/test/daemon.py index 2c2ee318..954433a9 100644 --- a/test/daemon.py +++ b/test/daemon.py @@ -537,6 +537,14 @@ def manage(binary): for name in ('one', 'two'): assert f'session {name} {sessions[name]} (tty, detached)' in listed, listed assert f'shell {shells[name]}' in listed, listed + # The same, a record a line, in each session's /sessions. + with Client(root / 'pardes-9p-one.sock') as c: + records = c.read('/sessions').decode().splitlines() + assert records[0] == f'daemon {daemon}', records + for name in ('one', 'two'): + at = records.index(f'session {sessions[name]} tty detached {name}') + assert records[at + 1] == f'shell {shells[name]}', records + print('manage: /sessions read over 9P listed the daemon, both sessions and their shells') os.kill(sessions['two'], signal.SIGKILL) wait_for('session two gone', lambda: not alive(sessions['two'])) wait_for('its shell no session\'s', lambda: 'no session holds' in cli('--ps').stdout.decode()) -- cgit v1.3