Add fifth feature word (STOCK_V5 / bits5) with ADR and capability docs.

Protocol: canonical seed RPC registry (seed-rpc-methods.js), bits5 on
capabilities, typed seed RPC errors, richer replication_queue and
staging_slot hints.

Booter: /proc host_os (bare-module on Bare, node:os on Node), sync_window,
debug.json, net_summary transport stats, HDMS hints/correlation, warm
profile reload, subprocess bridge snapshot helpers, boot policy v5 hooks,
BARE_OS_BIN_WORKER_ALLOW pattern groups, VFS symlink/union alignment, OTel
JSONL schema version 2 in var-log.

Seeder: pass staging/replication hints into seed channel; mirror kernel
init and boot policy example.

Kernel: enforce requireFeatureBits5 / requireInitJsSha256 when configured;
selftests for new proc surfaces.

CI/pretest: verify-doc-links, verify-man-coverage, verify-compat-matrix;
extend roadmap/ctx/dts verifiers. Add otel-bare-os-jsonl schema.

Docs: Wave 5 roadmap, kernel-extensions, handbook/devguide updates;
bare-module manifest tier/risk sample; bare-libs README.
This commit is contained in:
Raven Scott
2026-04-04 04:33:25 -04:00
parent f8a0dad897
commit 268b46dd3a
60 changed files with 1607 additions and 499 deletions
+7 -1
View File
@@ -26,6 +26,10 @@ Re-exports from `./constants.js`: `PROTOCOL_NAME`, `TOPIC_STRING`, `BLOCK_SIZE`,
Re-exports from `./lib/channel.js`: `setupSeedChannel`.
Re-exports from `./lib/seed-rpc-methods.js`: `BARE_OS_SEED_RPC_METHODS`, `BARE_OS_SEED_RPC_METHOD_SHORT_NAMES`, `BARE_OS_SEED_RPC_METHOD_SHORT_NAME_SET`.
Re-exports **`STOCK_V5`** and **`BARE_OS_FEATURE5_*`** from `./lib/kernel-feature-bits.js` (alongside earlier stock words).
### 10.3 [packages/bare-os-protocol/constants.js](../../packages/bare-os-protocol/constants.js)
| Export | Definition |
@@ -59,7 +63,7 @@ Re-exports from `./lib/channel.js`: `setupSeedChannel`.
- **Message 2**: `c.buffer` — after `chan.open()`, sends 250-byte bitfield with bit 0 set (capability gossip stub; see **`kernel-feature-bits.js`**).
- **Message 3**: search request (`msgSearchReqEncoding`) → **message 4** returns paths from the staged manifest whose lowercase path contains the query (trimmed); empty query returns a capped prefix of all manifest paths. **`setupSeedChannel(..., { manifestPaths, searchMaxMatches })`** supplies the list (seeder collects paths during **`stageKernelTree`**).
- **Message 4**: search response encoding.
- **Message 5**: RPC request → **message 6** implements **`bare_os.version`**, **`bare_os.health`**, **`bare_os.kernel_info`**, **`bare_os.capabilities`** (feature bitfield JSON), **`bare_os.gossip`** (manifest count + timestamp); other modules/methods get **`success: false`** and error **`RPC not implemented on seeder`**.
- **Message 5**: RPC request → **message 6** implements registered **`bare_os.*`** methods (see **`lib/seed-rpc-methods.js`**); **`bare_os.capabilities`** returns **`bits`****`bits5`** plus **`protocolPackageVersion`**. Wrong module / missing module → **`bare_os.rpc_wrong_module`** / **`bare_os.rpc_missing_module`**; unknown method **`bare_os.rpc_unknown_method`**. Internal fallthrough → **`bare_os.rpc_internal_unreachable`**.
- **Message 6**: RPC response encoding.
- Calls `replicateDrive(mux.stream)` (typically `drive.replicate(stream)`).
@@ -73,4 +77,6 @@ Brittle tests:
4. `msgDataEncoding` encode/decode.
5. `msgSearchReqEncoding` encode/decode.
6. `TOPIC_STRING === 'bare-os-v1'`.
7. Seed RPC method list length matches **`BARE_OS_SEED_RPC_METHODS`** / **`kernel_info`** surface.
8. **`BARE_OS_KERNEL_FEATURES_STOCK_V5`** is non-zero.