feat(bare-os): kernel wave 3 — bits3, seed RPCs, policy, proc, CI schemas

Add third capability word (STOCK_V3) and word2 tail bits; seed RPCs
snapshot_hints and peer_firewall_stats; /proc mirrors (snapshot_hints,
pear_trust, rlimits, hdms_health, initd_graph) and /proc/net/udp; boot
policy v3 (requireFeatureBits2/3, Pear IPC allowlist, VFS deny prefixes,
initd restart cap); VFS enforcement for boot-policy path denies; delegate
in-flight caps; gated shell local/declare; initd path conditions, ordered
suspend/resume, OnInactiveSec timers; vfs.watch swarm/replication;
validate-example-schemas.mjs + ajv in pretest; extend verify-ctx for V3;
bump ctx API to 1.12.0; ADR 001, protocol, handbook, dev-guide, and
reference docs; seeder/kernel parity and booter tests.

Chore: Prettier table alignment in CHANGELOG and READMEs; compact
bareOsRequestPearReload signature in bare-os-ctx.d.ts.
This commit is contained in:
Raven Scott
2026-04-04 02:34:21 -04:00
parent 2919f606ce
commit de176addd9
56 changed files with 2358 additions and 1046 deletions
+45
View File
@@ -0,0 +1,45 @@
#!/usr/bin/env node
/**
* Validate representative JSON examples under kernel/etc/bare-os/ against docs/schemas.
*/
import Ajv2020 from 'ajv/dist/2020.js'
import fs from 'node:fs'
import path from 'node:path'
import process from 'node:process'
import { fileURLToPath } from 'node:url'
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')
const ajv = new Ajv2020({ strict: false, allErrors: true })
const pairs = [
[
'kernel/etc/bare-os/boot.policy.example.json',
'docs/schemas/boot.policy.schema.json'
],
[
'kernel/etc/bare-os/boot-trace-line.example.json',
'docs/schemas/boot-trace-line.schema.json'
],
[
'kernel/etc/bare-os/telemetry-ndjson.example.json',
'docs/schemas/telemetry-ndjson-record.schema.json'
]
]
function main() {
for (const [dataRel, schemaRel] of pairs) {
const dataPath = path.join(root, dataRel)
const schemaPath = path.join(root, schemaRel)
const data = JSON.parse(fs.readFileSync(dataPath, 'utf8'))
const schema = JSON.parse(fs.readFileSync(schemaPath, 'utf8'))
const validate = ajv.compile(schema)
if (!validate(data)) {
console.error('validate-example-schemas: failed', dataRel)
console.error(validate.errors)
process.exit(1)
}
console.log('validate-example-schemas:', dataRel, 'OK')
}
}
main()