- Add kernel init bundle helper + verify:init-bundle; tighten release-checklist gates
- Implement cooperative F_GETLK/F_SETLK/F_SETLKW; optional BARE_OS_POSIX_SOCKET_FD_BRIDGE - Add ctx.bareOsGetconfSysconf; extend getconf for _SC_*; awk delete stmt; POSIX heredoc cap - disk.os: replication_snapshot + replication_operator_sketch; blind-relay swarm schema 2 - Protomux operatorMetrics.backpressureEmitCount; warm-cache invalidate on boot/init puts - Bump POSIX profile 1.0.6 and syscalls.json schema 6; sync schemas, handbook, env appendix - Tests + seeder/kernel parity (rsync after coreutils/bare-libs builds)
This commit is contained in:
@@ -20,6 +20,10 @@ Canonical identifiers: `BARE_OS_BOOTER_BOOT_STEPS` in [`packages/bare-os-booter/
|
||||
|
||||
These milestones are recorded for observability (for example under **`booterPhases`** in **`/run/bare-os/boot.json`**) alongside guest/kernel phase traces when enabled.
|
||||
|
||||
## Release verification (stock tree)
|
||||
|
||||
From the repo root, **`npm test`** runs **`pretest`**, which includes **`npm run bundle:kernel`**, **`verify-kernel-seeder-parity`**, **`verify-ctx-api-feature-bits`**, **`verify-compat-matrix`**, and related governance scripts. Maintainers may also run **`npm run release-checklist`** (full workspace tests plus redundant **`verify-init-bundle-recipe`**, ctx API, and compatibility matrix gates). Pear distributors must keep **`kernel/`** and **`packages/bare-os-seeder/kernel/`** byte-identical after edits (**`rsync -a --delete kernel/ packages/bare-os-seeder/kernel/`**).
|
||||
|
||||
## End-to-end boot sequence (host → shell)
|
||||
|
||||
Conceptual ordering from a cold **host** start through an interactive **guest** prompt. Sub-steps inside each box are described in the handbook and booter source; this diagram is a **contract-level** checklist.
|
||||
|
||||
@@ -6,7 +6,7 @@ This document is the **normative contract** for how closely the stock Bare OS ke
|
||||
|
||||
| Constant | Value |
|
||||
| -------- | ----- |
|
||||
| `BARE_OS_POSIX_PROFILE_VERSION` | `1.0.5` |
|
||||
| `BARE_OS_POSIX_PROFILE_VERSION` | `1.0.6` |
|
||||
| `BARE_OS_POSIX_PROFILE_ID` | `bare-os-posix-like` |
|
||||
| `BARE_OS_POSIX_PROFILE_REFERENCE` | Open Group Issue 7 index URL |
|
||||
|
||||
@@ -18,7 +18,7 @@ This document is the **normative contract** for how closely the stock Bare OS ke
|
||||
|
||||
Bare OS does **not** expose a C ABI. The following **observability contracts** stand in for “system calls”:
|
||||
|
||||
- **`/proc/bare_os/syscalls.json`** — Declares **fd model**, **signal model**, **errno hints**, and **operation detail** (schema version in-file). **`ops`** lists invocable **`ctx.bareOsSyscall`** names; **`opsDetail`** also carries **POSIX.1 XSH** logical names (**`open`**, **`close`**, **`read`**, **`write`**, **`readv`**, **`writev`**, **`getsockopt`**, **`setsockopt`**, **`lseek`**, **`pipe`**, **`dup`**, **`dup2`**, **`fcntl`**, **`poll`**, **`select`**, **`umask`**, and **socket family** probes) with **`posixAlignment`** (**`simulated`**, **`partial`**, **`ENOTSUP`**) and **`mapsTo`** for traceability. The **`posixXsh`** object summarizes those XSH names (via **`bareOsPosixXshOpsCsv()`**). **`fcntl`** is implemented as **`ctx.bareOsSyscall('fcntl', { fd, cmd, arg })`** with **`F_GETFL`** / **`F_SETFL`** (Linux-shaped **`O_APPEND`** **`0x400`**, **`O_NONBLOCK`** **`0x800`**); **`F_GETLK`** / **`F_SETLK`** / **`F_SETLKW`** return an **`{ ok: false, code: 'EOPNOTSUPP' }`** object (advisory locks not implemented). Unknown FDs yield **`EBADF`**. **`readv`** / **`writev`** perform bounded scatter/gather on **`BARE_OS_POSIX_FD_SIM`** pipe read/write ends. **`poll`** / **`select`** share the same logical FD readiness probe (**`ctx.bareOsPosixPoll`** / **`posixPoll`** / **`select`** syscall facade) on simulated pipe FDs when **`BARE_OS_POSIX_FD_SIM`** is enabled. **Socket-shaped** syscalls (**`socket`**, **`bind`**, **`listen`**, **`accept`**, **`connect`**, **`send`**, **`recv`**, **`shutdown`**, **`getsockopt`**, **`setsockopt`**) return a documented **`ENOSYS`** / **`ENOTSUP`**-aligned probe (guests use Hyperswarm / **`ctx.bare` TCP/UDP modules instead). The stock booter **caches** this JSON until warm read-cache invalidation. Unsupported operations are listed with **ENOTSUP** / **ENOSYS**-style semantics where applicable.
|
||||
- **`/proc/bare_os/syscalls.json`** — Declares **fd model**, **signal model**, **errno hints**, and **operation detail** (schema **6** in stock builds). **`ops`** lists invocable **`ctx.bareOsSyscall`** names; **`opsDetail`** also carries **POSIX.1 XSH** logical names (**`open`**, **`close`**, **`read`**, **`write`**, **`readv`**, **`writev`**, **`getsockopt`**, **`setsockopt`**, **`lseek`**, **`pipe`**, **`dup`**, **`dup2`**, **`fcntl`**, **`poll`**, **`select`**, **`umask`**, and **socket family** probes) with **`posixAlignment`** (**`simulated`**, **`partial`**, **`ENOTSUP`**) and **`mapsTo`** for traceability. The **`posixXsh`** object summarizes those XSH names (via **`bareOsPosixXshOpsCsv()`**). **`fcntl`** supports **`F_GETFL`** / **`F_SETFL`** (Linux-shaped **`O_APPEND`** **`0x400`**, **`O_NONBLOCK`** **`0x800`**) and **cooperative advisory locks** via **`F_GETLK`** / **`F_SETLK`** / **`F_SETLKW`** using **`args.path`** (absolute) or **`args.fd`** whose logical target is an absolute path; contended locks return **`EAGAIN`** (**`F_SETLKW` does not block**). Unknown FDs yield **`EBADF`**. **`readv`** / **`writev`** perform bounded scatter/gather on **`BARE_OS_POSIX_FD_SIM`** pipe read/write ends. **`poll`** / **`select`** share the same logical FD readiness probe when **`BARE_OS_POSIX_FD_SIM`** is enabled. **Socket-shaped** syscalls default to **`ENOSYS`** / **`ENOTSUP`**; with **`BARE_OS_POSIX_SOCKET_FD_BRIDGE=1`**, **`socket`** + **`connect`** may use **`ctx.bare.bareTcp.Socket`** when merged. The stock booter **caches** this JSON until warm read-cache invalidation.
|
||||
- **`/proc/bare_os/process_table.json`** — **PGID** / **SID**-style fields, **`parentName`** (from **`ppid`**), **signal routing**, and initd binding for the **logical** process table (not host PIDs).
|
||||
|
||||
**Explicit non-goals**
|
||||
|
||||
Reference in New Issue
Block a user