Skip to content

fix: a Luban system's root is declared and its /xlings upstream is its store (2026.10.22.1) - #831

Merged
Sunrisepeak merged 2 commits into
mainfrom
feat/luban-system-root
Oct 22, 2026
Merged

Sunrisepeak merged 2 commits into
mainfrom
feat/luban-system-root

Conversation

@speak-agent

Copy link
Copy Markdown
Member

In a Luban system (xlings design .agents/docs/2026-10-21-luban-os-ecosystem-usability-design.md §3.7, J5, M1):

  • the compiler's sysroot / is the system's own declared root (ID=luban in /etc/os-release and /usr/lib/xlings-abi), so mcpp self doctor no longer says it belongs to neither the mcpp home nor the project;
  • [xlings] upstream = ["/xlings"] (the editions' /etc/mcpp/config.toml) reads the store the system's root record (/etc/xlings/usr) names when /xlings is not there -- a system made on a host keeps its home at the path of the home that made it.

New module mcpp.luban (a leaf over std) holds both facts; tests/unit/test_luban_root.cpp covers them against fixture trees.

Verified in a Luban KVM machine (Luban Desktop): mcpp self doctor shows neither warning, and a first mcpp new demo && mcpp run takes 4 s, reusing the system's gcc.

Co-authored-by: speak-agent 248744407+speak-agent@users.noreply.github.com

Sunrisepeak and others added 2 commits October 22, 2026 10:04
…s store (2026.10.22.1)

In a Luban system the compiler's sysroot / is the system itself (os-release
ID=luban, /usr/lib/xlings-abi), and [xlings] upstream = ["/xlings"] reads the
home its root record (/etc/xlings/usr) names when /xlings is not there: a
system made on a host keeps its home at the path of the home that made it.
Verified in a Luban KVM machine: mcpp self doctor without the sysroot or
upstream warning, a first mcpp run of a new project in 4 s.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
… (declared_system_root, system_home) -- mcpp names none of xlings' paths

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
Sunrisepeak pushed a commit to openxlings/xlings that referenced this pull request Oct 22, 2026
…er virtio-fs, the bus, observability, xdesk, luban-os-ci; 2026.10.22.1 (#693)

Luban OS ecosystem usability (design `.agents/docs/2026-10-21-luban-os-ecosystem-usability-design.md`), xlings 2026.10.22.1. One commit per checkpoint; with xim-pkgindex#1022, mcpp-community/mcpp#831 and luban-os/luban-os-ci#1.

**xlings in a system**
- K1: recipes are read in a Luban machine (the mount table names the filesystem; Landlock on uncached 9p; worker scratch local); an unset `XDG_DATA_DIRS` keeps its default.
- K2/K4: one place decides where a change goes (`xlings.subos.situation`); a machine's broker carries `sudo xlings install/remove/update` and a user's store addition to the host; a user's own versions need no sudo, `xlings update` says `sudo xlings update`.
- A user's view starts with the system's subos description (its doctor is clean); what xlings sets for a session (prompt facts) passes whatever the policy; an `/etc` file deleted under its mount is left out of a sandbox instead of failing it.

**Machines**
- K6: files over virtio-fs (a virtiofsd a share, `xim:virtiofsd` installed the first time, `--sandbox namespace` then `none`), 9p where it cannot be (no KVM, no daemon); `luban config --files`, said in `luban status`. Measured: `find /usr` 3955 → 359 ms, reading libraries 1041 → 130 ms.
- Commands at once each run to their end; a machine started for commands powers off when the last ends (leases, under one lock); a command whose machine goes away says so; `--user` with a name the system lacks is refused, never root.
- An archive's packages come along again (import read `{active, installed}` entries as versions and skipped all; the export now names each program's package); a sudo install survives `luban upgrade`.
- K14: WSL's `/dev/dxg` probed and said.

**The bus, observability, desktop**
- openbus/XBus: routers, nodes, links across machines (`luban status --bus`), streams and regions, telemetry on every node (§8.3); a frame begun is finished before any other (macOS's small socket buffers).
- The telemetry kit (metrics, flight recorder, logs, spans, Chrome traces); the i18n kit shared by xlings and xdesk.
- K7: frames compressed across a narrow channel (opensal 0.6), damage merged.
- K11/K13: xdesk bookmarks, collapse, minimap, title bars, free-window resize; the tour; every layout, window and interaction drivable headless and covered (`test_xdesk_interaction`).

**CI and checks**
- P2's xlings side: package checks `run`, `launcher`, `gui`, `sound`.
- K15: the release candidate is dispatched to luban-os-ci's L2 when `LUBAN_OS_CI_TOKEN` is there; luban-os-ci's first local runs found the bugs above.
- Recorded for later (design §15): K5 (`--store own`), J32 (a machine's new users cannot own their homes), J33 (a user view's install is active for everyone).

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
@speak-agent

Copy link
Copy Markdown
Member Author

The one red check, macos-e2e / e2e suite 2/2 (xcode-27), is 230_bench_harness.sh's cold-vs-noop invariant, three runs in a row: cold 2.81-2.99 s against noop 1.50-1.62 s, under its 2x floor. The bench's McppEngine::clean() removes only the project's target/ (the cross-project build cache stays), and on this virtual M1 a no-op build costs ~1.6 s of process start; main at 0e79128 passed the same leg with cold ~3.9 s, close to the same edge. Nothing in this PR is on the build path: declared_system_root is read by self doctor and system_home only for an [xlings] upstream = ["/xlings"] that is missing. The suite passes on Linux locally (MCPP=<built> bash tests/e2e/230_bench_harness.sh). Merged past it; the invariant's fragility on slow macOS runners is worth its own look (a cold that also clears the std/dependency cache, or a floor relative to startup).

Co-authored-by: speak-agent 248744407+speak-agent@users.noreply.github.com

@Sunrisepeak
Sunrisepeak merged commit 4c80028 into main Oct 22, 2026
200 of 204 checks passed
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.

2 participants