Skip to content

Commit d4d58fa

Browse files
committed
design: state the inheritance rule in full, not only the case that surprises
The previous wording named the layer a declared subos drops and not the two rows where inheritance is what an author would expect. A project that pins a few tools and declares no subos starts from the global workspace, which is the common shape; a named subos inherits its own environment's workspace instead, because carrying the host's pins into a different installed set would name versions that are not there; and a fork copies its base's map once at creation. Also records that nothing falls back silently: with no layer naming a tool the shim diagnoses rather than choosing, which is the line the 2026.9.2.1 sandbox verification measured.
1 parent 158bfc3 commit d4d58fa

1 file changed

Lines changed: 25 additions & 4 deletions

File tree

.agents/docs/2026-09-03-xlings-workspace-as-the-one-table.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -455,10 +455,31 @@ The project file's `workspace` object is read into `projectWorkspace_`
455455
| `Anonymous` (project file, no `subos`) | global, then project manifest, then the project subos |
456456
| no project config | global only |
457457
458-
**A named subos drops the global workspace entirely.** A project that declares
459-
`[xlings] subos` therefore loses the machine's global pins for every tool it
460-
does not pin itself, and nothing in mcpp says so today. That is a property of
461-
`subos`, not of this proposal, and it belongs in `docs/17`.
458+
**Pinning a few and inheriting the rest is what the Anonymous row does.** A
459+
project that writes `[xlings.workspace]` and no `subos` starts from the global
460+
workspace and merges its own entries on top, so every tool it does not name
461+
keeps the machine's version. This is the common shape for an mcpp project and
462+
it works as an author would expect.
463+
464+
**A named subos does not inherit the global layer, and that is deliberate
465+
rather than an omission.** A named SubOS is a different environment with its
466+
own installed set; carrying the host's pins into it would name versions that
467+
environment does not have. Its own `workspace` — stored in
468+
`<subos>/.xlings.json` and merged as the last layer — is what it inherits from
469+
instead. A SubOS created with `xlings subos new <name> --from <base>` receives
470+
the base's workspace map by copy at creation (`src/core/subos.cpp:978`); that
471+
is a one-time inheritance, not a live link.
472+
473+
**Nothing falls back silently when no layer names a tool.** The shim reads
474+
`Config::effective_workspace()` and, finding no active version, produces a
475+
diagnostic rather than choosing one (`src/core/xvm/shim.cpp:408-460`:
476+
`xvm.no_active_version`, or the "installed in this subos, but no version is
477+
active" form). The `qemu-aarch64-static is not installed in this subos (_)`
478+
line measured during the 2026.9.2.1 verification is that path.
479+
480+
What mcpp does not state today is the first two paragraphs: that declaring
481+
`[xlings] subos` changes which pins apply, and that the environment's own
482+
workspace replaces the global one. That belongs in `docs/17`.
462483
463484
**A `workspace` entry installs nothing.** No install path reads it. This
464485
answers Q1: xlings does not provision from `workspace`, which is why section 4

0 commit comments

Comments
 (0)