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
+3 -2
View File
@@ -10,7 +10,7 @@ Normative narrative: [`docs/architecture/POSIX_DECLARED_PROFILE.md`](../architec
| --- | --- | --- |
| Profile | profileId | bare-os-posix-like |
| Profile | schema | 1 |
| Profile | note | Machine-readable summary; normative detail remains in handbook ch.9 and environment POSIX appendix. Profile 1.0.15 / syscalls schema 10: adds ctx.bareOsSyscall posix_fadvise simulated no-op; guest session read/write/chmod/unlink deny on /.bare/account and /.bare/vault/** (override BARE_OS_GUEST_BARE_READ_ALL); optional BARE_OS_PERSONAL_ACCT_PREFIX personal-drive layout; BARE_OS_PERSONAL_ROOT_MIGRATE + /.bare-os/migration/legacy-root-v1.json for safe legacy-root lift; BARE_OS_GUEST_SCRUB; vfs.replication_warm_full_invalidate metric; ctx.bareOsSyscall nanosleep-shaped delay; bridge getsockopt/setsockopt partial SO_KEEPALIVE/TCP_NODELAY when BARE_OS_POSIX_SOCKET_FD_BRIDGE; cooperative fcntl locks (optional BARE_OS_POSIX_FCNTL_BLOCKING_WAIT), SOCK_DGRAM passive bind via bareDgram; sendmsg/recvmsg partial; socketMsgSurface schema 4 (logicalScmRightsOnSend when BARE_OS_POSIX_SOCKET_SCM_RIGHTS); ctx.bareOsSyscall select mirrors pollClock when timeoutMs>0. BARE_OS_VFS_WARM_CACHE_INVALIDATE_ON_REPLICATION full warm flush on core-length growth; optional BARE_OS_VFS_WARM_REPL_ADAPTIVE_WINDOW_MS coalesces repeated full flushes; warm invalidation reasons containing replication increment vfs.warm_read_cache_invalidate_replication. Peer admission schema 2: BARE_OS_PEER_DENYLIST_HEX, BARE_OS_PEER_REQUIRE_CAPS_JSON (+ security_posture peerAdmission.requireCapsTokenCount), optional BARE_OS_PEER_ADMISSION_AUDIT_NDJSON (+ rate ms). Tier-1 /bin/test: -u -g -k when st.mode exposes setuid/setgid/sticky. Hyperswarm caps via BARE_OS_SWARM_MAX_* env. disk.os replication_operator_sketch schema 5 (BARE_OS_CORESTORE_STATS_JSON corestoreOperatorSketch). ctx API 1.51.0. Dynamic sysconf via ctx.bareOsGetconfSysconf. |
| Profile | note | Machine-readable summary; normative detail remains in handbook ch.9 and environment POSIX appendix. Profile 1.0.15 / syscalls schema 10: adds ctx.bareOsSyscall posix_fadvise simulated no-op; guest session read/write/chmod/unlink deny on /.bare/account and /.bare/vault/** (override BARE_OS_GUEST_BARE_READ_ALL); optional BARE_OS_PERSONAL_ACCT_PREFIX personal-drive layout; BARE_OS_PERSONAL_ROOT_MIGRATE + /.bare-os/migration/legacy-root-v1.json for safe legacy-root lift; BARE_OS_GUEST_SCRUB; vfs.replication_warm_full_invalidate metric; ctx.bareOsSyscall nanosleep-shaped delay; bridge getsockopt/setsockopt partial SO_KEEPALIVE/TCP_NODELAY when BARE_OS_POSIX_SOCKET_FD_BRIDGE; cooperative fcntl locks (optional BARE_OS_POSIX_FCNTL_BLOCKING_WAIT), SOCK_DGRAM passive bind via bareDgram; sendmsg/recvmsg partial; socketMsgSurface schema 5 (logicalScmRightsOnSend on SOCK_STREAM + SOCK_DGRAM when BARE_OS_POSIX_SOCKET_SCM_RIGHTS); ctx.bareOsSyscall select mirrors pollClock when timeoutMs>0. BARE_OS_VFS_WARM_CACHE_INVALIDATE_ON_REPLICATION full warm flush on core-length growth; optional BARE_OS_VFS_WARM_REPL_ADAPTIVE_WINDOW_MS coalesces repeated full flushes; warm invalidation reasons containing replication increment vfs.warm_read_cache_invalidate_replication. Peer admission schema 2: BARE_OS_PEER_DENYLIST_HEX, BARE_OS_PEER_REQUIRE_CAPS_JSON (+ security_posture peerAdmission.requireCapsTokenCount), optional BARE_OS_PEER_ADMISSION_AUDIT_NDJSON (+ rate ms). Tier-1 /bin/test: -u -g -k when st.mode exposes setuid/setgid/sticky. Hyperswarm caps via BARE_OS_SWARM_MAX_* env. disk.os replication_operator_sketch schema 5 (BARE_OS_CORESTORE_STATS_JSON corestoreOperatorSketch); replication_snapshot schema 2 (seed snapshot hints + BARE_OS_CORESTORE_SNAPSHOT_JSON). ctx API 1.51.1. Tier-1 nice (simulated niceness via BARE_OS_SIMULATED_NICE). Shell BARE_OS_SHELL_NOUNSET / set -u. Dynamic sysconf via ctx.bareOsGetconfSysconf. |
| Utilities | tier1_bin | high |
| Utilities | sed_awk_grep | issue7_inspired_js_engines |
| Utilities | coreutils | see packages/bare-os-coreutils/src |
@@ -20,6 +20,7 @@ Normative narrative: [`docs/architecture/POSIX_DECLARED_PROFILE.md`](../architec
| Shell | job_control | logical_jobs_only (jobControlModel logical_no_fork; no fork(2)); fg sets foregroundPgid; suspend-job + bg/fg cooperative yield between background statements; kill / bareOsSendSignal negative target = pgid on shellBackgroundJobs; wait skips completed jobs by default |
| Shell | loop_control | BARE_OS_SHELL_LOOP_CONTROL for break continue in while for |
| Shell | errexit | BARE_OS_SHELL_ERREXIT / set -e or set -o errexit (+e / +o errexit to clear) stops further semicolon lists inside if-then/else and loop bodies; top-level ;-separated statements; condition lists in if/while suppress errexit between predicates |
| Shell | nounset | BARE_OS_SHELL_NOUNSET / set -u or set -o nounset (+u / +o nounset to clear) errors on expansion of unset parameters (except $? and positional digits when absent treated as unbound only if env key missing) |
| VFS | guest_sensitive_bare | guest session: EACCES/ENOENT on /.bare/account, /.bare/vault/**, vault-rotation NDJSON; readdir /.bare hides account and vault names; BARE_OS_GUEST_BARE_READ_ALL=1 lifts deny |
| VFS | personal_acct_prefix | BARE_OS_PERSONAL_ACCT_PREFIX=1 nests /.bare-os/home\|tmp\|var/log under /.bare-os/acct/<id>/; logical /.bare/account and /.bare/vault map to /.bare-os/acct/<id>/.bare/ on the personal drive |
| VFS | fifo | in_memory_ipc_under_run; ctx.bareOsSyscall mq_open/mq_send/mq_receive maps to bareOsIpc POSIX-like priority queues (separate from FIFO byte streams) |
@@ -30,4 +31,4 @@ Normative narrative: [`docs/architecture/POSIX_DECLARED_PROFILE.md`](../architec
| synthetic /proc | syscalls_json_schema | 10 |
| synthetic /proc | process_table_schema | 7 |
| synthetic /proc | paths | /proc/bare_os/syscalls.json, /proc/bare_os/process_table.json |
| synthetic /proc | posix_xsh_surface | open,close,read,write,readv,writev,getsockopt,setsockopt,lseek,nanosleep,clock_gettime,posix_fadvise,pipe,dup,dup2,fcntl cooperative F_GETLK/F_SETLK/F_SETLKW + F_GETFL/F_SETFL,poll,select,umask,fsync,fdatasync,socket,bind,listen,accept,connect,send,recv,recvfrom,sendmsg,recvmsg,shutdown in syscalls.json posixXsh.namesCsv; ctx.bareOsSyscall nanosleep; ctx.bareOsSyscall clock_gettime; ctx.bareOsSyscall posix_fadvise; ctx.bareOsSyscall fsync/fdatasync no-op; bridge getsockopt/setsockopt partial SO_KEEPALIVE/TCP_NODELAY; default socket ENOSYS-shaped without bridge; BARE_OS_POSIX_SOCKET_FD_BRIDGE SOCK_STREAM connect via bareTcp; passive SOCK_STREAM bind+listen+accept via bareTcp.Server; stream fds use send/recv with bounded tcpRecvQueue (connect and accept paths); TCP half-close: shutdown how 0/1 (SHUT_RD/SHUT_WR), default how 2 full close; recv EOF after peer FIN; send EPIPE after local SHUT_WR; poll readable on queued TCP data, peer FIN/EOF, or socket error; poll writable when SHUT_WR not set; SOCK_DGRAM passive bind via bareDgram.Socket.bind, connect optional after bind, send with explicit port+host when udp_bound without default peer; connect+send path unchanged; BARE_OS_POSIX_DGRAM_RECVQ_MAX / BARE_OS_POSIX_DGRAM_RECV_BLOCK_MS_MAX; BARE_OS_POSIX_ACCEPT_QUEUE_MAX; poll/select mark UDP bridge fds (connected or udp_bound) readable when dgram queue non-empty; listening fds when accept queue non-empty; ctx.bareOsSyscall readv/writev on POSIX_FD_SIM pipes; ctx.bareOsPosixPoll; socketMsgSurface schema 4 + optional BARE_OS_POSIX_SOCKET_SCM_RIGHTS logical fd dup on sendmsg (recvmsg controllen 0) |
| synthetic /proc | posix_xsh_surface | open,close,read,write,readv,writev,getsockopt,setsockopt,lseek,nanosleep,clock_gettime,posix_fadvise,pipe,dup,dup2,fcntl cooperative F_GETLK/F_SETLK/F_SETLKW + F_GETFL/F_SETFL,poll,select,umask,fsync,fdatasync,socket,bind,listen,accept,connect,send,recv,recvfrom,sendmsg,recvmsg,shutdown in syscalls.json posixXsh.namesCsv; ctx.bareOsSyscall nanosleep; ctx.bareOsSyscall clock_gettime; ctx.bareOsSyscall posix_fadvise; ctx.bareOsSyscall fsync/fdatasync no-op; bridge getsockopt/setsockopt partial SO_KEEPALIVE/TCP_NODELAY; default socket ENOSYS-shaped without bridge; BARE_OS_POSIX_SOCKET_FD_BRIDGE SOCK_STREAM connect via bareTcp; passive SOCK_STREAM bind+listen+accept via bareTcp.Server; stream fds use send/recv with bounded tcpRecvQueue (connect and accept paths); TCP half-close: shutdown how 0/1 (SHUT_RD/SHUT_WR), default how 2 full close; recv EOF after peer FIN; send EPIPE after local SHUT_WR; poll readable on queued TCP data, peer FIN/EOF, or socket error; poll writable when SHUT_WR not set; SOCK_DGRAM passive bind via bareDgram.Socket.bind, connect optional after bind, send with explicit port+host when udp_bound without default peer; connect+send path unchanged; BARE_OS_POSIX_DGRAM_RECVQ_MAX / BARE_OS_POSIX_DGRAM_RECV_BLOCK_MS_MAX; BARE_OS_POSIX_ACCEPT_QUEUE_MAX; poll/select mark UDP bridge fds (connected or udp_bound) readable when dgram queue non-empty; listening fds when accept queue non-empty; ctx.bareOsSyscall readv/writev on POSIX_FD_SIM pipes; ctx.bareOsPosixPoll; socketMsgSurface schema 5 + optional BARE_OS_POSIX_SOCKET_SCM_RIGHTS logical fd dup on sendmsg for SOCK_STREAM and SOCK_DGRAM bridge fds (recvmsg controllen 0) |