feat(booter): default initd parallelism, cmdsubst, bin cache, telemetry NDJSON
This commit is contained in:
@@ -21,7 +21,7 @@ Authoritative **version alignment** with protocol and telemetry schema numbers l
|
||||
- `**baretop**`: optional `**ctx.bareOsReadBareTopSnapshot()**` in `[index.js](index.js)` returns `**{ atMs, files, metricsLiveText }**` (`**metricsLiveText**` = coalesced `**metrics_live**` JSON string) with the same `**files**` keys as `**BARE_TOP_SNAPSHOT_PROC_ENTRIES**` in `**packages/bare-os-coreutils/lib/baretop-snapshot.js**` — keep those lists in sync when adding operator `**/proc/bare_os**` nodes.
|
||||
- **hrpc allowlist**: shared parser in `[lib/bare-os-hrpc-allowlist.js](lib/bare-os-hrpc-allowlist.js)`; `**ctx.bareOsHrpcRequest**` and `**ctx.bareOsHrpcAllowlistProbe**` stay aligned. Host passthrough copies `**BARE_OS_HRPC_ALLOWLIST_JSON**`, `**BARE_OS_CORESTORE_SNAPSHOT_WORKFLOW_JSON**`, `**BARE_OS_BLIND_RELAY_TOPOLOGY_JSON**`, `**BARE_OS_MIRROR_DRIVE_COMPOSITION_HINT_JSON**`, `**BARE_OS_REPLICATION_PLAN_JSON**`, and pear-doctor env keys into session env.
|
||||
- **Snapshot hints**: `**ctx.bareOsReadSnapshotHintsJson()**` merges `**BARE_OS_CORESTORE_SNAPSHOT_WORKFLOW_JSON**` like `**/proc/bare_os/snapshot_hints.json**`.
|
||||
- **Pipeline / IPC / rlimits tuning** — Simulated pipeline capture honors **`BARE_OS_PIPELINE_ABS_MAX_BYTES`** / **`BARE_OS_PIPELINE_ABS_MAX_LINES`** (defaults **512 MiB** / **2 000 000** lines after the streaming multiplier). When the host leaves pipeline keys unset, the stock booter seeds **`BARE_OS_SHELL_STREAMING=1`**, **`BARE_OS_SHELL_STREAMING_MULT=2`**, **`BARE_OS_PIPELINE_MAX_BYTES`** (**512 MiB**), **`BARE_OS_PIPELINE_MAX_LINES`** (**2 000 000**). Host passthrough includes **`BARE_OS_IPC_MAX_CHANNELS`**, POSIX MQ defaults (**`BARE_OS_POSIX_MQ_MAX_MSGS`**, **`BARE_OS_POSIX_MQ_MSG_BYTES`**), **`BARE_OS_VFS_MAX_OPEN`** → **`/proc/bare_os/rlimits.json`** **`RLIMIT_NOFILE`**, and convenience aliases **`BARE_OS_STREAMING_MULTIPLIER`**, **`BARE_OS_TIMER_BUDGET_MS`**, **`BARE_OS_TELEMETRY_OTEL`**. See [environment appendix §14](../../docs/reference/environment-and-posix-appendix.md#14-environment-variables-complete-list) and [developer guide ch.11](../../developer-guide/11-kernel-pear-cookbook.md).
|
||||
- **Pipeline / IPC / rlimits tuning** — Simulated pipeline capture honors **`BARE_OS_PIPELINE_ABS_MAX_BYTES`** / **`BARE_OS_PIPELINE_ABS_MAX_LINES`** (defaults **512 MiB** / **2 000 000** lines after the streaming multiplier). When the host leaves pipeline keys unset, the stock booter seeds **`BARE_OS_SHELL_STREAMING=1`**, **`BARE_OS_SHELL_STREAMING_MULT=2`**, **`BARE_OS_PIPELINE_MAX_BYTES`** (**512 MiB**), **`BARE_OS_PIPELINE_MAX_LINES`** (**2 000 000**). When the host leaves **`BARE_OS_INITD_MAX_PARALLEL`**, **`BARE_OS_SHELL_CMDSUBST`**, **`BARE_OS_VFS_BIN_CACHE`**, and **`BARE_OS_TELEMETRY_NDJSON`** unset, the booter seeds **`4`**, **`1`**, **`1`**, and **`/var/log/bare-os/telemetry.ndjson`** respectively (**`BARE_OS_AUDIT`** / **`BARE_OS_AUDIT_JSON`** remain off unless set). Host passthrough includes **`BARE_OS_IPC_MAX_CHANNELS`**, POSIX MQ defaults (**`BARE_OS_POSIX_MQ_MAX_MSGS`**, **`BARE_OS_POSIX_MQ_MSG_BYTES`**), **`BARE_OS_VFS_MAX_OPEN`** → **`/proc/bare_os/rlimits.json`** **`RLIMIT_NOFILE`**, and convenience aliases **`BARE_OS_STREAMING_MULTIPLIER`**, **`BARE_OS_TIMER_BUDGET_MS`**, **`BARE_OS_TELEMETRY_OTEL`**. See [environment appendix §14](../../docs/reference/environment-and-posix-appendix.md#14-environment-variables-complete-list) and [developer guide ch.11](../../developer-guide/11-kernel-pear-cookbook.md).
|
||||
|
||||
## Context API (`bareOsCtxApiVersion`)
|
||||
|
||||
|
||||
@@ -846,6 +846,19 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
if (!trimDefault(shellEnv.BARE_OS_PIPELINE_MAX_LINES)) {
|
||||
shellEnv.BARE_OS_PIPELINE_MAX_LINES = String(2_000_000)
|
||||
}
|
||||
/** Initd parallelism, bounded $(…), /bin warm cache, telemetry NDJSON sink — on when host leaves keys unset (`BARE_OS_AUDIT*` stays off unless host sets). */
|
||||
if (!trimDefault(shellEnv.BARE_OS_INITD_MAX_PARALLEL)) {
|
||||
shellEnv.BARE_OS_INITD_MAX_PARALLEL = '4'
|
||||
}
|
||||
if (!trimDefault(shellEnv.BARE_OS_SHELL_CMDSUBST)) {
|
||||
shellEnv.BARE_OS_SHELL_CMDSUBST = '1'
|
||||
}
|
||||
if (!trimDefault(shellEnv.BARE_OS_VFS_BIN_CACHE)) {
|
||||
shellEnv.BARE_OS_VFS_BIN_CACHE = '1'
|
||||
}
|
||||
if (!trimDefault(shellEnv.BARE_OS_TELEMETRY_NDJSON)) {
|
||||
shellEnv.BARE_OS_TELEMETRY_NDJSON = '/var/log/bare-os/telemetry.ndjson'
|
||||
}
|
||||
}
|
||||
if (
|
||||
shellEnv.BARE_OS_HOLESAIL_INITD === undefined ||
|
||||
|
||||
Reference in New Issue
Block a user