When the host leaves these unset, the booter now sets
BARE_OS_SHELL_STREAMING=1, BARE_OS_SHELL_STREAMING_MULT=2, BARE_OS_PIPELINE_MAX_BYTES (512 MiB), and BARE_OS_PIPELINE_MAX_LINES (2M) so the high-throughput ~512 MiB burst profile does not require pre-launch exports. Align getconf Tier-1 statics with those bases; note legacy rc.profile exports; refresh handbook, environment appendix, cookbook, and bare-os-booter CHANGELOG.
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). 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**). 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`)
|
||||
|
||||
|
||||
@@ -831,6 +831,22 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
shellEnv.COLORTERM = String(hostEnv.COLORTERM)
|
||||
}
|
||||
}
|
||||
{
|
||||
const trimDefault = (x) => (x == null ? '' : String(x).trim())
|
||||
/** Stock ~512 MiB burst profile when the host leaves pipeline env unset (override any key from host). */
|
||||
if (!trimDefault(shellEnv.BARE_OS_SHELL_STREAMING)) {
|
||||
shellEnv.BARE_OS_SHELL_STREAMING = '1'
|
||||
}
|
||||
if (!trimDefault(shellEnv.BARE_OS_SHELL_STREAMING_MULT)) {
|
||||
shellEnv.BARE_OS_SHELL_STREAMING_MULT = '2'
|
||||
}
|
||||
if (!trimDefault(shellEnv.BARE_OS_PIPELINE_MAX_BYTES)) {
|
||||
shellEnv.BARE_OS_PIPELINE_MAX_BYTES = String(512 * 1024 * 1024)
|
||||
}
|
||||
if (!trimDefault(shellEnv.BARE_OS_PIPELINE_MAX_LINES)) {
|
||||
shellEnv.BARE_OS_PIPELINE_MAX_LINES = String(2_000_000)
|
||||
}
|
||||
}
|
||||
if (
|
||||
shellEnv.BARE_OS_HOLESAIL_INITD === undefined ||
|
||||
shellEnv.BARE_OS_HOLESAIL_INITD === ''
|
||||
|
||||
@@ -239,6 +239,11 @@ export function buildBareOsRuntimeCaps(shellEnv, extra = {}) {
|
||||
maxStages: pl.maxStages,
|
||||
maxBytes: pl.maxBytes,
|
||||
maxLines: pl.maxLines,
|
||||
baseMaxBytes: pl.baseMaxBytes,
|
||||
baseMaxLines: pl.baseMaxLines,
|
||||
absCapBytes: pl.absCapBytes,
|
||||
absCapLines: pl.absCapLines,
|
||||
streamingEnabled: pl.streamingEnabled === true,
|
||||
defaults: Object.freeze({
|
||||
maxStages: DEFAULT_PIPELINE_MAX_STAGES,
|
||||
maxBytes: DEFAULT_PIPELINE_MAX_CAPTURE_BYTES,
|
||||
|
||||
@@ -319,14 +319,24 @@ export function getBareOsPipelineLimits(env) {
|
||||
'BARE_OS_PIPELINE_MAX_LINES',
|
||||
DEFAULT_PIPELINE_MAX_CAPTURE_LINES
|
||||
)
|
||||
const effectiveBytes = Math.floor(baseBytes * mult)
|
||||
const effectiveLines = Math.floor(baseLines * mult)
|
||||
return {
|
||||
maxStages: parse(
|
||||
'BARE_OS_PIPELINE_MAX_STAGES',
|
||||
DEFAULT_PIPELINE_MAX_STAGES
|
||||
),
|
||||
maxBytes: Math.min(Math.floor(baseBytes * mult), absMaxBytes),
|
||||
maxLines: Math.min(Math.floor(baseLines * mult), absMaxLines),
|
||||
streamingMultiplier: mult
|
||||
maxBytes: Math.min(effectiveBytes, absMaxBytes),
|
||||
maxLines: Math.min(effectiveLines, absMaxLines),
|
||||
streamingMultiplier: mult,
|
||||
/** True when `BARE_OS_SHELL_STREAMING` relaxes caps via multiplier. */
|
||||
streamingEnabled: streamOn,
|
||||
/** Parsed `BARE_OS_PIPELINE_MAX_*` before multiplier (for operator snapshots). */
|
||||
baseMaxBytes: baseBytes,
|
||||
baseMaxLines: baseLines,
|
||||
/** Hard ceilings after multiplier (`BARE_OS_PIPELINE_ABS_MAX_*`; defaults 512 MiB / 2 M lines). */
|
||||
absCapBytes: absMaxBytes,
|
||||
absCapLines: absMaxLines
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user