feat: POSIX/P2P roadmap — proc surfaces, syscalls, boot perf, docs, CI

- Align posix-conformance-matrix bareOsSyscallOps with getconf BARE_OS_SYSCALL_OPS
- Add verify-boot-policy-extension-signer-pins.mjs to pretest; document in scripts/README
- Document extensionSignerPinsV2–V5 env wiring in OTA_AND_BUNDLES; vault multisig sketch
- Note telemetry NDJSON redaction limits in environment appendix
- Expand booter CHANGELOG 1.40.0 (boot-perf, shell POSIX mode, subprocess errors, etc.)
- Holepunch sync README: NDJSON summary path

Seeder/kernel parity and pretest already green for bundled changes.
This commit is contained in:
Raven Scott
2026-04-05 00:02:23 -04:00
parent 16ac71815f
commit 1faf9715b7
67 changed files with 2645 additions and 577 deletions
+43 -5
View File
@@ -91,7 +91,7 @@ function bareOsEmitRaw(ctx, chunk) {
* Bounded xargs for Bare OS: invokes ctx.runBinCommand only (no host spawn).
* Limits: stdin 256KiB, 4096 whitespace/null tokens, 128 args per invocation,
* 64 invocations per run. Exceeding limits is a fatal error (exit 125).
* Supports -0/--null, -n, -I repl (replace repl in utility argv; implies -n 1 unless -n given).
* Supports -0/--null, -n, -L (lines per invocation; mutually exclusive with -n), -I repl (replace repl in utility argv; implies -n 1 unless -n given).
* -P N runs up to N batches in parallel (each batch uses a shallow ctx clone so exitCode does not race).
* Max -P is min(requested, BARE_OS_XARGS_MAX_PROCS env, 32); default cap 8 when env unset.
*/
@@ -128,6 +128,8 @@ async function run(ctx, argv) {
/** @type {string | null} */
let repl = null
let nExplicit = false
/** @type {number | null} */
let linesPerInv = null
const envPCap = maxParallelFromEnv(ctx)
let pCap = 1
let i = 0
@@ -200,6 +202,23 @@ async function run(ctx, argv) {
i++
continue
}
if (a === '-L' || a === '--max-lines') {
const n = args[i + 1]
if (n == null || !/^\d+$/.test(n) || Number(n) < 1) {
ctx.console.error('xargs: -L requires a positive integer')
ctx.exitCode = 1
return
}
linesPerInv = Math.min(Number(n), MAX_PER_INVOCATION)
i += 2
continue
}
if (a.startsWith('-L') && a.length > 2 && /^\d+$/.test(a.slice(2))) {
const n = Number(a.slice(2))
linesPerInv = Math.min(n, MAX_PER_INVOCATION)
i++
continue
}
if (a === '-I' || a === '-i') {
repl = args[i + 1] != null ? String(args[i + 1]) : '{}'
i += 2
@@ -220,7 +239,7 @@ async function run(ctx, argv) {
ctx.console.error(
'xargs: Bare OS supports: -0/--null, -n N (max ' +
MAX_PER_INVOCATION +
' per run), -I repl, -P N (parallel batches, cap ' +
' per run), -L N (lines per invocation), -I repl, -P N (parallel batches, cap ' +
envPCap +
')'
)
@@ -228,6 +247,12 @@ async function run(ctx, argv) {
return
}
if (linesPerInv != null && nExplicit) {
ctx.console.error('xargs: -L cannot be combined with -n')
ctx.exitCode = 1
return
}
/** @type {string[]} */
let cmd = args.slice(i)
if (cmd.length === 0) cmd = ['echo']
@@ -243,7 +268,19 @@ async function run(ctx, argv) {
/** @type {string[]} */
let pieces
if (nullSep) {
if (linesPerInv != null) {
if (nullSep) {
pieces = text.split('\0').filter((s) => s.length > 0)
} else {
const raw = text.replace(/\r\n/g, '\n')
pieces =
raw.length === 0
? []
: raw.endsWith('\n')
? raw.slice(0, -1).split('\n')
: raw.split('\n')
}
} else if (nullSep) {
pieces = text.split('\0').filter((s) => s.length > 0)
} else {
pieces = text.trim() === '' ? [] : text.trim().split(/\s+/).filter(Boolean)
@@ -286,7 +323,8 @@ async function run(ctx, argv) {
/** @type {string[][]} */
const batches = []
for (let o = 0; o < pieces.length; o += maxBatch) {
const step = linesPerInv != null ? linesPerInv : maxBatch
for (let o = 0; o < pieces.length; o += step) {
if (batches.length >= MAX_INVOCATIONS) {
ctx.console.error(
'xargs: exceeded ' + MAX_INVOCATIONS + ' invocations (Bare OS limit)'
@@ -294,7 +332,7 @@ async function run(ctx, argv) {
ctx.exitCode = 125
return
}
batches.push(pieces.slice(o, o + maxBatch))
batches.push(pieces.slice(o, o + step))
}
if (pCap <= 1) {