- 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:
Raven Scott
2026-04-05 00:14:02 -04:00
parent cc312c9ea1
commit fba44e5659
48 changed files with 1195 additions and 520 deletions
+2 -2
View File
@@ -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**