Skip to content

Ariadne shell SH0: scope on (ps) rows, the ariadne.apps mirror, processes.ari - #1499

Merged
transfix merged 3 commits into
masterfrom
tfx/shell-sh0-processes-1d4059
Nov 24, 2026
Merged

transfix merged 3 commits into
masterfrom
tfx/shell-sh0-processes-1d4059

Conversation

@transfix

Copy link
Copy Markdown
Owner

Phase SH0 of the Ariadne shell design (docs/roadmap/ARIADNE_SHELL.md 4.9, 4.10 and section 5): the first step toward a Processes window that shows which application each running DSL process belongs to. It works with today's static load: mounts and the §5.25 applications; nothing of mounts: or shell.ari is here.

What changes

scope on (ps) and (inspect) rows. A process's chroot relative to its owner's root:

  • execute_options::owner_root and process::owner_root (new) hold the owner's root. process_scope(root_path, owner_root) (scheduler_base.h) writes process_info::scope: "" when the two are the same, the rest of the path under it, the whole chroot after a / when it is outside, and the chroot itself with no owner root. A plain host gives neither, so its rows' scope is "".
  • Both schedulers fill it in make_info; fork and spawn copy the owner root (and, as before, the chroot), so a child has its parent's scope.
  • exec_coordinator's process rows carry scope (for the threaded plan's published rows, S2-Q9), state_value_codec carries owner_root (written only when set), and pycvc's execute_options, process and process_info have the new fields.
  • The Ariadne Runtime (own_scope in ariadne.cpp) gives every process it starts (actions, residents, start_process) its context's chroot as root_path and the document's prefix as owner_root. So a document's own programs are "", a mount's includes.<as>, a repeated mount's includes.<as>.<i>.
  • Side effect: until now the Runtime's processes had an empty process::root_path (the chroot lived only in the intrinsics context), so an action's async calls posted their progress at <name>.progress from the tree's root rather than under the program's chroot, unlike what STATE_EXEC_EXCEPTIONS.md 3.10 says. With the chroot recorded they post under it.

The ariadne.apps mirror. Runtime::Impl::mirror_apps writes every §5.25 application (frame_apps, with quit_apps for running) under the outermost document's prefix, as the feed mirrors itself to notify.*: ariadne.apps.<key>.{name, scope, running}. Only changes are written; an application gone from the tree is taken out; Quit, reopening and Restart update running at once. The key is the scope without its includes segments, joined by _ (fe_lab, a repeated mount's cam_0, a nested a_b), numbered if two collide. front, asked and grants come in later phases.
The document's own meta.name is mirrored to ariadne.name: the loader now sets the root widget's app_name to meta.name (a mount's wrapper already carried its document's), and the Runtime writes it. The design names the document's own rows by meta.name but did not say how a view gets it; this is the new key for that.

components/processes.ari. A Processes window: application (the row's scope looked up in ariadne.apps, the deepest application holding it; the document's own rows by ariadne.name), pid, name, status, steps, what it waits on, memory, and a Kill button per row. Like the other shipped components (ARIADNE.md §6.5), a document imports it, includes the window, and calls (processes-step ROWS) from its on_tick:, which polls (ps) and (inspect) at most every ROWS.every seconds (0.5) into its own state, at most ROWS.max rows (50), the rest counted in ROWS.more. (processes-kill ROWS I) is the Kill button. Listed in INDEX.ari and ARIADNE.md §6.5.

Tests

  • state_exec_integration_test: E2EIntrinsicsTest.ProcessRowsCarryTheirScope (plain host "", own, mount, outside, no owner root, a forked child, process_info).
  • ariadne_runtime_test: AriadneRuntime.ProcessRowsSayWhoseTheyAre (a mount's resident, its action and the child it spawns as includes.fe_lab; the document's resident and an action as "", through (ps), (inspect) and list_processes), AriadneRuntime.TheApplicationsAreMirroredUnderTheDocumentsPrefix (the mirror through Quit, reopening and Restart, a repeated mount, an application taken out, ariadne.name), AriadneComponents.ProcessesListsByApplicationAndKillsARow (the component's rows by application, and Kill on the mount's sleeping action leaves the rest running).
  • ari test src/ari/tests/processes_component.ari (ctest ari_processes_component, loads tests/processes_app.ari): the mirror, (ps) scopes, rows named by application, the row cap. Kill is not in it: the Runtime reports a killed program as a warning, which ari test counts as a failure.
  • AriadneComponents.ShippedComponentsLoadClean covers the new component.

Docs: ARIADNE.md §5.25 (the mirror, whose a process is) and §6.5, STATE_EXEC_DEVELOPER_GUIDE.md ("Whose a process is"), and an "As built in SH0" note in the shell design's 4.10.

…sses.ari

Phase SH0 of docs/roadmap/ARIADNE_SHELL.md (4.9, 4.10): the first step toward a Processes window
that shows which application each running DSL process belongs to.

- execute_options::owner_root and process::owner_root hold the owner's root; process_scope
  writes process_info::scope from it and the chroot, "" for a plain host's processes. (ps) and
  (inspect) rows carry it, both schedulers fill it, spawn and fork copy the owner root, the
  coordinator's process rows and state_value_codec carry it, and pycvc has the new fields.
- The Runtime gives every process it starts its context's chroot and the document's prefix, so
  a document's own programs are "" and a mount's includes.<as>. Its actions' async progress now
  posts under their chroot, as STATE_EXEC_EXCEPTIONS.md 3.10 says.
- mirror_apps writes the 5.25 applications to ariadne.apps.<key>.{name, scope, running} under
  the document's prefix, following Quit, reopening and Restart, and the document's meta.name to
  ariadne.name (the loader sets the root widget's app_name).
- components/processes.ari: a window with the document's processes by application, pid, name,
  status, steps, what each waits on, memory and a Kill button; (processes-step ROWS) from
  on_tick polls (ps) twice a second with a row cap. Listed in INDEX.ari and ARIADNE.md 6.5.

Tests: ProcessRowsCarryTheirScope (state_exec), ProcessRowsSayWhoseTheyAre,
TheApplicationsAreMirroredUnderTheDocumentsPrefix and ProcessesListsByApplicationAndKillsARow
(ariadne_runtime_test), and ari test src/ari/tests/processes_component.ari
(ari_processes_component).
INDEX.ari keeps master's http_cache entry and adds processes after it. The
runtime tests keep master's AMountsNameNamesEachInstancesApplication beside
SH0's two tests, which git had interleaved. The mirror test checks that a
loader's name: (#1485) names an ariadne.apps entry, and ARIADNE.md says so.
No conflicts. S2a's exec_group passes a caller's execute_options through,
owner_root with them, and Ariadne's submissions still set it in own_scope.
@transfix
transfix enabled auto-merge (squash) November 23, 2026 20:18
@transfix
transfix merged commit 63f9de1 into master Nov 24, 2026
31 checks passed
@transfix
transfix deleted the tfx/shell-sh0-processes-1d4059 branch November 24, 2026 02:04
transfix added a commit that referenced this pull request Nov 24, 2026
… ...) into p9/volume-grid-segment

#1464 checks every load against the closed schema, which already takes a
color picker's fmt: rgb | hex. ColorWidgetFmtHexDrawsTheHexPicker counted
every warning of its fmt: hsv load; it now counts the loader's own, as
#1464's loader tests do, and checks that the schema flags that fmt where
it is when the validator is built in.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant