feat(booter): OpenMetrics proc export, protomux wire JSON, audit batch API, and doc sync

Expose /proc/bare_os/metrics.prom (kernel counter OpenMetrics) and
/proc/bare_os/protomux.json (alias registry snapshot). Extend VFS routing,
readdir, pseudo watch, and bare_os_proc_index to schema 8; restore flat
/proc entries for syscalls and process_table with sort order matching
tests. Add ctx.bareOsAuditLogAppendBatch and bump BARE_OS_CTX_API_VERSION
to 1.30.0 with d.ts and compatibility-matrix updates.
Harden swarm peer ban backoff with jitter on the exponential window.
Refresh conformance matrix, environment appendix, booter package doc, and
handbook chapters for proc paths, param expansion V3, vault at rest, and
baretop snapshot keys. Align baretop-snapshot with bareOsReadBareTopSnapshot.
This commit is contained in:
Raven Scott
2026-04-04 19:23:06 -04:00
parent b458c6031d
commit 0d7b27bea8
73 changed files with 4103 additions and 571 deletions
+12 -3
View File
@@ -18,9 +18,9 @@ Bare OS targets **maximal POSIX-like** behavior on the **Bare** runtime with a *
| Area | Status | Notes |
| --- | --- | --- |
| Pipelines, lists, redirects | Partial | See [environment appendix §14a](environment-and-posix-appendix.md#14a-posix-userland-appendix-implemented-vs-gaps) |
| Parameter expansion | Partial | `BARE_OS_SHELL_PARAM_EXPANSION`, `BARE_OS_SHELL_PARAM_EXPANSION_V2` |
| Parameter expansion | Partial | `BARE_OS_SHELL_PARAM_EXPANSION`, `BARE_OS_SHELL_PARAM_EXPANSION_V2`, `BARE_OS_SHELL_PARAM_EXPANSION_V3` (`:${?+}` forms) |
| Command substitution | Partial | Bounded `$(…)` when `BARE_OS_SHELL_CMDSUBST` |
| Job control | Partial | `jobs` / `fg` / `wait`, background `&` |
| Job control | Partial | `jobs` / `fg` / `wait`, background `&`; synthetic `sid` / `pgid` on job rows |
| Full POSIX `sh` grammar | N/A | No subshells; not a standalone POSIX `sh` binary |
## File system / VFS (XBD path + XSH-like ops)
@@ -30,7 +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) |
| `mount` / `umount` | Partial | Hyperdrive-backed mounts via HDMS labels under `/mnt` (not host kernel mounts); optional persist snapshot at `/etc/bare-os/mounts.json` after mount changes |
| `sync` / durability | Synthetic | Documented no-op or policy-bound flush |
## Utilities (XCU)
@@ -55,6 +55,15 @@ Bare OS targets **maximal POSIX-like** behavior on the **Bare** runtime with a *
| Sockets as POSIX BSD | Partial | Delegates / fetch policy where used |
| P2P swarm | Synthetic | Hyperswarm + Protomux; not POSIX sockets |
## Observability (synthetic `/proc`)
| Area | Status | Notes |
| --- | --- | --- |
| Live metrics JSON | Synthetic | `/proc/bare_os/metrics_live.json` (coalesced; `BARE_OS_PROC_POLL_MS`) |
| OpenMetrics text | Synthetic | `/proc/bare_os/metrics.prom``bare_os_kernel_counters{name="…"}` from the in-process counter registry |
| Protomux alias table | Synthetic | `/proc/bare_os/protomux.json` — logical→actual channel map + tail of change log |
| Audit hash chain | Synthetic | `ctx.bareOsAuditLogAppend` / `ctx.bareOsAuditLogAppendBatch` (in-memory chain; optional persistence via host logging) |
## CI and evidence
- Booter + coreutils: `packages/bare-os-booter/test.js`, `packages/bare-os-coreutils` tests.