- Unify pear.multisig.json validation via bare-os-protocol + kernel boot fragment - Socket bridge: SCM_RIGHTS path, ancillary handling, TCP half-close/shutdown how, connect tcpRecvQueue + poll/recv EOF and EPIPE-shaped errors - Bin manifest / Hyperbee hints schema 2 + namesDigest; batch-write invalidation - Host booter structured logging; BOOT_PERF_DETAIL bare_stdlib_merge_ns timing - Wasm kernel optional syscall imports; security_posture rotation hints schema 2 - Shell errexit inside compound bodies; expand getconf/_SC_* and bareOsGetconfSysconf - Subprocess bridge snapshot timeoutPolicy; blind-relay protomux backpressure tests - Pear updater minimal delegate example + verify-pear scan; holepunch drift repos - Refresh handbook, kernel-image, syscall-socket-contract, posix matrix, PEAR-RUN Rebuild coreutils/bundles; bundle kernel; keep seeder/kernel parity.
16 lines
642 B
JavaScript
16 lines
642 B
JavaScript
/**
|
|
* Shared shape check for `/etc/bare-os/pear.multisig.json` (seeder hint + guest kernel.ext gate).
|
|
* No cryptography — validates `{ signers: string[], quorum: number }` only.
|
|
* @param {unknown} parsed
|
|
* @returns {boolean}
|
|
*/
|
|
export function pearMultisigShapeOk(parsed) {
|
|
if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) return false
|
|
const o = /** @type {{ signers?: unknown; quorum?: unknown }} */ (parsed)
|
|
const signers = o.signers
|
|
const quorum = o.quorum
|
|
if (!Array.isArray(signers) || typeof quorum !== 'number') return false
|
|
if (quorum < 1 || quorum > signers.length) return false
|
|
return true
|
|
}
|