This commit is contained in:
Raven Scott
2026-04-04 19:08:51 -04:00
parent 92368de550
commit b458c6031d
61 changed files with 4669 additions and 446 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ This document classifies incomplete surfaces as of the kernel hardening pass. It
| `basenc` base16-only messaging | `packages/bare-os-coreutils/src/basenc.js` | Implemented: `--base64` / `--base32` (RFC-style) in addition to `--base16`. |
| `hostid` / `users` “stub” UX | `packages/bare-os-coreutils/src/hostid.js`, `users.js` | Implemented: stable hostid from Ed25519 public key when identity unlocked; `users` documents active session. |
| WARC / archive delegates labeled placeholder | `packages/bare-os-booter/lib/host-delegate-registry.js` | Implemented: `warc-cli.js`, `archive-cli.js` (archive maps to ustar `tar`). |
| hrpc / bundlebee / sidecar / pear-runtime-matrix | `host-delegate-registry.js` + `host-bridge-cli.js` | **Implemented:** basename delegates run probe/status/hint/cap CLIs; **`hrpc request`** uses host-replaced **`ctx.bareOsHrpcRequest`** when **`BARE_OS_HRPC_BRIDGE_WIRED`**; env JSON for allowlist / pear matrix probes; stock **`bareOsHrpcRequest`** remains a marked rejector until host assigns a handler. |
| hrpc / bundlebee / sidecar / pear-runtime-matrix | `host-delegate-registry.js` + `host-bridge-cli.js` | **Implemented:** basename delegates run probe/status/hint/cap CLIs; **`hrpc request`** now uses a functional stock **`ctx.bareOsHrpcRequest`** (validated built-in routes + allowlist) while still permitting host override when **`BARE_OS_HRPC_BRIDGE_WIRED`** is set; env JSON for allowlist / pear matrix probes. |
## P2 — Scripts and documentation
+3 -1
View File
@@ -30,6 +30,7 @@ Bare OS targets **maximal POSIX-like** behavior on the **Bare** runtime with a *
| Path resolution | Partial | Symlinks, modes, personal vs system drive; see `vfs.js` |
| `chmod`, `umask`, ownership display | Partial | `chown`/`chgrp` on personal metadata |
| `mkfifo` | Partial | IPC under `/run/bare-os/ipc/` (see man pages) |
| `mount` / `umount` | Partial | Hyperdrive-backed mounts via HDMS labels under `/mnt` (not host kernel mounts) |
| `sync` / durability | Synthetic | Documented no-op or policy-bound flush |
## Utilities (XCU)
@@ -45,7 +46,7 @@ Bare OS targets **maximal POSIX-like** behavior on the **Bare** runtime with a *
| Area | Status | Notes |
| --- | --- | --- |
| Real host PIDs | N/A | Synthetic table in `/proc`-style JSON |
| `kill` / wait semantics | Partial | Tied to shell and delegates |
| `kill` / wait semantics | Partial | Synthetic `kill` and `ps` target Bare OS virtual pids; tied to shell/runtime delegates |
## Networking (XNS subset)
@@ -58,6 +59,7 @@ Bare OS targets **maximal POSIX-like** behavior on the **Bare** runtime with a *
- Booter + coreutils: `packages/bare-os-booter/test.js`, `packages/bare-os-coreutils` tests.
- Man coverage: `scripts/verify-man-coverage.mjs`.
- Machine-readable syscall / proc snapshot: [posix-conformance-matrix.json](posix-conformance-matrix.json) (kept in sync with `getconf` `BARE_OS_SYSCALL_OPS` via `scripts/verify-compat-matrix.mjs`).
- Dashboard sketch: [conformance-dashboard.md](conformance-dashboard.md).
**Maintenance:** When behavior changes, update this matrix, [environment-and-posix-appendix.md](environment-and-posix-appendix.md), and the relevant man page JSON.
@@ -133,6 +133,10 @@ The list below is one **bullet per variable** in the form **name — component
- **Shell** — Pipelines, **`;`**, **`&&`** / \*\*` — — `**, redirects, quoting, **`$VAR`**, **`$?`**, optional **`${VAR:-word}`** / **`${VAR#prefix}`** when **`BARE*OS_SHELL_PARAM_EXPANSION=1`**, **`jobs`** / **`fg`** / **`wait`**, optional background **`&`** segments, builtins including bounded **`if`**, **`while`**, **`for`**, **`case`** (caps **`BARE_OS_SHELL_LOOP_MAX`**, **`BARE_OS_SHELL_CASE_MAX_BRANCHES`**). Optional bounded **`$(…)`** when **`BARE_OS_SHELL_CMDSUBST=1`**; optional larger pipeline capture via **`BARE_OS_SHELL_STREAMING`** / **`BARE_OS_SHELL_STREAMING_MULT`**. Branching uses **`ctx.exitCode`**. Bounded pipeline capture (**`BARE_OS_PIPELINE*\*`**, **`ctx.bareOsRuntimeCaps`**); optional boot-snippet allowlist (**`BARE_OS_BOOT_ALLOWLIST`** + **`/etc/bare-os/boot.allow`**). No subshells or full POSIX **`sh`\*\*.
- **Ownership** — Display and permission checks use **`UID`/`GID`** and mode bits; **`chown`/`chgrp`** update **`metadata.bareOs`** on the **personal** writable tree (not a multi-user host kernel).
- **Utilities** — Tier-1 JS **`/bin`** (**~113** commands; see [§12.10](package-bare-os-coreutils-and-ci.md#1210-package-bare-os-coreutils)): text tools include **`paste`**, **`split`**, **`tac`**, **`rev`**, **`expand`**, **`unexpand`**, **`fold`**, **`fmt`**, **`comm`**, **`cmp`**, **`join`**, **`pr`**, **`yes`** (line-capped via **`BARE_OS_YES_MAX_LINES`** / **`getconf`**), **`shuf`** (capped via **`BARE_OS_SHUF_MAX_LINES`**), **`tsort`**, **`factor`**, **`expr`** (integer-focused subset), **`numfmt`** (**`--to=iec`** / **`--to=si`**). Checksums: **`md5sum`** (bundled MD5), **`sha1sum`**, **`sha256sum`**, **`sha512sum`** (Web Crypto where available), **`sum`**, **`base32`**, **`basenc`** (**`--base16`**). Files: **`truncate`**, **`unlink`**, **`install`**, **`df`** (synthetic Hyperdrive row; **`-h`** human sizes), **`sync`** (no-op), **`timeout`** (wall-clock cap; exit **124** on timeout when **`BARE_OS_FEATURE_ABORT_TIMEOUT`** is advertised). Session stubs: **`arch`**, **`groups`**, **`hostid`**, **`nproc`**, **`uptime`**, **`users`**, **`who`**. Plus earlier parity: **`man`**, **`sed`** (including **`-z`**, **`BARE_OS_SED_NULL_MAX_RECORDS`**), **`awk`**, **`grep`** (**`-r`** with **`--include`/`--exclude`/`--exclude-dir`**, **`BARE_OS_GREP_FILTER_MAX`**), **`cp`** (**`-u`/`-v`/`-p`**), **`mv`**, **`find`** (**`-regex`**, **`-exec`/`-ok`**, **`BARE_OS_FIND_EXEC_MAX`**), **`mktemp`**, **`git-pear`**, **`cksum`**, **`getconf`** (includes pipeline / cap names + **`-a`**), **`xargs`**, **`dircolors`**, **`theme`**, **`ls`**, **`uniq`**, **`realpath`**, **`base64`**, **`rm`** **`-d`**, **`stat`** **`%F`**. **`dir`** / **`vdir`** call **`ls`**. Large **`sed`/`awk`** are not byte-identical to GNU on all inputs. **`mkfifo`** → **`/run/bare-os/ipc/`**. Online help: **`/share/man/man.json`** and **`man`**.
- **Process tooling note** — **`ps`** and **`kill`** operate on Bare OS synthetic process rows (`pid` 1..3 for kernel/booter/shell); they do not target host OS processes.
- **Additional utility coverage** — **`dd`** (block-copy subset) and **`logger`** (structured append to **`/var/log/messages`**) are available as Tier-1 commands.
- **Mount tooling note** — **`mount`** / **`umount`** are Hyperdrive/HDMS-backed commands for `/mnt/<label>` and are not host-kernel mount syscalls.
- **Process introspection note** — **`procstat`** prints **`/proc/bare_os/process_table.json`** (synthetic process table) for automation/debugging.
**Handbook:** [handbook/09-posix-utilities-shell-and-vfs.md](../../handbook/09-posix-utilities-shell-and-vfs.md) — narrative catalog, engine notes, and Issue 7 alignment. **Manual pages:** [handbook/10-manpages-and-online-help.md](../../handbook/10-manpages-and-online-help.md).
+1 -1
View File
@@ -119,7 +119,7 @@ See also [Kernel subsystem map](../architecture/kernel-subsystems.md) and [ADR 0
**`runBinCommand(ctx, argv)`**
- **Host delegates first** — [`host-delegate-registry.js`](../../packages/bare-os-booter/lib/host-delegate-registry.js) registers **`git`**, **`curl`**, **`wget`**, **`openssl`**, **`ssh-keygen`**, **`tar`**, **`systemctl`** / **`bare-initctl`** / **`journalctl`**, **`warc`**, **`archive`** (ustar front-end), **`hrpc`**, **`bundlebee`**, **`sidecar`**, and **`pear-runtime-matrix`** via [`host-bridge-cli.js`](../../packages/bare-os-booter/lib/host-bridge-cli.js), with **static** imports (Pear-safe). Each delegate checks **`BARE_OS_DELEGATE_ALLOW`**; denied kinds exit **126**. **`curl`** and **`wget`** are Fetch-based subsets (not libcurl / full GNU wget); **`/bin/curl`** and **`/bin/wget`** on the image call **`ctx.bareOsRunCurlCli`** / **`ctx.bareOsRunWgetCli`** when present—see [HTTP: curl and wget](http-curl-and-wget.md). **`/bin/systemctl`** and **`/bin/journalctl`** call **`ctx.bareOsRunSystemctlCli`** when present (same backend as the host delegate). **Host bridge CLIs:** **`hrpc probe`** prints **`bareOsHrpcAllowlistProbe()`** (optional **`BARE_OS_HRPC_ALLOWLIST_JSON`**); **`hrpc request`** calls **`ctx.bareOsHrpcRequest`** when the host assigns a non-stock handler and sets **`BARE_OS_HRPC_BRIDGE_WIRED=1`** (**`bareOsHostCapability('hrpcBridge')`**). **`bundlebee hint`** emits **`bare-os:bundlebee-cli`**; **`bundlebee status`** prints **`BARE_OS_BUNDLEBEE_STAGE_JSON`**. **`sidecar cap <class>`** calls **`bareOsSidecarResourceCap`**. **`pear-runtime-matrix`** prints **`bareOsPearRuntimeMatrixProbe()`** (optional **`BARE_OS_PEAR_RUNTIME_MATRIX_JSON`**). **`BARE_OS_SIDECAR_BRIDGE_WIRED`** / **`BARE_OS_BUNDLEBEE_CLI_WIRED`** are advertised via **`bareOsHostCapability`** for operator probes.
- **Host delegates first** — [`host-delegate-registry.js`](../../packages/bare-os-booter/lib/host-delegate-registry.js) registers **`git`**, **`curl`**, **`wget`**, **`openssl`**, **`ssh-keygen`**, **`tar`**, **`systemctl`** / **`bare-initctl`** / **`journalctl`**, **`warc`**, **`archive`** (ustar front-end), **`hrpc`**, **`bundlebee`**, **`sidecar`**, and **`pear-runtime-matrix`** via [`host-bridge-cli.js`](../../packages/bare-os-booter/lib/host-bridge-cli.js), with **static** imports (Pear-safe). Each delegate checks **`BARE_OS_DELEGATE_ALLOW`**; denied kinds exit **126**. **`curl`** and **`wget`** are Fetch-based subsets (not libcurl / full GNU wget); **`/bin/curl`** and **`/bin/wget`** on the image call **`ctx.bareOsRunCurlCli`** / **`ctx.bareOsRunWgetCli`** when present—see [HTTP: curl and wget](http-curl-and-wget.md). **`/bin/systemctl`** and **`/bin/journalctl`** call **`ctx.bareOsRunSystemctlCli`** when present (same backend as the host delegate). **Host bridge CLIs:** **`hrpc probe`** prints **`bareOsHrpcAllowlistProbe()`** (optional **`BARE_OS_HRPC_ALLOWLIST_JSON`**); **`hrpc request`** always calls **`ctx.bareOsHrpcRequest`** (stock handler supports validated built-in routes such as `kernel.ping`, `kernel.capabilities`, `vfs.readText`; host overrides remain supported and `BARE_OS_HRPC_BRIDGE_WIRED=1` still advertises host bridge capability). **`bundlebee hint`** emits **`bare-os:bundlebee-cli`**; **`bundlebee status`** prints **`BARE_OS_BUNDLEBEE_STAGE_JSON`**. **`sidecar cap <class>`** calls **`bareOsSidecarResourceCap`**. **`pear-runtime-matrix`** prints **`bareOsPearRuntimeMatrixProbe()`** (optional **`BARE_OS_PEAR_RUNTIME_MATRIX_JSON`**). **`BARE_OS_SIDECAR_BRIDGE_WIRED`** / **`BARE_OS_BUNDLEBEE_CLI_WIRED`** are advertised via **`bareOsHostCapability`** for operator probes.
- If **`argv[0]`** is **`git`** (or a POSIX path whose basename is `git`, but not `./git` or `../git`), **delegates** to **`runGitCli`** in [`git-cli.js`](../../packages/bare-os-booter/lib/git-cli.js).
- If **`argv[0]`** is **`curl`** under the same basename rules, **delegates** to **`runCurlCli`** in [`curl-cli.js`](../../packages/bare-os-booter/lib/curl-cli.js).
- If **`argv[0]`** is **`wget`** under the same basename rules, **delegates** to **`runWgetCli`** in [`wget-cli.js`](../../packages/bare-os-booter/lib/wget-cli.js).
@@ -0,0 +1,38 @@
{
"schemaVersion": 1,
"title": "Bare OS POSIX-like conformance snapshot (machine-readable)",
"normativeReference": "IEEE Std 1003.1-2017",
"syntheticProcessModel": true,
"procLogicalPaths": ["/proc/bare_os/process_table.json"],
"bareOsSyscallOps": [
"readFile",
"writeFile",
"readdir",
"mkdir",
"stat",
"unlink",
"chmod",
"chdir",
"getcwd",
"readlink",
"symlink",
"exists",
"lstat",
"rmdir",
"mount",
"umount",
"kill"
],
"utilitiesRecent": [
"dd",
"kill",
"logger",
"mount",
"umount",
"procstat",
"ps",
"iconv",
"ulimit"
],
"notes": "Full matrix prose lives in docs/reference/conformance-matrix.md; this file is CI-checked for drift of syscall op list vs getconf BARE_OS_SYSCALL_OPS."
}