Skip to content

mounts: an entry's catalog flag, beside the slot's catalog: - #1594

Merged
transfix merged 1 commit into
masterfrom
tfx/shell-catalog-flag
Nov 27, 2026
Merged

transfix merged 1 commit into
masterfrom
tfx/shell-catalog-flag

Conversation

@transfix

Copy link
Copy Markdown
Owner

Follow-up to #1566 (SH1). The decision it left open was whether the shell marks its catalog's documents with catalog: on the mounts: slot or with a per-entry flag. Joe asked for both.

What it does

  • A local file mounted by a mounts: slot runs as local when the slot's catalog: lists it (as before), or when its entry's catalog flag (<slot>.<id>.catalog) is true. Otherwise it runs as file:<its directory>.
  • Neither makes a document from the network local: an http(s) document stays remote:<origin>.
  • Both are written by the slot's own document. A mounted document can't write outside its scope (ARIADNE.md §7.4), so it can't make itself local.
  • The principal is decided as the entry opens. If the flag changes on an open entry and that changes its principal, the entry is opened again as the new principal, its state kept and its init: not run again. If catalog: lists it as well, the principal doesn't change and it keeps running untouched.
  • shell.ari's shell-open sets the flag on what it opens from its catalog, and keeps catalog: { bind: shell.catalog_uris } for the catalog's documents opened any other way.

Docs: ARIADNE.md §6.8 (the entry keys and "Principals and budgets"), ARIADNE_SHELL.md 4.2 (as built) and 4.12.

Verified

On Windows (MSVC 19.44, Release, cvcGL off), at 20f37ff from master daf6367, with TMP set to a short path:

Suite Result
ariadne_runtime_test 380 passed
ariadne_loader_test 282 passed
ariadne_host_test 69 passed
state_exec_async_test 144 passed
state_exec_integration_test 105 passed
ariadne_schema_test 14 passed (shell.ari still valid)
ariadne_deep_nesting_test 19 passed

New tests:

  • AriadneMounts.TheCatalogFlagOrCatalogMakesALocalFileLocal:
    • three entries: one with neither (file:, its budget), one with the flag (local, its budget), and one under a catalog: prefix (local);
    • the flag set on the first: it reopens as local, resumed, its init: run once;
    • the flag cleared on the second: it reopens as file:;
    • the flag set on the third, which catalog: already lists: it keeps the same processes.
  • AriadneMounts.TheCatalogFlagLeavesARemoteDocumentRemote: an https entry with the flag runs as remote:https://apps.example.org.
  • AriadneComponents.ShellOpensItsCatalogOnDemand now also checks that shell-open wrote the flag.

Not run here: the cvcGL build, the tmux shell run and the Linux and macOS lanes; CI covers them.

A local file mounted by a mounts: slot runs as `local` when the slot's catalog: lists it, and now
also when its entry's `catalog` flag (<slot>.<id>.catalog) is true. Neither makes a document from
the network `local`. Both are written by the slot's document: a mounted document cannot write
outside its own scope, so it cannot make itself local.

The principal is decided as the entry opens. A flag that changes on an open entry opens it again
as its new principal, its state kept and its init: not run again, when that changes the
principal; when catalog: lists it as well, it runs on untouched.

shell.ari's shell-open sets the flag on what it opens from its catalog, and keeps catalog: for the
catalog's documents opened any other way.

Tests: AriadneMounts.TheCatalogFlagOrCatalogMakesALocalFileLocal (neither, the flag, catalog:;
set, cleared, and set where catalog: already applies), TheCatalogFlagLeavesARemoteDocumentRemote,
and ShellOpensItsCatalogOnDemand checks the flag shell-open writes. Docs: ARIADNE.md 6.8,
ARIADNE_SHELL.md 4.2 and 4.12.
@transfix
transfix merged commit a519bce into master Nov 27, 2026
30 checks passed
@transfix
transfix deleted the tfx/shell-catalog-flag branch November 27, 2026 22:42
transfix added a commit that referenced this pull request Nov 27, 2026
Conflicts resolved keeping both sides:
- open_mount: #1594's mount_principal(..., slot.catalog), then SH11's block
  recording the principal (a flag change reopens the entry through
  close_mount and open_mount, so the new principal is recorded again).
- shell.ari shell-open: sets the catalog flag on what it opens, as #1594
  does; an entry with a network of its own opens under its slug with its
  flag and network written first, so it opens as local.
- ARIADNE.md 6.8: #1594's paragraph, plus SH11's sentence on what a
  principal reaches. ARIADNE_SHELL.md's SH11 note says so.
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