feat(kernel): Wave 9 mega-phase — bits9, protocol 0.5, boot policy v9, Pear/Bare bridge

- Add ninth capability word (bits9), STOCK_V9, FEATURE9_*; bump feature bits doc to 11
- Extend seed RPCs, channel wiring, replication/staging adjuncts; bare_os_proc_index schema 5
- Wave 9 /proc JSON via bare-os-wave9-proc.js + VFS aliases; ctx API 1.18.0 + d.ts hooks
- Boot policy v9 + kernel/init.js enforcement; extensions registry schema 6; strict bits9 caps
- NDJSON lifecycle 8, OTel 6, audit 6; SOCKS proxy map, worker/WASM/env passthrough
- Coreutils openssl stub (bare-crypto doc); mediaproc:* worker group; http-fetch SOCKS lookup
- CI: verify-kernel-roadmap-wave9.mjs, wave3/ctx/dts/compat updates; pretest chain
- Docs: roadmap Wave 9 table, ADR §12, kernel-extensions/capabilities/matrix/protocol/handbook/
  developer-guide (node-to-bare-modules, privacy), kernel README, scripts README, changelogs
- Sync packages/bare-os-seeder/kernel (init.js, README); refresh booter /proc readdir test list
This commit is contained in:
Raven Scott
2026-04-04 05:54:08 -04:00
parent c01ecb29c3
commit fccd07b726
56 changed files with 2362 additions and 452 deletions
@@ -35,9 +35,11 @@ Bare OS advertises optional booter and seed-channel capabilities as a versioned
11. **Eighth capability word (`bits8`, wave 8)****`BARE_OS_KERNEL_FEATURES_STOCK_V8`** and **`BARE_OS_FEATURE8_*`** add the eighth 32-bit word. **Word 7 high bits** remain reserved for future wave-7scoped features; wave 8 uses **`bits8`** for seed RPC wave 8, Wave 8 **`/proc`**, boot policy v8 (**`requireFeatureBits8`**, **`requireBareRuntimeMin`**, **`denySeedRpcMethods`**, **`maxProtomuxChannelNameLength`**), extension registry v5 (**`compatPearBundleId`**), Pear/Bare structured-clone / protomux alias stubs, VFS/shell/git/curl parity, initd/subprocess/resume limits, worker **`ioproc:*`** / sandbox queue / delegate placeholders, HTTP/proxy/DNS/rocksdb proc hints, telemetry NDJSON v7 / OTel v5 / audit v5, and CI **`verify-kernel-roadmap-wave8.mjs`**. Seed JSON and **`/proc/bare_os_features`** include **`bits8`**. **`BARE_OS_SEED_CAP_STRICT`** requires **`bits8`** to cover the stock eighth word when it is non-zero.
12. **Ninth capability word (`bits9`, wave 9)****`BARE_OS_KERNEL_FEATURES_STOCK_V9`** and **`BARE_OS_FEATURE9_*`** add the ninth 32-bit word. **Word 8 high bits** remain reserved for future wave-8scoped features; wave 9 uses **`bits9`** for Holepunch-aligned seed RPC wave 9, Wave 9 **`/proc`** (bare-module, bare-crypto, pear-stage, …), boot policy v9 (**`requireFeatureBits9`**, **`requirePearRuntimeRange`**, **`requireBareCryptoMin`**, **`denyBareModuleSpecifierPatterns`**, …), extension registry schema 6 surface, Pear/Bare bridge **`ctx`** wave 9, worker **`mediaproc:*`**, telemetry NDJSON schema 8 / OTel schema 6 / audit schema 6, and CI **`verify-kernel-roadmap-wave9.mjs`**. Seed JSON and **`/proc/bare_os_features`** include **`bits9`**. **`BARE_OS_SEED_CAP_STRICT`** requires **`bits9`** to cover the stock ninth word when it is non-zero.
**Deprecation (unused bits):** once a bit is published in this ADR and **`kernel-capabilities-index.md`**, its numeric position is **stable**; if a feature is removed from the stock booter, the bit stays reserved (document as “unused / reserved”) until a major governance revision. **`BARE_OS_KERNEL_FEATURE_BITS_DOC`** bumps when semantics or this policy changes.
## Consequences
- Seeder RPC `bare_os.capabilities` must return `protocolPackageVersion`, optional **`booterPackageVersion`**, and `featureBitsDoc` alongside `bits`, `bits2`, `bits3`, **`bits4`**, **`bits5`**, **`bits6`**, **`bits7`**, and **`bits8`** (omit zero words if desired; the stock seeder sends all eight today).
- CI should keep seeder and booter copies of the stock masks aligned (`BARE_OS_KERNEL_FEATURES_STOCK_V1`, **`STOCK_V2`**, **`STOCK_V3`**, **`STOCK_V4`**, **`STOCK_V5`**, **`STOCK_V6`**, **`STOCK_V7`**).
- Seeder RPC `bare_os.capabilities` must return `protocolPackageVersion`, optional **`booterPackageVersion`**, and `featureBitsDoc` alongside `bits`, `bits2`, `bits3`, **`bits4`**, **`bits5`**, **`bits6`**, **`bits7`**, **`bits8`**, and **`bits9`** (omit zero words if desired; the stock seeder sends all nine today).
- CI should keep seeder and booter copies of the stock masks aligned (`BARE_OS_KERNEL_FEATURES_STOCK_V1`, **`STOCK_V2`**, **`STOCK_V3`**, **`STOCK_V4`**, **`STOCK_V5`**, **`STOCK_V6`**, **`STOCK_V7`**, **`STOCK_V8`**, **`STOCK_V9`**).