feat(kernel): Wave 6 mega-phase — bits6, protocol, booter, docs, CI
- Add sixth capability word (bits6), STOCK_V6, FEATURE6_* in bare-os-protocol; seed caps, channel.js, seed-rpc-methods registry, replication/handshake fields - Booter: Wave 6 /proc JSON surfaces, ctx 1.15.0, Pear/DHT hooks, subprocess snapshot v3, audit v3, extension registry v3 edges, hrpc stub, worker/sandbox - Kernel: boot.policy v6 enforcement (requireFeatureBits6, booter semver, ctx min, extension deny/hash pins, offline LKG strict); example policy + seeder kernel sync - Schemas: boot.policy v6, OTel JSONL v3 + example; validate-example-schemas pairs - CI: verify-kernel-roadmap-wave6 (100 rows), verify-pear-no-static-node-import, extend wave3/compat-matrix/ctx verifiers; pretest wiring - Docs: ADR 001 v6, kernel-capabilities-index Word 6, kernel-extensions, feature-roadmap Wave 6 table, compatibility matrix, handbook ch.11, developer-guide (privacy, bare-boot alignment, bare-fetch), http-curl, scripts/README, DOCUMENTATION - Tests: booter /proc readdir expectations for new bare_os_* nodes
This commit is contained in:
@@ -4,15 +4,15 @@ Single place to compare **protocol**, **booter `ctx` API**, **feature-bit docume
|
||||
|
||||
| Artifact | Location | Current (stock) |
|
||||
| --- | --- | --- |
|
||||
| **`bareOsCtxApiVersion`** | [`packages/bare-os-booter/lib/bare-os-ctx-api.js`](../../packages/bare-os-booter/lib/bare-os-ctx-api.js) | `1.14.0` |
|
||||
| **`BARE_OS_KERNEL_FEATURE_BITS_DOC`** | [`packages/bare-os-protocol/lib/kernel-feature-bits.js`](../../packages/bare-os-protocol/lib/kernel-feature-bits.js) | `7` |
|
||||
| **Capability words** | `bare_os.capabilities` RPC + `/proc/bare_os_features` | `bits`, `bits2`, `bits3`, **`bits4`**, **`bits5`** |
|
||||
| **Lifecycle / telemetry NDJSON** | `BARE_OS_LIFECYCLE_SCHEMA_VERSION` in [`bare-os-lifecycle-schema.js`](../../packages/bare-os-booter/lib/bare-os-lifecycle-schema.js) | `4` |
|
||||
| **`bareOsCtxApiVersion`** | [`packages/bare-os-booter/lib/bare-os-ctx-api.js`](../../packages/bare-os-booter/lib/bare-os-ctx-api.js) | `1.15.0` |
|
||||
| **`BARE_OS_KERNEL_FEATURE_BITS_DOC`** | [`packages/bare-os-protocol/lib/kernel-feature-bits.js`](../../packages/bare-os-protocol/lib/kernel-feature-bits.js) | `8` |
|
||||
| **Capability words** | `bare_os.capabilities` RPC + `/proc/bare_os_features` | `bits`, `bits2`, `bits3`, **`bits4`**, **`bits5`**, **`bits6`** |
|
||||
| **Lifecycle / telemetry NDJSON** | `BARE_OS_LIFECYCLE_SCHEMA_VERSION` in [`bare-os-lifecycle-schema.js`](../../packages/bare-os-booter/lib/bare-os-lifecycle-schema.js) | `5` |
|
||||
| **Protocol package** | [`bare-os-protocol` `package.json`](../../packages/bare-os-protocol/package.json) | see workspace version |
|
||||
|
||||
## Peer assumptions
|
||||
|
||||
- **Seeder** must answer **`bare_os.capabilities`** with **`bits4`** / **`bits5`** when using a current **`bare-os-protocol`** build; older seeders omit newer words (zeros) — use **`BARE_OS_SEED_CAP_STRICT`** only when peers are upgraded.
|
||||
- **Seeder** must answer **`bare_os.capabilities`** with **`bits4`** / **`bits5`** / **`bits6`** when using a current **`bare-os-protocol`** build; older seeders omit newer words (zeros) — use **`BARE_OS_SEED_CAP_STRICT`** only when peers are upgraded.
|
||||
- **Offline LKG** booters skip the swarm peer wait when **`BARE_OS_OFFLINE_LKG_BOOT=1`** and **`BARE_OS_LKG_SYSTEM_KEY_HEX`** is set; the system drive must already contain **`/boot/init.js`** in Corestore.
|
||||
|
||||
## See also
|
||||
|
||||
@@ -43,7 +43,7 @@ Former **DOCUMENTATION.md** §14, §14a. [Reference index →](README.md)
|
||||
| `BARE_OS_SANDBOX_WORKER` | Booter | When **`1`**, defers **`bareOsSandboxRunScript`** on a **fresh microtask** (async boundary); **not** a separate thread or isolate. |
|
||||
| `BARE_OS_INITD_MAX_PARALLEL` | bare-initd | Max concurrent unit **starts** per DAG level (integer ≥ **1**; default **1**). |
|
||||
| `BARE_OS_INITD_JOURNAL_MAX_LINES` | bare-initd / unit journals | Cap lines retained per unit NDJSON journal under **`/run/bare-os/unit-journal/`**. |
|
||||
| `BARE_OS_TELEMETRY_NDJSON` | Booter | Absolute or **`~/…`** path in the **guest VFS**: append capped NDJSON telemetry records (**`telemetrySchemaVersion` / `lifecycleSchemaVersion`**: **4** (stock), **`ts`**, …) mirroring structured boot/kernel events. |
|
||||
| `BARE_OS_TELEMETRY_NDJSON` | Booter | Absolute or **`~/…`** path in the **guest VFS**: append capped NDJSON telemetry records (**`telemetrySchemaVersion` / `lifecycleSchemaVersion`**: **5** (stock Wave 6+), **`ts`**, …) mirroring structured boot/kernel events. |
|
||||
| `BARE_OS_TELEMETRY_OTEL_JSONL` | Booter / var-log | Guest VFS path for OTLP-inspired JSON lines (var-log mirrors). |
|
||||
| `BARE_OS_PROC_POLL_MS` | VFS | Coalescing interval for **`/proc/bare_os/metrics_live.json`** (250–60000). |
|
||||
| `BARE_OS_SHELL_PARAM_EXPANSION` | Shell | When **`1`**, enable **`${VAR:-word}`** and **`${VAR#prefix}`** in **`expandWord`**. |
|
||||
@@ -83,6 +83,18 @@ Former **DOCUMENTATION.md** §14, §14a. [Reference index →](README.md)
|
||||
| `BARE_OS_SED_NULL_MAX_RECORDS` | **`sed -z`** | Max NUL-separated records per run (default **100000**). |
|
||||
| `BARE_OS_HYPER_MULTISIG_VERIFY` | Seeder | When set, runs **`hyper-multisig verify`** via **[`bare-subprocess`](https://github.com/holepunchto/bare-subprocess)** under Pear/Bare (dependency of **`bare-os-seeder`**), or **`child_process`** on Node. Requires **`hyper-multisig`** on **`PATH`**. |
|
||||
|
||||
### Wave 6 (selected)
|
||||
|
||||
| Variable | Used by | Meaning |
|
||||
| --- | --- | --- |
|
||||
| `BARE_OS_DNS_MAP_JSON` | Booter / resolver | Bounded JSON static split-horizon map; summary in **`/proc/bare_os/dns_map_active.json`**. |
|
||||
| `BARE_OS_RESUME_STAGGER_MS` | Stock kernel / initd | Optional delay between unit starts on resume. |
|
||||
| `BARE_OS_BIN_WORKER_WALL_MS` | Booter | Per-invocation wall-clock cap for **`bare-worker`** **`/bin`** offload. |
|
||||
| `BARE_OS_SHM_MAX_BYTES` | VFS | Cap for **`/dev/shm`** backed on the personal drive. |
|
||||
| `BARE_OS_PROC_ALIAS_STRICT` | Booter | **`1`** — fail boot if **`/proc/bare_os`** alias manifest is incomplete. |
|
||||
| `BARE_OS_KERNEL_PROFILE_WARM_RC_ONLY` | Stock kernel | With warm profile reload: apply **`rc.d`** only (skip full init path). |
|
||||
| `BARE_OS_BOOT_POLICY_DENY_KERNEL_EXT_IDS` / `BARE_OS_BOOT_POLICY_EXTENSION_HASH_PINS_JSON` | Stock kernel | Set from **`boot.policy.json`** v6 **`denyKernelExtensionIds`** / **`kernelExtensionHashPins`** when policy merge runs. |
|
||||
|
||||
**Session env (set by booter, not user configuration):** `USER`, `LOGNAME`, `HOME`, `PWD`, `UID`, `GID`, `GROUP`, `BARE_OS_IDENTITY` (`guest` or `unlocked`), `BARE_OS_CTX_API_VERSION`, `BARE_OS_SESSION_ID`, `BARE_OS_BOOT_PROFILE_RESOLVED`, and when unlocked `BARE_OS_PUBLIC_KEY` (hex Ed25519 public key).
|
||||
|
||||
**Theme and color (from `~/.barerc`, `/bin/theme`, and `applyBareOsThemeFromEnv`):**
|
||||
|
||||
@@ -50,4 +50,109 @@ This file tracks the twenty-item “kernel super-features” plan. Items are **d
|
||||
| 19 | `ctx.bare` risk metadata | done — manifest `tier`/`risk` examples + catalog docs |
|
||||
| 20 | Documentation coherence CI | done — [`scripts/verify-doc-links.mjs`](../../scripts/verify-doc-links.mjs), pretest |
|
||||
|
||||
## Wave 6 (100-item mega kernel)
|
||||
|
||||
| # | Item | Status |
|
||||
|---|------|--------|
|
||||
| 1 | bits6 + BARE_OS_KERNEL_FEATURES_STOCK_V6 + FEATURE6_* | done — kernel-feature-bits.js, seed caps, /proc, RPC |
|
||||
| 2 | ADR 001 Word 6 + deprecation policy | done — developer-guide/adr/001 |
|
||||
| 3 | Roadmap verifier + protocol tests bits6 | done — verify-kernel-roadmap-wave3.mjs, protocol test.js |
|
||||
| 4 | ctx API semver + d.ts for Wave 6 fields | done — bare-os-ctx-api.js 1.15.0, bare-os-ctx.d.ts |
|
||||
| 5 | ctx.d.ts / capability index drift checks | done — verify-ctx-dts.mjs, verify-ctx-api-feature-bits.mjs |
|
||||
| 6 | Protocol semver coupling docs | done — package-bare-os-protocol.md, README |
|
||||
| 7 | RPC registry single-source (seed-rpc-methods.js) | done — new methods registered |
|
||||
| 8 | kernel_info hostBundleId / pearRuntimeFingerprint | done — channel.js optional fields |
|
||||
| 9 | capabilities booterPackageVersion | done — RPC + ctx.bareOsBooterPackageVersion |
|
||||
| 10 | FEATURE6_STRICT_PROC_ALIAS | done — feature bit + strict env |
|
||||
| 11 | RPC bare_os.replication_plan | done — seed-rpc-methods, channel, seeder env |
|
||||
| 12 | RPC bare_os.dht_bootstrap_hint | done — bounded bootstrap list |
|
||||
| 13 | RPC bare_os.snapshot_chain | done — lineage hint JSON |
|
||||
| 14 | RPC bare_os.mirror_compaction_hint | done — operator hint |
|
||||
| 15 | RPC bare_os.updater_state | done — non-secret summary |
|
||||
| 16 | RPC bare_os.blind_peer_topology_v2 | done — router hints + caps |
|
||||
| 17 | Seeder handshake token bucket metadata | done — BARE_OS_SEED_TOKEN_BUCKET_JSON |
|
||||
| 18 | Replication priorityClass enum | done — replication_status JSON |
|
||||
| 19 | Replication ipv6ScopeCounts | done — firewall stats v2 adjunct |
|
||||
| 20 | Replication corestoreSnapshotTag | done — string hint |
|
||||
| 21 | Replication queuedPeerCount | done — upper bound field |
|
||||
| 22 | Seed compact_ping optional encoding | done — RPC compact_ping + bit |
|
||||
| 23 | staging_slot RPC v3 triple-slot canary | done — channel + seeder |
|
||||
| 24 | mbr_layout RPC v2 region labels | done — labels map |
|
||||
| 25 | peer_firewall_stats v2 inbound/outbound | done — separate counters |
|
||||
| 26 | /proc/bare_os/udx_extended.json | done — BARE_OS_PROC_UDX_EXTENDED_JSON |
|
||||
| 27 | /proc/bare_os/dht_status.json | done — BARE_OS_PROC_DHT_STATUS_JSON |
|
||||
| 28 | /proc/bare_os/replication_backpressure.json | done — env injection |
|
||||
| 29 | /proc/bare_os/ipc_backpressure.json | done — FIFO depth metrics |
|
||||
| 30 | /proc/bare_os/delegate_red.json | done — RED template |
|
||||
| 31 | /proc/bare_os/build_attestation_pointer.json | done — pointer only |
|
||||
| 32 | /proc/bare_os/pear_ipc_health.json | done — bridge health |
|
||||
| 33 | /proc/bare_os/hypercore_lengths.json | done — capped hints map |
|
||||
| 34 | /proc/bare_os/slo_hints.json | done — documentation-first JSON |
|
||||
| 35 | /proc/bare_os/locale.json | done — BARE_OS_LOCALE + charset |
|
||||
| 36 | /proc/bare_os/worker_budget.json | done — wall/CPU snapshot |
|
||||
| 37 | /proc/bare_os/sandbox_profile.json | done — profile name |
|
||||
| 38 | /proc/bare_os/dns_map_active.json | done — split-horizon summary |
|
||||
| 39 | /proc/bare_os/git_delegate_stats.json | done — fetch depth summary |
|
||||
| 40 | /proc/bare_os/index.json manifest | done — bare_os_proc_index schema 2 |
|
||||
| 41 | ctx.bareOsPearUpdaterDelegate | done — stub + docs |
|
||||
| 42 | ctx.bareOsEmitHyperdhtBootstrapRefresh | done — callback |
|
||||
| 43 | Pear IPC namespaced registry doc | done — developer-guide / handbook |
|
||||
| 44 | pear-runtime release channel in version adjunct | done — /proc version JSON |
|
||||
| 45 | Blind peering relay vs direct hints | done — replication JSON doc |
|
||||
| 46 | bareOsEmitBlindPeerHint v2 reasonCode | done — schema 2 |
|
||||
| 47 | bare-boot alignment doc | done — developer-guide |
|
||||
| 48 | bare-subprocess signal→exit matrix | done — kernel-capabilities-index |
|
||||
| 49 | bare-process pid map in subprocess snapshot | done — hostPidMap schema 3 |
|
||||
| 50 | bare-fetch encodings doc | done — developer-guide |
|
||||
| 51 | boot.policy v6 requireBooterSemver denyKernelExtensionIds | done — schema + kernel |
|
||||
| 52 | boot.policy requireCtxApiMin | done — kernel semver gate |
|
||||
| 53 | boot.policy kernelExtensionHashPins | done — hash pins map |
|
||||
| 54 | Stock kernel enforce v6 under STRICT | done — init.js |
|
||||
| 55 | kernel.extensions.registry v3 | done — schema + example |
|
||||
| 56 | Extension graph dependency edges | done — dependsOn in /proc |
|
||||
| 57 | Warm profile rc.d-only mode | done — BARE_OS_KERNEL_PROFILE_WARM_RC_ONLY |
|
||||
| 58 | Hot reload loaded extension list proc | done — debug adjunct |
|
||||
| 59 | Offline LKG strict integrity toggle | done — offlineLkgIntegrityStrict |
|
||||
| 60 | Boot trace structured phase codes | done — schema doc |
|
||||
| 61 | VFS advisory flock subset | done — vfs + tests |
|
||||
| 62 | VFS xattr union mirror | done — documented limits |
|
||||
| 63 | /dev/shm size cap env | done — BARE_OS_SHM_MAX_BYTES |
|
||||
| 64 | VFS readahead hint /bin | done — env + doc |
|
||||
| 65 | Union whiteout semantics audit | done — .bareos_whiteout + tests |
|
||||
| 66 | readlink/realpath symlink loops | done — tests |
|
||||
| 67 | find -samefile -inum | done — coreutils where inode id |
|
||||
| 68 | Shell job control flags doc | done — handbook |
|
||||
| 69 | Shell streaming backpressure hook doc | done — handbook |
|
||||
| 70 | Param indirect expansion subset | done — FEATURE6 + guarded |
|
||||
| 71 | /bin/env --split-string tests | done — coreutils tests |
|
||||
| 72 | Git submodule policy deny + boot hook | done — boot.policy + doc |
|
||||
| 73 | Initd PartOf= grouping | done — initd schema + kernel |
|
||||
| 74 | Initd RestartMode=direct | done — unit graph |
|
||||
| 75 | Timer OnCalendar= subset | done — parser + doc |
|
||||
| 76 | Socket FDStoreMax= hint | done — graph JSON |
|
||||
| 77 | ConditionCredential= documentary | done — handbook |
|
||||
| 78 | Suspend HDMS quiesce ordering | done — handbook |
|
||||
| 79 | Resume stagger BARE_OS_RESUME_STAGGER_MS | done — kernel-extensions |
|
||||
| 80 | /proc/self/cgroups v2 deeper mirror | done — env JSON |
|
||||
| 81 | BARE_OS_BIN_WORKER_ALLOW mathproc:* | done — kernel-runner |
|
||||
| 82 | Worker per-invocation wall max | done — BARE_OS_BIN_WORKER_WALL_MS |
|
||||
| 83 | Sandbox host-interpreted capability JSON | done — schema + proc |
|
||||
| 84 | Delegate hrpc stub kind | done — host-delegate-registry |
|
||||
| 85 | Delegate concurrency defaults table | done — kernel-extensions |
|
||||
| 86 | Subprocess oomScoreAdj passthrough | done — bridge snapshot |
|
||||
| 87 | Subprocess cgroupPathV2 | done — bridge snapshot |
|
||||
| 88 | BARE_OS_SANDBOX_WORKER telemetry counters | done — var-log / doc |
|
||||
| 89 | BARE_OS_DNS_MAP_JSON split-horizon | done — resolver + proc |
|
||||
| 90 | HTTP delegate HSTS preload env | done — kernel-extensions doc |
|
||||
| 91 | TLS multi-pin rotation doc | done — developer-guide |
|
||||
| 92 | curl alt-svc hint | done — env passthrough doc |
|
||||
| 93 | DNS wildcard suffix rules | done — handbook |
|
||||
| 94 | Happy eyeballs timeout env | done — fetch layer doc |
|
||||
| 95 | NDJSON lifecycle v5 fields | done — bare-os-var-log + schema |
|
||||
| 96 | OTEL JSONL schema v3 | done — otlSchemaVersion 3 + example |
|
||||
| 97 | Audit JSON v3 delegate depth | done — auditSchemaVersion 3 |
|
||||
| 98 | PII scrub list for telemetry | done — developer-guide privacy |
|
||||
| 99 | HDMS pairing backoff telemetry | done — NDJSON fields |
|
||||
| 100 | Mega-integration verify-kernel-roadmap-wave6 + pretest | done — scripts + release notes template |
|
||||
|
||||
See also [kernel-extensions.md](kernel-extensions.md) and [package-bare-os-protocol.md](package-bare-os-protocol.md).
|
||||
|
||||
@@ -59,6 +59,8 @@ The booter may also call **`primeGlobalFetchFromBareLibrary(bareLibrary)`** duri
|
||||
|
||||
**TLS and CA behavior** for delegated **`curl`** can use optional **`init.bareOsCurlTls`** ( **`insecure`**, **`caPem`**, **`pinnedSha256`**) alongside **`BARE_OS_TLS_PIN_SHA256`**; see the security guide and kernel **`init`** documentation.
|
||||
|
||||
**Wave 6 (rotation and HTTP hints)** — For operators running **bare-fetch** (or host **`fetch`**) behind the delegate, document **multi-pin** rotation as a comma- or JSON-list of hex digests (same semantics as single-pin, evaluated by the host). **HSTS preload** lists and **alt-svc** hints are **host-layer** concerns: reserved env names **`BARE_OS_TLS_PINS_JSON`**, **`BARE_OS_HSTS_PRELOAD_PINS_JSON`**, **`BARE_OS_CURL_ALT_SVC_JSON`** are listed in [kernel-extensions.md](./kernel-extensions.md) for Pear-side wiring; the stock in-guest booter does not parse them.
|
||||
|
||||
---
|
||||
|
||||
## Policy-related environment variables
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Kernel capabilities index (bits, env, `/proc`, `ctx`)
|
||||
|
||||
Single map from optional **feature bits** ([`packages/bare-os-protocol/lib/kernel-feature-bits.js`](../../packages/bare-os-protocol/lib/kernel-feature-bits.js)) to operator env vars, guest **`/proc`** paths, and **`ctx`** fields. Stock booter advertises **`BARE_OS_KERNEL_FEATURES_STOCK_V1`** (word 1), **`BARE_OS_KERNEL_FEATURES_STOCK_V2`** (`bits2`), **`BARE_OS_KERNEL_FEATURES_STOCK_V3`** (`bits3`), **`BARE_OS_KERNEL_FEATURES_STOCK_V4`** (`bits4`), and **`BARE_OS_KERNEL_FEATURES_STOCK_V5`** (`bits5`). Governance: [`developer-guide/adr/001-kernel-feature-bits-governance.md`](../../developer-guide/adr/001-kernel-feature-bits-governance.md).
|
||||
Single map from optional **feature bits** ([`packages/bare-os-protocol/lib/kernel-feature-bits.js`](../../packages/bare-os-protocol/lib/kernel-feature-bits.js)) to operator env vars, guest **`/proc`** paths, and **`ctx`** fields. Stock booter advertises **`BARE_OS_KERNEL_FEATURES_STOCK_V1`** (word 1), **`BARE_OS_KERNEL_FEATURES_STOCK_V2`** (`bits2`), **`BARE_OS_KERNEL_FEATURES_STOCK_V3`** (`bits3`), **`BARE_OS_KERNEL_FEATURES_STOCK_V4`** (`bits4`), **`BARE_OS_KERNEL_FEATURES_STOCK_V5`** (`bits5`), and **`BARE_OS_KERNEL_FEATURES_STOCK_V6`** (`bits6`). Governance: [`developer-guide/adr/001-kernel-feature-bits-governance.md`](../../developer-guide/adr/001-kernel-feature-bits-governance.md).
|
||||
|
||||
| Bit (export) | Env / behavior | `/proc` or RPC | `ctx` / notes |
|
||||
| -------------------------------- | ----------------------------------- | ------------------------------------------------ | ----------------------------------------------------- |
|
||||
@@ -122,7 +122,28 @@ Single map from optional **feature bits** ([`packages/bare-os-protocol/lib/kerne
|
||||
| 14 `FEATURE5_SEED_RPC_TYPED_ERRORS` | — | seed RPC | `bare_os.rpc_unknown_method`, etc. |
|
||||
| 15 `FEATURE5_REPO_DOC_CI` | — | — | `verify-doc-links`, `verify-man-coverage`, `verify-compat-matrix` |
|
||||
|
||||
**Related `ctx` (1.14.0+):** `bareOsReadProcMetricsLive()` — parsed coalesced metrics (same as `/proc/bare_os/metrics_live.json`); **`bareOsAdvertisedKernelBits4`** / **`bareOsSeedCapabilityBits4`** / **`bareOsAdvertisedKernelBits5`** / **`bareOsSeedCapabilityBits5`**; **`bareOsReadDelegateFairnessSnapshot`**, **`bareOsReadSubprocessBridgeJobs`**, **`bareOsReadSubprocessBridgeSnapshot`**, **`bareOsRequestKernelProfileReload`**, **`bareOsIsCtxMethodAllowed`**, **`bareOsEmitIpcAudit`**; **`bareOsEmitBlindPeerHint`**, **`bareOsHostCapability`**; Pear IPC channel names in [`bare-os-pear-ipc-registry.js`](../../packages/bare-os-booter/lib/bare-os-pear-ipc-registry.js).
|
||||
### Word 6 (`bits6`, wave 6)
|
||||
|
||||
| Bit (export) | Env / behavior | `/proc` or RPC | `ctx` / notes |
|
||||
| --- | --- | --- | --- |
|
||||
| 0 `FEATURE6_CAP_WORD` | — | seed **`bits6`** + `/proc/bare_os_features` | non-zero sixth word marker |
|
||||
| 1 `FEATURE6_SEED_RPC_WAVE6` | seeder env for new RPC payloads | `replication_plan`, `dht_bootstrap_hint`, `snapshot_chain`, `mirror_compaction_hint`, `updater_state`, `blind_peer_topology_v2`, `compact_ping` | registry in [`seed-rpc-methods.js`](../../packages/bare-os-protocol/lib/seed-rpc-methods.js) |
|
||||
| 2 `FEATURE6_REPLICATION_JSON_ADVISORY` | — | `replication_status` adjunct fields | `priorityClass`, `ipv6ScopeCounts`, `corestoreSnapshotTag`, `queuedPeerCount`, relay/direct hints |
|
||||
| 3 `FEATURE6_PROC_METRICS_WAVE6` | `BARE_OS_PROC_*` / `BARE_OS_DNS_MAP_JSON` | `udx_extended.json`, `dht_status.json`, `replication_backpressure.json`, `ipc_backpressure.json`, `delegate_red.json`, `build_attestation_pointer.json`, `pear_ipc_health.json`, `hypercore_lengths.json`, `slo_hints.json`, `locale.json`, `worker_budget.json`, `sandbox_profile.json`, `dns_map_active.json`, `git_delegate_stats.json`, `bare_os/index.json` manifest | bounded JSON only |
|
||||
| 4 `FEATURE6_BOOT_POLICY_V6` | `boot.policy.json` v6 | — | `requireFeatureBits6`, `requireBooterSemver`, `requireCtxApiMin`, `denyKernelExtensionIds`, `kernelExtensionHashPins`, `offlineLkgIntegrityStrict` |
|
||||
| 5 `FEATURE6_KERNEL_EXT_REGISTRY_V3` | `kernel.extensions.registry` v3 | `/proc/bare_os/extensions.json` schema 3 | `id`, `dependsOn` on records |
|
||||
| 6 `FEATURE6_PEAR_BARE_BRIDGE` | — | version adjunct | `bareOsPearUpdaterDelegate`, `bareOsEmitHyperdhtBootstrapRefresh`, blind-peer hint v2 `reasonCode` |
|
||||
| 7 `FEATURE6_STRICT_PROC_ALIAS` | `BARE_OS_PROC_ALIAS_STRICT=1` | `/proc/bare_os/index.json` | fail closed if alias manifest incomplete |
|
||||
| 8 `FEATURE6_VFS_POSIX_WAVE6` | `BARE_OS_SHM_MAX_BYTES`, union whiteout | `/dev/shm`, flock subset | find `-inum` / `-samefile` where inode-like id exists |
|
||||
| 9 `FEATURE6_INITD_LIFECYCLE_WAVE6` | `BARE_OS_RESUME_STAGGER_MS`, `BARE_OS_KERNEL_PROFILE_WARM_RC_ONLY` | initd graph JSON | `PartOf=`, `RestartMode=direct`, `OnCalendar=`, `FDStoreMax=` |
|
||||
| 10 `FEATURE6_WORKER_SANDBOX_WAVE6` | `BARE_OS_BIN_WORKER_ALLOW` `mathproc:*`, `BARE_OS_BIN_WORKER_WALL_MS` | `sandbox_profile.json` | delegate kind **`hrpc`** stub (audit-only) |
|
||||
| 11 `FEATURE6_NET_POLICY_WAVE6` | `BARE_OS_DNS_MAP_JSON`, HSTS/TLS/alt-svc env docs | `dns_map_active.json` | split-horizon map summary |
|
||||
| 12 `FEATURE6_TELEMETRY_AUDIT_WAVE6` | `BARE_OS_TELEMETRY_*` | NDJSON / OTel / audit sinks | lifecycle schema **5**, **`otlSchemaVersion` 3**, **`auditSchemaVersion` 3** |
|
||||
| 13 `FEATURE6_DOC_CI_WAVE6` | — | — | `verify-kernel-roadmap-wave6.mjs`, `verify-pear-no-static-node-import.mjs` |
|
||||
| 14 `FEATURE6_HANDSHAKE_TOKEN_BUCKET` | `BARE_OS_SEED_TOKEN_BUCKET_JSON` | seed handshake | client backoff metadata |
|
||||
| 15 `FEATURE6_COMPACT_SEED_PING` | — | `compact_ping` / `compact_pong` | optional bandwidth probe |
|
||||
|
||||
**Related `ctx` (1.15.0+):** **`bareOsAdvertisedKernelBits4`**–**`bits6`** / **`bareOsSeedCapabilityBits4`**–**`bits6`** / **`bareOsBooterPackageVersion`**; **`bareOsReadProcMetricsLive()`**; **`bareOsReadDelegateFairnessSnapshot`**, **`bareOsReadSubprocessBridgeJobs`**, **`bareOsReadSubprocessBridgeSnapshot`** (schema **3**: `hostPidMap`, `oomScoreAdj`, `cgroupPathV2`), **`bareOsRequestKernelProfileReload`**, **`bareOsIsCtxMethodAllowed`**, **`bareOsEmitIpcAudit`**; **`bareOsEmitBlindPeerHint`**, **`bareOsHostCapability`**, **`bareOsPearUpdaterDelegate`**, **`bareOsEmitHyperdhtBootstrapRefresh`**; Pear IPC channel names in [`bare-os-pear-ipc-registry.js`](../../packages/bare-os-booter/lib/bare-os-pear-ipc-registry.js).
|
||||
|
||||
**Handbook:** [handbook/09-posix-utilities-shell-and-vfs.md](../../handbook/09-posix-utilities-shell-and-vfs.md), [handbook/04-the-booter-runtime.md](../../handbook/04-the-booter-runtime.md).
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
This document complements the [handbook](../../handbook/09-posix-utilities-shell-and-vfs.md) with a single map of optional **booter + stock kernel** features added for richer POSIX-like behavior, protocol alignment, and operations.
|
||||
|
||||
## Governance (feature bits doc v7)
|
||||
## Governance (feature bits doc v8)
|
||||
|
||||
New capability bits are governed by [ADR 001 — Kernel feature bit governance](../../developer-guide/adr/001-kernel-feature-bits-governance.md). **`BARE_OS_KERNEL_FEATURE_BITS_DOC`** must bump when semantics change. Bits **28–30** on word 1 are assigned (see ADR). **Word 2 (`bits2`)** carries wave-2 features; always mask with **`>>> 0`**. Avoid `1 << 31` on word 1 in JS without `>>> 0` discipline.
|
||||
|
||||
@@ -10,9 +10,9 @@ New capability bits are governed by [ADR 001 — Kernel feature bit governance](
|
||||
|
||||
## Capability bitmask
|
||||
|
||||
Runtime bits are defined in `bare-os-protocol` (`kernel-feature-bits.js`) and surfaced under `/proc/bare_os_features` and the **`/proc/bare_os/`** tree. The stock booter advertises **`BARE_OS_KERNEL_FEATURES_STOCK_V1`** and **`bits2`** from **`BARE_OS_KERNEL_FEATURES_STOCK_V2`**.
|
||||
Runtime bits are defined in `bare-os-protocol` (`kernel-feature-bits.js`) and surfaced under `/proc/bare_os_features` and the **`/proc/bare_os/`** tree. The stock booter advertises **`BARE_OS_KERNEL_FEATURES_STOCK_V1`** … **`STOCK_V6`** (six words on the wire when non-zero).
|
||||
|
||||
Seed RPC **`bare_os.capabilities`** includes **`protocolPackageVersion`**, **`featureBitsDoc`**, **`doc`**, **`bits`**, **`bits2`**, **`bits3`**, **`bits4`**, **`bits5`**, **`role`**, **`protocol`**. RPC method names are listed from a single registry ([`seed-rpc-methods.js`](../../packages/bare-os-protocol/lib/seed-rpc-methods.js)); unknown methods return **`bare_os.rpc_unknown_method`**. **`bare_os.replication_status`** returns seeder-side replication hints (manifest path count, local RAM block count). **`bare_os.replication_queue`** includes bounded **`queueDepthEstimate`** and snapshot workflow notes; **`bare_os.capability_attestation`**, and **`bare_os.mbr_layout`** remain optional wave-2 RPCs. **`bare_os.manifest_hints`** returns a sample of manifest paths; **`bare_os.peer_health`** returns seeder health counters; **`bare_os.staging_slot`** returns optional A/B slot hints (seeder env `BARE_OS_SEED_STAGING_SLOT`, `BARE_OS_SEED_STAGING_PENDING`). Booter mirrors hints under **`/proc/bare_os/manifest_hints`**, **`peer_health`**, **`staging_slot`**, **`net_summary.json`**, **`extensions.json`**, **`hdms_hints.json`** and embeds them in **`/proc/bare_os_replication`** JSON.
|
||||
Seed RPC **`bare_os.capabilities`** includes **`protocolPackageVersion`**, optional **`booterPackageVersion`**, **`featureBitsDoc`**, **`doc`**, **`bits`**, **`bits2`**, **`bits3`**, **`bits4`**, **`bits5`**, **`bits6`**, **`role`**, **`protocol`**. RPC method names are listed from a single registry ([`seed-rpc-methods.js`](../../packages/bare-os-protocol/lib/seed-rpc-methods.js)); unknown methods return **`bare_os.rpc_unknown_method`**. **`bare_os.replication_status`** returns seeder-side replication hints (manifest path count, local RAM block count). **`bare_os.replication_queue`** includes bounded **`queueDepthEstimate`** and snapshot workflow notes; **`bare_os.capability_attestation`**, and **`bare_os.mbr_layout`** remain optional wave-2 RPCs. Wave 6 adds **`replication_plan`**, **`dht_bootstrap_hint`**, **`snapshot_chain`**, **`mirror_compaction_hint`**, **`updater_state`**, **`blind_peer_topology_v2`**, **`compact_ping`**. **`bare_os.manifest_hints`** returns a sample of manifest paths; **`bare_os.peer_health`** returns seeder health counters; **`bare_os.staging_slot`** returns optional A/B slot hints (seeder env `BARE_OS_SEED_STAGING_SLOT`, `BARE_OS_SEED_STAGING_PENDING`). Booter mirrors hints under **`/proc/bare_os/manifest_hints`**, **`peer_health`**, **`staging_slot`**, **`net_summary.json`**, **`extensions.json`**, **`hdms_hints.json`** and embeds them in **`/proc/bare_os_replication`** JSON.
|
||||
|
||||
**JSON Schemas** (policy, telemetry, boot trace): [`docs/schemas/`](../schemas/) (see also [reference README](./README.md)).
|
||||
|
||||
@@ -28,8 +28,8 @@ Seed RPC **`bare_os.capabilities`** includes **`protocolPackageVersion`**, **`fe
|
||||
| Union writes | `BARE_OS_VFS_UNION_WRITE_DENY` | Comma/colon list of path prefixes blocked for writes under union prefixes |
|
||||
| IPC | `BARE_OS_IPC_CHANNEL_MAX_BYTES` | JSON map `{"fifoName": 65536}` per-channel backlog cap |
|
||||
| Initd journal | `BARE_OS_INITD_JOURNAL_MAX_LINES` | Cap NDJSON lines per unit (default 400, max 20000) |
|
||||
| Telemetry | `BARE_OS_TELEMETRY_NDJSON` | Logical path; append NDJSON mirror of `appendVarLog` events (`telemetrySchemaVersion` / `lifecycleSchemaVersion` **3**) |
|
||||
| Telemetry OTel | `BARE_OS_TELEMETRY_OTEL_JSONL` | Logical path; append OTLP-inspired JSON lines for var-log mirrors |
|
||||
| Telemetry | `BARE_OS_TELEMETRY_NDJSON` | Logical path; append NDJSON mirror of `appendVarLog` events (`telemetrySchemaVersion` / `lifecycleSchemaVersion` **5** in stock) |
|
||||
| Telemetry OTel | `BARE_OS_TELEMETRY_OTEL_JSONL` | Logical path; append OTLP-inspired JSON lines (`otlSchemaVersion` **3**; see [`otel-bare-os-jsonl.schema.json`](../schemas/otel-bare-os-jsonl.schema.json)) |
|
||||
| Proc poll | `BARE_OS_PROC_POLL_MS` | Min interval 250ms, max 60s, for coalesced **`/proc/bare_os/metrics_live.json`** |
|
||||
| Shell `${…}` | `BARE_OS_SHELL_PARAM_EXPANSION=1` | Enable `${VAR:-default}` and `${VAR#prefix}` (bounded prefix length) |
|
||||
| Shell `${…}` v2 | `BARE_OS_SHELL_PARAM_EXPANSION_V2=1` | With param expansion on: `${VAR:=x}`, `${VAR##*/}` / `${VAR#*/}`, `${VAR%%pat}` / `${VAR%pat}` (bounded; see handbook ch.9) |
|
||||
@@ -37,11 +37,18 @@ Seed RPC **`bare_os.capabilities`** includes **`protocolPackageVersion`**, **`fe
|
||||
| VFS pseudo watch | `BARE_OS_VFS_WATCH_PSEUDO=1` | `vfs.watch` on coalesced **`/proc/bare_os/metrics_live.json`** |
|
||||
| Diagnostics | `BARE_OS_DIAGNOSTICS_SUBSCRIBE=1` | `ctx.bareOsDiagnosticsSubscribe` for structured dev events |
|
||||
| HDMS / autopass hint | `BARE_OS_AUTOPASS_INVITE_URL` | Surfaced in **`/proc/bare_os/hdms_hints.json`** (guest does not open URLs) |
|
||||
| Bin worker | `BARE_OS_BIN_WORKER_OFFLOAD=1`, `BARE_OS_BIN_WORKER_ALLOW` | Offload eligible `/bin` on Bare via `bare-worker`; allow list defaults to awk/sed/jq, or patterns like `textproc:*` (cut, tr, sort, uniq, …) |
|
||||
| Bin worker | `BARE_OS_BIN_WORKER_OFFLOAD=1`, `BARE_OS_BIN_WORKER_ALLOW` | Offload eligible `/bin` on Bare via `bare-worker`; allow list defaults to awk/sed/jq, or patterns like `textproc:*` (cut, tr, sort, uniq, …); **`mathproc:*`** (`bc`, `dc`); optional per-invocation wall cap **`BARE_OS_BIN_WORKER_WALL_MS`** |
|
||||
| Wave 6 proc inject | `BARE_OS_PROC_*` (see [kernel-capabilities-index](./kernel-capabilities-index.md) Word 6) | Bounded JSON for **`/proc/bare_os/*.json`** operator metrics (udx, DHT, backpressure, locale, …) |
|
||||
| DNS map | `BARE_OS_DNS_MAP_JSON` | Split-horizon static map; summary in **`/proc/bare_os/dns_map_active.json`** |
|
||||
| Resume stagger | `BARE_OS_RESUME_STAGGER_MS` | Delay between initd unit starts on resume (advisory) |
|
||||
| Profile warm rc.d | `BARE_OS_KERNEL_PROFILE_WARM_RC_ONLY=1` | With **`BARE_OS_KERNEL_PROFILE_WARM`**: reload **`rc.d`** snippets only |
|
||||
| Proc alias strict | `BARE_OS_PROC_ALIAS_STRICT=1` | Fail boot if **`/proc/bare_os`** alias index incomplete (**`FEATURE6_STRICT_PROC_ALIAS`**) |
|
||||
| SHM cap | `BARE_OS_SHM_MAX_BYTES` | Cap for **`/dev/shm`** on personal-backed tmp |
|
||||
| TLS / HTTP hints | *(reserved names in docs)* `BARE_OS_HSTS_PRELOAD_PINS_JSON`, `BARE_OS_TLS_PINS_JSON`, `BARE_OS_CURL_ALT_SVC_JSON` | Multi-pin rotation, HSTS preload list, **alt-svc** — **host-delegate / Pear layer**; stock booter does not parse these env vars yet (see [http-curl-and-wget.md](./http-curl-and-wget.md)) |
|
||||
| Exec budget | `BARE_OS_EXEC_LINE_BUDGET_MS` | Reject top-level `execLine` when session wall time exceeds budget |
|
||||
| Delegates | `BARE_OS_DELEGATE_MAX_PER_MIN`, `BARE_OS_DELEGATE_CURL_MAX_PER_MIN`, … | Per-minute caps on host delegates (sliding minute window) |
|
||||
| Delegates | `BARE_OS_DELEGATE_AUDIT_ONLY=1` | With `BARE_OS_AUDIT=1`, log delegate invocations and skip host run (exit 0) |
|
||||
| Boot policy | `BARE_OS_BOOT_POLICY=1` | Merge `skipPhases` / `denyBootPhases` from `/etc/bare-os/boot.policy.json`; optional `minKernelFeatureMask` / `requireSeedCaps`; v2 `maxExecLineDepth`, `denyEnvKeys`, `requireProcNodes`; **v3** `requireFeatureBits2`, `requireFeatureBits3`, `allowedPearIpcChannels` → session env, `denyVfsPrefixes` (VFS deny), `maxInitdRestartsPerUnit` → `BARE_OS_INITD_RESTART_MAX_DEFAULT`; **v4** `requireFeatureBits4`, `denyExecLineBuiltins` → `BARE_OS_BOOT_POLICY_DENY_EXEC_LINE_BUILTINS`, `allowedCtxMethods` → `BARE_OS_BOOT_POLICY_ALLOWED_CTX_METHODS`; **v5** `requireFeatureBits5`, `requireInitJsSha256` |
|
||||
| Boot policy | `BARE_OS_BOOT_POLICY=1` | Merge `skipPhases` / `denyBootPhases` from `/etc/bare-os/boot.policy.json`; optional `minKernelFeatureMask` / `requireSeedCaps`; v2 `maxExecLineDepth`, `denyEnvKeys`, `requireProcNodes`; **v3** `requireFeatureBits2`, `requireFeatureBits3`, `allowedPearIpcChannels` → session env, `denyVfsPrefixes` (VFS deny), `maxInitdRestartsPerUnit` → `BARE_OS_INITD_RESTART_MAX_DEFAULT`; **v4** `requireFeatureBits4`, `denyExecLineBuiltins` → `BARE_OS_BOOT_POLICY_DENY_EXEC_LINE_BUILTINS`, `allowedCtxMethods` → `BARE_OS_BOOT_POLICY_ALLOWED_CTX_METHODS`; **v5** `requireFeatureBits5`, `requireInitJsSha256`; **v6** `requireFeatureBits6`, `requireBooterSemver`, `requireCtxApiMin`, `denyKernelExtensionIds`, `kernelExtensionHashPins`, `offlineLkgIntegrityStrict` |
|
||||
| Boot policy strict | `BARE_OS_BOOT_POLICY_STRICT=1` | Abort boot when policy checks fail |
|
||||
| Lazy personal drive | `BARE_OS_LAZY_PERSONAL_DRIVE=1` | Mount personal Hyperdrive at session setup instead of immediately after kernel fetch |
|
||||
| System revision | `BARE_OS_SYSTEM_REVISION_ID`, `BARE_OS_SYSTEM_REVISION_PENDING`, `BARE_OS_SYSTEM_SLOT` | Exposed as `ctx.bareOsSystemRevision` (Pear OTA–style hints) |
|
||||
@@ -60,6 +67,10 @@ Seed RPC **`bare_os.capabilities`** includes **`protocolPackageVersion`**, **`fe
|
||||
| Sandbox | `BARE_OS_SANDBOX_WORKER=1` | Try `bare-worker` when available; else microtask defer |
|
||||
| Bundle tier | `BARE_OS_BUNDLE_TIER=core` | `bare-os-bare-libs` build: only manifest rows with matching `tier` (`all` = default); optional per-row `risk` in manifest |
|
||||
|
||||
## Wave 6 summary
|
||||
|
||||
Shipped as **`bits6`** + **`STOCK_V6`**. Full bit map: [kernel-capabilities-index.md](./kernel-capabilities-index.md) (Word 6). One-row checklist: [feature-roadmap.md](./feature-roadmap.md) (Wave 6 table). CI: **`verify-kernel-roadmap-wave6.mjs`**, **`verify-pear-no-static-node-import.mjs`**.
|
||||
|
||||
## POSIX utility notes
|
||||
|
||||
| Utility | Notes |
|
||||
|
||||
@@ -13,7 +13,28 @@
|
||||
"requireFeatureBits3": { "type": "integer", "minimum": 0 },
|
||||
"requireFeatureBits4": { "type": "integer", "minimum": 0 },
|
||||
"requireFeatureBits5": { "type": "integer", "minimum": 0 },
|
||||
"requireFeatureBits6": { "type": "integer", "minimum": 0 },
|
||||
"requireInitJsSha256": { "type": "string", "minLength": 64, "maxLength": 64 },
|
||||
"requireBooterSemver": {
|
||||
"type": "string",
|
||||
"description": "Minimum booter package semver (e.g. 0.1.0); compared to ctx.bareOsBooterPackageVersion"
|
||||
},
|
||||
"requireCtxApiMin": {
|
||||
"type": "string",
|
||||
"description": "Minimum ctx API semver (e.g. 1.15.0); compared to bareOsCtxApiVersion"
|
||||
},
|
||||
"denyKernelExtensionIds": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
},
|
||||
"kernelExtensionHashPins": {
|
||||
"type": "object",
|
||||
"additionalProperties": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
|
||||
},
|
||||
"offlineLkgIntegrityStrict": {
|
||||
"type": "boolean",
|
||||
"description": "When true with strict policy, offline LKG boot requires extra integrity checks (operator-defined via env on host)"
|
||||
},
|
||||
"maxExecLineDepth": { "type": "integer", "minimum": 1 },
|
||||
"denyEnvKeys": { "type": "array", "items": { "type": "string" } },
|
||||
"requireProcNodes": { "type": "array", "items": { "type": "string" } },
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"required": ["otlSchemaVersion", "resourceLogs"],
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"otlSchemaVersion": { "type": "integer", "const": 2 },
|
||||
"otlSchemaVersion": { "type": "integer", "const": 3 },
|
||||
"resourceLogs": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
@@ -15,7 +15,27 @@
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"resource": { "type": "object" },
|
||||
"scopeLogs": { "type": "array" }
|
||||
"scopeLogs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"scope": { "type": "object" },
|
||||
"logRecords": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"events": { "type": "array" },
|
||||
"links": { "type": "array" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user