chore(booter): complete P2P/POSIX roadmap — ctx 1.48, VFS, shell, docs

- Bump bareOsCtxApiVersion to 1.48.0; sync CHANGELOG, compatibility matrix,
  syscalls.example.json, ctx d.ts, generated ctx-client helper
- POSIX: getconf _SC_NPROCESSORS_ONLN; shell set -o pipefail + BARE_OS_PIPESTATUS;
  posix_utilities schema v2 + JSON Schema; generated dashboard refresh
- Host/subprocess: bare-subprocess then Node child_process spawn; optional
  backend on ctx.bareOsTrySpawnHostSubprocess; bin-worker WASM wall budget
- VFS: BARE_OS_VFS_SYSTEM_IMAGE_WRITE for system image writes + warm-cache
  eviction path; guest /.bare/account EACCES test; environ TOKEN redaction test
- Docs: corestore snapshot non-goal in package-bare-os-booter; PEAR-RUN links
  → docs/PEAR-RUN.md; POSIX pretest matrix in scripts/README + dev guide;
  environment appendix (PIPESTATUS, WASM_MS, system image write)
- Seeder: keep kernel/ mirror in sync after bundle + coreutils builds

Verified: npm test -w bare-os-booter, npm run pretest
This commit is contained in:
Raven Scott
2026-04-05 12:52:06 -04:00
parent c4781e02c0
commit e89c55da25
69 changed files with 2909 additions and 596 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ Single place to compare **protocol**, **booter `ctx` API**, **feature-bit docume
## Version artifacts
**`bareOsCtxApiVersion`** (current stock: **`1.47.0`**) — Defined in [`packages/bare-os-booter/lib/bare-os-ctx-api.js`](../../packages/bare-os-booter/lib/bare-os-ctx-api.js). This is the semver string for the documented **`ctx`** contract; bump it when stable guest-visible behavior changes.
**`bareOsCtxApiVersion`** (current stock: **`1.48.0`**) — Defined in [`packages/bare-os-booter/lib/bare-os-ctx-api.js`](../../packages/bare-os-booter/lib/bare-os-ctx-api.js). This is the semver string for the documented **`ctx`** contract; bump it when stable guest-visible behavior changes.
**`BARE_OS_KERNEL_FEATURE_BITS_DOC`** (current stock: **`15`**) — Exported from [`packages/bare-os-protocol/lib/kernel-feature-bits.js`](../../packages/bare-os-protocol/lib/kernel-feature-bits.js). It versions the feature-bit documentation and related governance; keep it aligned with [`developer-guide/adr/001-kernel-feature-bits-governance.md`](../../developer-guide/adr/001-kernel-feature-bits-governance.md).
@@ -38,7 +38,7 @@ Single place to compare **protocol**, **booter `ctx` API**, **feature-bit docume
- **Seeder** must answer **`bare_os.capabilities`** with **`kernelCapabilityWords`** (wire **v2**, **`kernelCapabilityWireVersion`: 2**) when using a current **`bare-os-protocol`** build. **`BARE_OS_SEED_CAP_STRICT`** requires that object and full stock coverage per semantic key.
- **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.
- **Pear host** — Couple **`pear-runtime`** / **`pear-runtime-updater`** with this trees **`bare-os-protocol`** and **`bareOsCtxApiVersion`** (see [PEAR-RUN.md](../../PEAR-RUN.md)); the stock **`bare-module-manifest.json`** does **not** list **`pear-runtime`** because it is not an npm-resolvable guest bundle—hosts wire it via imports and **`BARE_OS_PEAR_RUNTIME_VERSION`** when needed.
- **Pear host** — Couple **`pear-runtime`** / **`pear-runtime-updater`** with this trees **`bare-os-protocol`** and **`bareOsCtxApiVersion`** (see [PEAR-RUN.md](../PEAR-RUN.md)); the stock **`bare-module-manifest.json`** does **not** list **`pear-runtime`** because it is not an npm-resolvable guest bundle—hosts wire it via imports and **`BARE_OS_PEAR_RUNTIME_VERSION`** when needed.
---
@@ -1,7 +1,7 @@
// Auto-generated by scripts/gen-ctx-client-helper.mjs — do not edit by hand.
/** Canonical `ctx` API semver from `packages/bare-os-booter/lib/bare-os-ctx-api.js`. */
export const BARE_OS_CTX_API_CLIENT_VERSION = '1.47.0' as const
export const BARE_OS_CTX_API_CLIENT_VERSION = '1.48.0' as const
/** Relative path to the hand-maintained TypeScript contract (schema source of truth). */
export const BARE_OS_CTX_DTS_SOURCE = 'packages/bare-os-booter/lib/bare-os-ctx.d.ts' as const
@@ -10,7 +10,7 @@ export const BARE_OS_CTX_DTS_SOURCE = 'packages/bare-os-booter/lib/bare-os-ctx.d
export const BARE_OS_CTX_DTS_BAREOS_MEMBER_APPROX = 153 as const
/** Byte length of `bare-os-ctx.d.ts` when this file was generated. */
export const BARE_OS_CTX_DTS_BYTES = 19312 as const
export const BARE_OS_CTX_DTS_BYTES = 19405 as const
/** Pointers for external client generators (OpenAPI / JSON Schema follow-ups). */
export const BARE_OS_CTX_SCHEMA_HINT = {
@@ -58,7 +58,7 @@ The list below is one **bullet per variable** in the form **name — component
- `MANWIDTH``/bin/man` — Wrap width for manual text (default `72`; minimum `40`)
- `NO_COLOR``/bin/man` — If set, disable ANSI bold for section headings on a TTY
**Host → session passthrough** (booter copies into **`shellEnv`** when the host sets a non-empty value; canonical list in [`packages/bare-os-booter/index.js`](../../packages/bare-os-booter/index.js)): `BARE_OS_PIPELINE_MAX_STAGES`, `BARE_OS_PIPELINE_MAX_BYTES`, `BARE_OS_PIPELINE_MAX_LINES`, `BARE_OS_SHELL_STREAMING`, `BARE_OS_SHELL_STREAMING_MULT`, `BARE_OS_SHELL_PIPEFAIL`, `BARE_OS_SHELL_ERREXIT`, `BARE_OS_SHELL_POSIX_MODE`, `BARE_OS_SHELL_CMDSUBST`, `BARE_OS_SHELL_CMDSUBST_MAX_BYTES`, `BARE_OS_SHELL_PARAM_EXPANSION`, `BARE_OS_SHELL_PARAM_EXPANSION_V2`, `BARE_OS_SHELL_PARAM_EXPANSION_V3`, `BARE_OS_ENV_DASH_S`, `BARE_OS_VFS_WATCH_PSEUDO`, `BARE_OS_VFS_WATCH_SWARM`, `BARE_OS_SHELL_LOCAL_DECLARE`, `BARE_OS_DIAGNOSTICS_SUBSCRIBE`, `BARE_OS_AUTOPASS_INVITE_URL`, `BARE_OS_BIN_WORKER_OFFLOAD`, `BARE_OS_BIN_WORKER_ALLOW`, `BARE_OS_BIN_WORKER_CPU_MS_MAX`, `BARE_OS_BOOT_PROFILE`, `BARE_OS_ONBOOT`, `BARE_OS_BOOT_STRICT`, `BARE_OS_RC_D_SKIP`, `BARE_OS_BOOT_MINIMAL`, `BARE_OS_BOOT_SKIP`, `BARE_OS_BOOT_SAFE_MODE`, `BARE_OS_BOOT_TRANSACTION_JOURNAL`, `BARE_OS_BOOT_CHECKPOINT`, `BARE_OS_BOOT_DRY_RUN`, `BARE_OS_BOOT_POLICY_PATH`, `BARE_OS_BOOT_ROLLBACK_APPLY`, `BARE_OS_BOOT_BUNDLE_DIGEST_HEX`, `BARE_OS_REQUIRE_CTX_API_MIN`, `BARE_OS_BOOT_ABI_STRICT`, `BARE_OS_LOADER_AUDIT`, `BARE_OS_DELEGATE_TRACE`, `BARE_OS_DNS_PROFILE`, `BARE_OS_BOOT_TRACE`, `BARE_OS_KERNEL_PROGRAM_PROC_JSON`, `BARE_OS_GIANT_PHASE_PROGRAM_JSON`, `BARE_OS_KERNEL_SELFTEST`, `BARE_OS_SELFTEST_FORMAT`, `BARE_OS_AUDIT`, `BARE_OS_AUDIT_JSON`, `BARE_OS_AUDIT_REDACT`, `BARE_OS_IMAGE_DIGEST`, `BARE_OS_EXEC_MAX_DEPTH`, `BARE_OS_EXEC_LINE_BUDGET_MS`, `BARE_OS_IPC_MAX_BYTES`, `BARE_OS_IPC_CHANNEL_MAX_BYTES`, `BARE_OS_IPC_RPC_TOKEN`, `BARE_OS_IPC_FANOUT`, `BARE_OS_IPC_JSON_MAX_BYTES`, `BARE_OS_IPC_NAMESPACE`, `BARE_OS_VFS_WATCH`, `BARE_OS_VFS_UNION_PREFIXES`, `BARE_OS_VFS_UNION_WRITE_DENY`, `BARE_OS_VFS_HYPERBLOBS_DEDUP`, `BARE_OS_VFS_BIN_CACHE`, `BARE_OS_VFS_BIN_CACHE_BLAKE2B`, `BARE_OS_VFS_WARM_CACHE_INVALIDATE_ON_APPEND`, `BARE_OS_VFS_ENFORCE_ACL`, `BARE_OS_VFS_BIN_INDEX_BUILD`, `BARE_OS_BOOT_ALLOWLIST`, `BARE_OS_BOOT_MANIFEST`, `BARE_OS_BOOT_MANIFEST_SIGN`, `BARE_OS_BOOT_MANIFEST_PUBKEY_HEX`, `BARE_OS_BOOT_POLICY`, `BARE_OS_BOOT_POLICY_STRICT`, `BARE_OS_LAZY_PERSONAL_DRIVE`, `BARE_OS_SYSTEM_REVISION_ID`, `BARE_OS_SYSTEM_REVISION_PENDING`, `BARE_OS_SYSTEM_SLOT`, `BARE_OS_DELEGATE_ALLOW`, `BARE_OS_DELEGATE_MAX_PER_MIN`, `BARE_OS_DELEGATE_MAX_CONCURRENT`, `BARE_OS_DELEGATE_GIT_MAX_PER_MIN`, `BARE_OS_DELEGATE_CURL_MAX_PER_MIN`, `BARE_OS_DELEGATE_WGET_MAX_PER_MIN`, `BARE_OS_DELEGATE_SYSTEMCTL_MAX_PER_MIN`, `BARE_OS_DELEGATE_GIT_MAX_CONCURRENT`, `BARE_OS_DELEGATE_CURL_MAX_CONCURRENT`, `BARE_OS_DELEGATE_WGET_MAX_CONCURRENT`, `BARE_OS_DELEGATE_SYSTEMCTL_MAX_CONCURRENT`, `BARE_OS_DELEGATE_AUDIT_ONLY`, `BARE_OS_DNS_ALLOWLIST`, `BARE_OS_KERNEL_HOT_RELOAD`, `BARE_OS_KERNEL_EXT_D_HOT_RELOAD`, `BARE_OS_SANDBOX_SCRIPT`, `BARE_OS_SANDBOX_WORKER`, `BARE_OS_INITD_MAX_PARALLEL`, `BARE_OS_INITD_JOURNAL_MAX_LINES`, `BARE_OS_URANDOM_CRYPTO`, `BARE_OS_TELEMETRY_NDJSON`, `BARE_OS_TELEMETRY_OTEL_JSONL`, `BARE_OS_PROC_POLL_MS`, `BARE_OS_TIMER_EVERY_MS_MONOTONIC`, `BARE_OS_TRACE_ID`, `BARE_OS_SEED_RPC_HANDSHAKE`, `BARE_OS_SEED_CAP_STRICT`, `BARE_OS_SEED_CAP_FAIL`, `BARE_OS_OFFLINE_LKG_BOOT`, `BARE_OS_LKG_SYSTEM_KEY_HEX`, `BARE_OS_HOST_STORAGE_JSON`, `BARE_OS_BOOT_POLICY_DENY_EXEC_LINE_BUILTINS`, `BARE_OS_BOOT_POLICY_ALLOWED_CTX_METHODS`, `BARE_OS_SUBPROCESS_BRIDGE_JOBS_JSON`, `BARE_OS_IPC_AUDIT`, `BARE_OS_HTTP_ALLOWLIST`, `BARE_OS_HTTP_DENYLIST`, `BARE_OS_TLS_PIN_SHA256`, `BARE_OS_BARE_MODULES`, `BARE_OS_BARE_DRIVE_BUNDLES`, `BARE_OS_PEAR_CHANNEL`, `BARE_OS_PEAR_RELEASE`, `PEAR_CHANNEL`, `BARE_OS_FIND_EXEC_MAX`, `BARE_OS_XARGS_MAX_PROCS`, `BARE_OS_YES_MAX_LINES`, `BARE_OS_SHUF_MAX_LINES`, `BARE_OS_SPLIT_MAX_FILES`, `BARE_OS_NPROC`, `BARE_OS_BLIND_BOOTSTRAP_URL`, `BARE_OS_BLIND_BOOTSTRAP_JSON`, `BARE_OS_MIRROR_READ_KEY`, `BARE_OS_PEER_FIREWALL_E2E_JSON`, `BARE_OS_PEAR_SECURE_ENCLAVE_JSON`, `BARE_OS_ACCOUNT_KEY_ROTATION_STATE_JSON`, `BARE_OS_PEAR_TRUST_JSON`, `BARE_OS_HOST_BUNDLE_EVALUATE`, `BARE_OS_WASM_KERNEL`, **`TERM`**, **`COLORTERM`**. *(Many additional operator JSON pointers and version pins are also copied from the same loop; see source.)*
**Host → session passthrough** (booter copies into **`shellEnv`** when the host sets a non-empty value; canonical list in [`packages/bare-os-booter/index.js`](../../packages/bare-os-booter/index.js)): `BARE_OS_PIPELINE_MAX_STAGES`, `BARE_OS_PIPELINE_MAX_BYTES`, `BARE_OS_PIPELINE_MAX_LINES`, `BARE_OS_SHELL_STREAMING`, `BARE_OS_SHELL_STREAMING_MULT`, `BARE_OS_SHELL_PIPEFAIL`, `BARE_OS_SHELL_PIPESTATUS`, `BARE_OS_SHELL_ERREXIT`, `BARE_OS_SHELL_POSIX_MODE`, `BARE_OS_SHELL_CMDSUBST`, `BARE_OS_SHELL_CMDSUBST_MAX_BYTES`, `BARE_OS_SHELL_PARAM_EXPANSION`, `BARE_OS_SHELL_PARAM_EXPANSION_V2`, `BARE_OS_SHELL_PARAM_EXPANSION_V3`, `BARE_OS_ENV_DASH_S`, `BARE_OS_VFS_WATCH_PSEUDO`, `BARE_OS_VFS_WATCH_SWARM`, `BARE_OS_SHELL_LOCAL_DECLARE`, `BARE_OS_DIAGNOSTICS_SUBSCRIBE`, `BARE_OS_AUTOPASS_INVITE_URL`, `BARE_OS_BIN_WORKER_OFFLOAD`, `BARE_OS_BIN_WORKER_ALLOW`, `BARE_OS_BIN_WORKER_CPU_MS_MAX`, `BARE_OS_BIN_WORKER_WASM_MS_MAX`, `BARE_OS_BOOT_PROFILE`, `BARE_OS_ONBOOT`, `BARE_OS_BOOT_STRICT`, `BARE_OS_RC_D_SKIP`, `BARE_OS_BOOT_MINIMAL`, `BARE_OS_BOOT_SKIP`, `BARE_OS_BOOT_SAFE_MODE`, `BARE_OS_BOOT_TRANSACTION_JOURNAL`, `BARE_OS_BOOT_CHECKPOINT`, `BARE_OS_BOOT_DRY_RUN`, `BARE_OS_BOOT_POLICY_PATH`, `BARE_OS_BOOT_ROLLBACK_APPLY`, `BARE_OS_BOOT_BUNDLE_DIGEST_HEX`, `BARE_OS_REQUIRE_CTX_API_MIN`, `BARE_OS_BOOT_ABI_STRICT`, `BARE_OS_LOADER_AUDIT`, `BARE_OS_DELEGATE_TRACE`, `BARE_OS_DNS_PROFILE`, `BARE_OS_BOOT_TRACE`, `BARE_OS_KERNEL_PROGRAM_PROC_JSON`, `BARE_OS_GIANT_PHASE_PROGRAM_JSON`, `BARE_OS_KERNEL_SELFTEST`, `BARE_OS_SELFTEST_FORMAT`, `BARE_OS_AUDIT`, `BARE_OS_AUDIT_JSON`, `BARE_OS_AUDIT_REDACT`, `BARE_OS_IMAGE_DIGEST`, `BARE_OS_EXEC_MAX_DEPTH`, `BARE_OS_EXEC_LINE_BUDGET_MS`, `BARE_OS_IPC_MAX_BYTES`, `BARE_OS_IPC_CHANNEL_MAX_BYTES`, `BARE_OS_IPC_RPC_TOKEN`, `BARE_OS_IPC_FANOUT`, `BARE_OS_IPC_JSON_MAX_BYTES`, `BARE_OS_IPC_NAMESPACE`, `BARE_OS_VFS_WATCH`, `BARE_OS_VFS_UNION_PREFIXES`, `BARE_OS_VFS_UNION_WRITE_DENY`, `BARE_OS_VFS_HYPERBLOBS_DEDUP`, `BARE_OS_VFS_BIN_CACHE`, `BARE_OS_VFS_BIN_CACHE_BLAKE2B`, `BARE_OS_VFS_WARM_CACHE_INVALIDATE_ON_APPEND`, `BARE_OS_VFS_ENFORCE_ACL`, `BARE_OS_VFS_BIN_INDEX_BUILD`, `BARE_OS_VFS_SYSTEM_IMAGE_WRITE`, `BARE_OS_BOOT_ALLOWLIST`, `BARE_OS_BOOT_MANIFEST`, `BARE_OS_BOOT_MANIFEST_SIGN`, `BARE_OS_BOOT_MANIFEST_PUBKEY_HEX`, `BARE_OS_BOOT_POLICY`, `BARE_OS_BOOT_POLICY_STRICT`, `BARE_OS_LAZY_PERSONAL_DRIVE`, `BARE_OS_SYSTEM_REVISION_ID`, `BARE_OS_SYSTEM_REVISION_PENDING`, `BARE_OS_SYSTEM_SLOT`, `BARE_OS_DELEGATE_ALLOW`, `BARE_OS_DELEGATE_MAX_PER_MIN`, `BARE_OS_DELEGATE_MAX_CONCURRENT`, `BARE_OS_DELEGATE_GIT_MAX_PER_MIN`, `BARE_OS_DELEGATE_CURL_MAX_PER_MIN`, `BARE_OS_DELEGATE_WGET_MAX_PER_MIN`, `BARE_OS_DELEGATE_SYSTEMCTL_MAX_PER_MIN`, `BARE_OS_DELEGATE_GIT_MAX_CONCURRENT`, `BARE_OS_DELEGATE_CURL_MAX_CONCURRENT`, `BARE_OS_DELEGATE_WGET_MAX_CONCURRENT`, `BARE_OS_DELEGATE_SYSTEMCTL_MAX_CONCURRENT`, `BARE_OS_DELEGATE_AUDIT_ONLY`, `BARE_OS_DNS_ALLOWLIST`, `BARE_OS_KERNEL_HOT_RELOAD`, `BARE_OS_KERNEL_EXT_D_HOT_RELOAD`, `BARE_OS_SANDBOX_SCRIPT`, `BARE_OS_SANDBOX_WORKER`, `BARE_OS_INITD_MAX_PARALLEL`, `BARE_OS_INITD_JOURNAL_MAX_LINES`, `BARE_OS_URANDOM_CRYPTO`, `BARE_OS_TELEMETRY_NDJSON`, `BARE_OS_TELEMETRY_OTEL_JSONL`, `BARE_OS_PROC_POLL_MS`, `BARE_OS_TIMER_EVERY_MS_MONOTONIC`, `BARE_OS_TRACE_ID`, `BARE_OS_SEED_RPC_HANDSHAKE`, `BARE_OS_SEED_CAP_STRICT`, `BARE_OS_SEED_CAP_FAIL`, `BARE_OS_OFFLINE_LKG_BOOT`, `BARE_OS_LKG_SYSTEM_KEY_HEX`, `BARE_OS_HOST_STORAGE_JSON`, `BARE_OS_BOOT_POLICY_DENY_EXEC_LINE_BUILTINS`, `BARE_OS_BOOT_POLICY_ALLOWED_CTX_METHODS`, `BARE_OS_SUBPROCESS_BRIDGE_JOBS_JSON`, `BARE_OS_IPC_AUDIT`, `BARE_OS_HTTP_ALLOWLIST`, `BARE_OS_HTTP_DENYLIST`, `BARE_OS_TLS_PIN_SHA256`, `BARE_OS_BARE_MODULES`, `BARE_OS_BARE_DRIVE_BUNDLES`, `BARE_OS_PEAR_CHANNEL`, `BARE_OS_PEAR_RELEASE`, `PEAR_CHANNEL`, `BARE_OS_FIND_EXEC_MAX`, `BARE_OS_XARGS_MAX_PROCS`, `BARE_OS_YES_MAX_LINES`, `BARE_OS_SHUF_MAX_LINES`, `BARE_OS_SPLIT_MAX_FILES`, `BARE_OS_NPROC`, `BARE_OS_BLIND_BOOTSTRAP_URL`, `BARE_OS_BLIND_BOOTSTRAP_JSON`, `BARE_OS_MIRROR_READ_KEY`, `BARE_OS_PEER_FIREWALL_E2E_JSON`, `BARE_OS_PEAR_SECURE_ENCLAVE_JSON`, `BARE_OS_ACCOUNT_KEY_ROTATION_STATE_JSON`, `BARE_OS_PEAR_TRUST_JSON`, `BARE_OS_HOST_BUNDLE_EVALUATE`, `BARE_OS_WASM_KERNEL`, **`TERM`**, **`COLORTERM`**. *(Many additional operator JSON pointers and version pins are also copied from the same loop; see source.)*
- `BARE_OS_VFS_UNION_PREFIXES` — Booter / VFS — Comma-separated logical path prefixes where **`readFile`** may union system + overlay sources.
- `BARE_OS_VFS_UNION_WRITE_DENY` — Booter / VFS — When **`1`** / **`true`**, block **`writeFile`** / **`unlink`** on paths under union read prefixes (read-only union overlay).
@@ -81,6 +81,7 @@ The list below is one **bullet per variable** in the form **name — component
- `BARE_OS_HYPERBEE_GUEST_INDEX` — Booter / extensions — When **`1`** / **`true`**, **`ctx.bareOsHyperbeeGuestHint()`** documents optional **hyperbee2**-style guest indexes for P2P metadata (host/extension must supply the module; see [ADR-hyperbee-guest-index.md](../architecture/ADR-hyperbee-guest-index.md)).
- `BARE_OS_PEAR_INSPECT` — Booter — When **`1`** / **`true`**, emit **`bare-os:pear-inspect-snapshot`** on the host process after **`ctx`** is wired (non-secret snapshot only).
- `BARE_OS_VFS_BIN_INDEX_BUILD` — Booter — When **`1`** / **`true`**, writes **`/.bare-os/index/bin-manifest.json`** (**schema 2**, **`namesDigest`**) on the personal drive for large images (see **`bare-os-bin-index.js`**); **`bareOsVfsBatchWrite`** on **`bin/*`** rebuilds it when enabled.
- `BARE_OS_VFS_SYSTEM_IMAGE_WRITE` — Booter / VFS — When **`1`** / **`true`**, allow **`vfs.writeFile`** on the **system** Hyperdrive for paths that are normally read-only (**`/bin/*`**, **`/lib/*`**, …) so hosts can mutate the image or run warm-cache tests; default remains guest read-only. ACLs and **`/.bare`** guest rules still apply.
- `BARE_OS_BOOT_MANIFEST` — Stock kernel — Enable digest check of **`/etc/bare-os/boot.manifest.json`**.
- `BARE_OS_BOOT_MANIFEST_SIGN` — Stock kernel + booter — When **`1`**, require valid Ed25519 signature file **`/etc/bare-os/boot.manifest.sig`** (see **`BARE_OS_BOOT_MANIFEST_PUBKEY_HEX`**).
- `BARE_OS_BOOT_MANIFEST_PUBKEY_HEX` — Booter / kernel — 64 hex chars — public key for signed boot manifest verification.
@@ -139,6 +140,7 @@ The list below is one **bullet per variable** in the form **name — component
- `BARE_OS_AUTOPASS_INVITE_URL``/proc/bare_os/hdms_hints.json` — Optional operator invite URL hint (guest does not fetch it).
- `BARE_OS_BIN_WORKER_OFFLOAD`**`runBinCommand`** (Bare) — When **`1`** on **Bare** (not Node), may run **`awk`** / **`sed`** / **`jq`** in a **`bare-worker`** thread; falls back in-process on failure. With **`BARE_OS_BIN_WORKER_ALLOW`** (comma list) for future expansion (**`textproc:*`**, **`mathproc:*`**, **`mediaproc:*`**, **`sysproc:*`**, **`metaproc:*`**, … — see [kernel-extensions.md](kernel-extensions.md)).
- `BARE_OS_BIN_WORKER_CPU_MS_MAX` — Booter — Optional per-invocation CPU-time budget hint (ms) for **`bare-worker`** **`/bin`** offload; surfaced in operator metrics / worker budget snapshots.
- `BARE_OS_BIN_WORKER_WASM_MS_MAX` — Booter — When **> 0** (capped at **3_600_000**), stock **`bare-worker`** offload **`terminate()`**s the thread after that many milliseconds and returns **`{ ok: false, reason: 'wasm_time_budget' }`** to **`runBinCommand`** (falls back to in-process behavior).
- `BARE_OS_EXEC_LINE_BUDGET_MS` — Booter — Reject top-level **`execLine`** when cumulative wall time exceeds budget.
- `BARE_OS_DELEGATE_MAX_PER_MIN` — Host delegates — Global per-minute cap (sliding window) on delegate invocations.
- `BARE_OS_DELEGATE_*_MAX_PER_MIN` — Host delegates — Per-kind override (**`GIT`**, **`CURL`**, **`WGET`**, **`SYSTEMCTL`**).
@@ -161,7 +163,8 @@ The list below is one **bullet per variable** in the form **name — component
- `BARE_OS_MIRROR_READ_KEY` — Replication proc / mirror hint — Optional mirror drive key string included in replication snapshot for operators.
- `BARE_OS_PEAR_TRUST_JSON``/proc/bare_os/pear_trust.json` — Optional operator JSON merged into trust summary (guest does not verify multisig).
- `BARE_OS_HOST_BUNDLE_EVALUATE``ctx.bareOsHostCapability` — When **`1`**, advertise host **`bundleEvaluate`** for optional cross-worker / **`bare-bundle-evaluate`** paths (host-only).
- `BARE_OS_SHELL_PIPEFAIL` — Shell — When **`1`** / **`true`**, a pipelines exit status is the first failing stage (bash-like); default is POSIX-like **last stage** status only.
- `BARE_OS_SHELL_PIPEFAIL` — Shell — When **`1`** / **`true`**, or after **`set -o pipefail`**, a pipelines exit status is the first failing stage (bash-like); default is POSIX-like **last stage** status only.
- `BARE_OS_SHELL_PIPESTATUS` — Shell — When **`1`** / **`true`**, after each pipeline the space-separated stage exit codes are written to **`BARE_OS_PIPESTATUS`** in **`vfs.env`**.
- `BARE_OS_SHELL_ERREXIT` — Shell — When **`1`** / **`true`**, or after **`set -e`**, stop running further top-level **`;`**-separated commands once a foreground command returns non-zero (subset of POSIX **errexit**; **`if` / `while` / `for`** condition lists are not affected the same way as bash — see handbook ch.9).
- `BARE_OS_VFS_WARM_CACHE_INVALIDATE_ON_APPEND` — Booter — When **`1`** / **`true`**, register **`append`** listeners on the system Hyperdrive metadata and blob Hypercores (when present) to clear **`/bin`** / **`lib/bare`** warm read caches on replication (**offline-first** safety; may increase churn on busy drives).
- `BARE_OS_VFS_WARM_CACHE_PREFIX_INVALIDATE` — Booter — When **`1`** / **`true`**, evict warm-cache entries for **`/bin`**, **`/etc`**, **`/lib`**, **`/usr`**, and configured personal prefixes when replicated core lengths increase (see **`metrics_live.replicationLive.warmPrefixInvalidate`**).
@@ -241,7 +244,7 @@ The list below is one **bullet per variable** in the form **name — component
**Normative declared profile:** [POSIX_DECLARED_PROFILE.md](../architecture/POSIX_DECLARED_PROFILE.md) (version **`BARE_OS_POSIX_PROFILE_VERSION`** in `bare-os-protocol`).
- **Pear working directory** — Some Pear/Bare hosts expose **`process.cwd()`** as an empty string. The booters **[`packages/bare-os-booter/lib/paths.js`](../../packages/bare-os-booter/lib/paths.js)** falls back to **`bare-os` `os.cwd()`** when resolving **`packageRootDir`** and Corestore path helpers. **`ctx.bare`** manifest selection under **`pear://`** uses embedded **`bare-module-manifest.data.mjs`** (not host FS), so an empty **`process.cwd()`** does not block boot; see [PEAR-RUN.md](../../PEAR-RUN.md) and [Developer guide ch.12](../../developer-guide/12-bare-modules-and-pear-ecosystem.md).
- **Pear working directory** — Some Pear/Bare hosts expose **`process.cwd()`** as an empty string. The booters **[`packages/bare-os-booter/lib/paths.js`](../../packages/bare-os-booter/lib/paths.js)** falls back to **`bare-os` `os.cwd()`** when resolving **`packageRootDir`** and Corestore path helpers. **`ctx.bare`** manifest selection under **`pear://`** uses embedded **`bare-module-manifest.data.mjs`** (not host FS), so an empty **`process.cwd()`** does not block boot; see [PEAR-RUN.md](../PEAR-RUN.md) and [Developer guide ch.12](../../developer-guide/12-bare-modules-and-pear-ecosystem.md).
- **VFS** — Two-drive unified paths; **`$HOME`** maps to the personal Hyperdrive; writable mounts under **`/mnt`** when HDMS allows. **`mkdir`/`rmdir`**, **`chmod`** (octal + symbolic subset), **`symlink`/`readlink`**, **`stat`/`lstat`**, **`rm`** recursive, **`watch()`** on Hyperdrive paths (optional host **`BARE_OS_VFS_WATCH=0`** to disable). Synthetic **`/proc`**, **`/sys`**, **`/run`**, **`/dev`** for introspection (quotas JSON, boot JSON, initd snapshot, union policy, seed handshake, virtual registry, etc.); **`/dev/shm/<name>`** holds in-memory named segments (**`getconf _POSIX_SHARED_MEMORY_OBJECTS`** is **`1`**). Optional union read overlays (**`BARE_OS_VFS_UNION_PREFIXES`**) with optional write deny (**`BARE_OS_VFS_UNION_WRITE_DENY`**). Empty dirs use **`.bareos_empty`** (same idea as `git-fs-adapter`).
- **Proc budget** — Stock booter **caches** **`/proc/bare_os/syscalls.json`** text until **`vfs.bareOsClearWarmReadCaches()`** (shared invalidation with **`/bin`** / **`/lib/bare`** warm read cache, including **`bareOsVfsBatchWrite`** bin/lib puts).
+1 -1
View File
@@ -799,7 +799,7 @@ Second batch of the same governed program. Traceability: [developer-guide/kernel
| 88 | BARE_OS_DELEGATE_TRACE unified log format env | done |
| 89 | Machine-readable capability map JSON proc | done |
| 90 | Developer-guide cookbook pointer | done |
| 91 | kernel-program-benchmark-harness boot timings | done |
| 91 | kernel-program-benchmark-harness boot timings (`kernel_crypto_synthetic_benchmark` suite) | done |
| 92 | VFS microbench script stub | done |
| 93 | IPC ping-pong booter test augmentation | done |
| 94 | Network mock bench DNS/TCP policy path | done |
@@ -25,6 +25,6 @@ There is **no central broker**: topic membership and peer discovery follow Hyper
## See also
- [`PEAR-RUN.md`](../../PEAR-RUN.md) — channels and env
- [`PEAR-RUN.md`](../PEAR-RUN.md) — channels and env
- [`environment-and-posix-appendix.md`](environment-and-posix-appendix.md) — **`BARE_OS_SWARM_*`**
- [`docs/architecture/architecture-data-flow.md`](architecture-data-flow.md) — end-to-end replication sketch
+1 -1
View File
@@ -34,7 +34,7 @@ See also [Kernel subsystem map](../architecture/kernel-subsystems.md) and [ADR 0
### 12.2b Corestore / swarm suspendresume bridge
- **[`lib/corestore-host-lifecycle.js`](../../packages/bare-os-booter/lib/corestore-host-lifecycle.js)** — Registers one-shot hooks so guest **`ctx.bareOsRegisterSuspendHook`** / **`bareOsRegisterResumeHook`** call host **`corestore`** / **`hyperswarm`** **`suspend()`** / **`resume()`** when those methods exist (mobile sleep, Pear lifecycle). **`bareOsCorestoreSnapshotOperatorHint`** remains a documentation-only sketch (guest does not invoke **`corestore-snapshot`**).
- **[`lib/corestore-host-lifecycle.js`](../../packages/bare-os-booter/lib/corestore-host-lifecycle.js)** — Registers one-shot hooks so guest **`ctx.bareOsRegisterSuspendHook`** / **`bareOsRegisterResumeHook`** call host **`corestore`** / **`hyperswarm`** **`suspend()`** / **`resume()`** when those methods exist (mobile sleep, Pear lifecycle). **Non-goal (stock booter):** automatic **`corestore-snapshot`** / frozen peer images from the guest — operators replicate Hyperdrives via swarm + personal-drive export of keys when needed; **`bareOsCorestoreSnapshotOperatorHint`** in **`/proc`** is an advisory field only (no guest RPC that invokes **`corestore-snapshot`**).
### 12.3 [packages/bare-os-booter/index.js](../../packages/bare-os-booter/index.js)
+1 -1
View File
@@ -28,7 +28,7 @@ Enable with **`BARE_OS_POSIX_SOCKET_FD_BRIDGE=1`**. Requires **`ctx.bare`** to e
- **Ancillary control** on **`sendmsg`**: non-empty binary **`control`** / **`controllen`**, or malformed **`cmsgs`**, → **`ENOTSUP`** + **`ancillaryReject`**.
- **`recvmsg`**: **`controllen` 0**; **`msgHdr.name`** filled from UDP **`rinfo`** when present.
- **`BARE_OS_POSIX_SOCKET_SCM_RIGHTS=1`**: **`cmsgs`** and **`msgHdr.cmsgs`** may contain only objects **`{ fds: number[] }`** (logical SCM_RIGHTS). Each fd is duplicated; the syscall result includes **`scmRightsLocalDup: [{ from, to }]`**. Cap via **`BARE_OS_POSIX_SOCKET_SCM_RIGHTS_MAX_FDS`** (default **4**). Idle / listen / bound bridge sockets reject dup. **`shutdown`** refcount-per-alias destroys the underlying slot when the last fd closes. With this env set, the stock bridge implements **logical** fd duplication end-to-end (not host **`SCM_RIGHTS`**); without it, any non-empty ancillary payload remains **`ENOTSUP`** as documented in **`ancillaryControl`**.
- **`BARE_OS_POSIX_SOCKET_SCM_RIGHTS=1`**: **`cmsgs`** and **`msgHdr.cmsgs`** may contain only objects **`{ fds: number[] }`** (logical SCM_RIGHTS). Each fd is duplicated; the syscall result includes **`scmRightsLocalDup: [{ from, to }]`**. Cap via **`BARE_OS_POSIX_SOCKET_SCM_RIGHTS_MAX_FDS`** (default **4**, max **16**). Idle / listen / bound bridge sockets reject dup. **`shutdown`** refcount-per-alias destroys the underlying slot when the last fd closes. With this env set, the stock bridge implements **logical** fd duplication on **`sendmsg`** (same guest address space — not host **`SCM_RIGHTS`** over a real kernel boundary); **`recvmsg`** continues to return **`controllen: 0`** because ancillary data is not queued on datagrams. Without **`BARE_OS_POSIX_SOCKET_SCM_RIGHTS`**, any non-empty ancillary payload remains **`ENOTSUP`** as documented in **`ancillaryControl`**. Parser unit tests: **`packages/bare-os-booter/test.socket-scm-rights.js`**.
## TCP **`shutdown`** / half-close