feat(booter): complete P2P POSIX roadmap items and doc alignment

- ADRs under docs/adr/; KERNEL_CONTRACT + env appendix + handbook updates
- socketMsgSurface schema 5; replication_snapshot schema 2; syscall/example + tests
- MBR pacing docs/microbench; export mbrReadTimeoutMsForDisk; shell passthrough envs
- verify-ctx-api-feature-bits: syscall schema vs posix-compliance-matrix
- Wasm hostname import, disk.os snapshot hints, kernel-ext resolution docs
- coreutils nice + matrix/dashboard; syscalls.example ctxApiVersion 1.51.1
- Seeder kernel rsync parity; assorted booter/protocol doc fixes
This commit is contained in:
Raven Scott
2026-04-05 15:04:59 -04:00
parent 39dbf0f1be
commit 169df862f7
62 changed files with 1584 additions and 509 deletions
@@ -81,6 +81,7 @@ export const COREUTILS_COMMANDS = [
'mount',
'mv',
'nano',
'nice',
'nl',
'nohup',
'nproc',
@@ -0,0 +1,21 @@
{
"name": "nice",
"section": 1,
"title": "invoke a utility with an altered scheduling priority (simulated)",
"synopsis": [
"nice [-n increment] utility [argument...]"
],
"description": "Bare OS implementation: records BARE_OS_SIMULATED_NICE on the session env and runs the utility via ctx.runBinCommand. The host JavaScript runtime does not change OS niceness; scripts use this for POSIX script compatibility.",
"options": [],
"keywords": [
"nice",
"bare-os",
"coreutils"
],
"examples": [
{
"caption": "run with default increment",
"code": "nice make"
}
]
}
+39
View File
@@ -0,0 +1,39 @@
async function run(ctx, argv) {
let inc = 10
let i = 1
if (argv[i] === '-n') {
const n = Number.parseInt(String(argv[i + 1] ?? ''), 10)
if (!Number.isFinite(n) || n < 0 || n > 39) {
ctx.console.error('nice: invalid adjustment')
ctx.exitCode = 125
return
}
inc = n
i += 2
} else if (argv[i] && /^-\d+$/.test(argv[i])) {
const n = Number.parseInt(argv[i].slice(1), 10)
if (!Number.isFinite(n) || n < 0 || n > 39) {
ctx.console.error('nice: invalid adjustment')
ctx.exitCode = 125
return
}
inc = n
i++
}
const cmd = argv.slice(i)
if (!cmd.length) {
ctx.console.error('usage: nice [-n increment] utility [argument...]')
ctx.exitCode = 125
return
}
if (typeof ctx.runBinCommand !== 'function') {
ctx.console.error('nice: runBinCommand is not available')
ctx.exitCode = 125
return
}
const env = ctx.vfs?.env
if (env && typeof env === 'object') {
env.BARE_OS_SIMULATED_NICE = String(inc)
}
await ctx.runBinCommand(cmd)
}