Align Bare OS with Holepunch stack across runtime, P2P, storage, trust, and ops surfaces
Implement the 50-point Holepunch alignment roadmap with a first-pass delivery across coreutils commands, policy examples, audit tooling, and docs. This adds new operator CLIs (appctl/corestorectl/ctxbaredoctor/dhtctl/trustctl), tiered catalog and runtime-compat reports, release-checklist integration, contributor guidance, and kernel/seeder mirrored artifacts for app registry, trust, network services, corestore namespaces, and update manifest workflows.
This commit is contained in:
@@ -320,6 +320,18 @@ Writes **[`docs/audit/holepunch-clone-sync-report.json`](../docs/audit/holepunch
|
||||
|
||||
Compares hoisted **`package-lock.json`** versions (**`node_modules/<pkg>`**) against **`lockfilePackages`** in **[`docs/audit/holepunch-drift-repos.json`](../docs/audit/holepunch-drift-repos.json)** and local clone **`package.json`** versions. Writes **[`docs/audit/holepunch-lockfile-drift.json`](../docs/audit/holepunch-lockfile-drift.json)** and **`holepunch-lockfile-drift-summary.ndjson`**, plus a maintainer-readable Markdown table **[`docs/audit/holepunch-lockfile-drift-dashboard.md`](../docs/audit/holepunch-lockfile-drift-dashboard.md)**. Informational only (not a failing CI gate).
|
||||
|
||||
## `report-holepunch-runtime-compat.mjs`
|
||||
|
||||
**Usage:** `node scripts/report-holepunch-runtime-compat.mjs` (also **`npm run report:holepunch-runtime-compat`**)
|
||||
|
||||
Compares booter dependency ranges against local mirror versions for the runtime spine (`bare-runtime`, `bare-module`, `bare-fs`, `bare-net`, `hypercore`, `corestore`, `hyperdrive`, `hyperdht`, `hyperswarm`, `pear`, `pear-runtime`). Writes **[`docs/audit/holepunch-runtime-compat.json`](../docs/audit/holepunch-runtime-compat.json)**. Uses **`BARE_OS_HOLEPUNCH_CLONES_ROOT`** (default **`~/dev/pearcli/holepunch-repos/holepunchto_repos`**).
|
||||
|
||||
## `gen-holepunch-catalog-tiers.mjs`
|
||||
|
||||
**Usage:** `node scripts/gen-holepunch-catalog-tiers.mjs` (also **`npm run gen:bare-catalog:tiers`**)
|
||||
|
||||
Derives category views from **[`docs/bare-holepunch-catalog.json`](../docs/bare-holepunch-catalog.json)** into **[`docs/audit/holepunch-catalog-tiers.json`](../docs/audit/holepunch-catalog-tiers.json)** with buckets for runtime-critical, storage-critical, network-critical, pear-lifecycle, gui-mobile, and experimental repos.
|
||||
|
||||
## `audit-placeholder-baseline.mjs`
|
||||
|
||||
**Usage:** `npm run audit:placeholder-baseline` (regenerate JSON) · `npm run audit:placeholder-baseline:check` (root **`pretest`**)
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
#!/usr/bin/env node
|
||||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')
|
||||
const catalogPath = path.join(root, 'docs/bare-holepunch-catalog.json')
|
||||
const outPath = path.join(root, 'docs/audit/holepunch-catalog-tiers.json')
|
||||
|
||||
function classify(repo) {
|
||||
const r = String(repo || '').toLowerCase()
|
||||
if (
|
||||
r.startsWith('pear') ||
|
||||
r.includes('pear-runtime') ||
|
||||
r.includes('pear-ipc')
|
||||
) {
|
||||
return 'pear-lifecycle'
|
||||
}
|
||||
if (
|
||||
r.includes('hyperdht') ||
|
||||
r.includes('hyperswarm') ||
|
||||
r.includes('protomux') ||
|
||||
r.includes('udx') ||
|
||||
r.includes('dht')
|
||||
) {
|
||||
return 'network-critical'
|
||||
}
|
||||
if (
|
||||
r.includes('hypercore') ||
|
||||
r.includes('corestore') ||
|
||||
r.includes('hyperdrive') ||
|
||||
r.includes('hyperbee') ||
|
||||
r.includes('autobase')
|
||||
) {
|
||||
return 'storage-critical'
|
||||
}
|
||||
if (r.includes('gtk') || r.includes('web-kit') || r.includes('native')) {
|
||||
return 'gui-mobile'
|
||||
}
|
||||
if (r.startsWith('bare-')) return 'runtime-critical'
|
||||
return 'experimental'
|
||||
}
|
||||
|
||||
function main() {
|
||||
if (!fs.existsSync(catalogPath)) {
|
||||
console.error('gen-holepunch-catalog-tiers: missing', catalogPath)
|
||||
process.exit(1)
|
||||
}
|
||||
const catalog = JSON.parse(fs.readFileSync(catalogPath, 'utf8'))
|
||||
const entries = Array.isArray(catalog.entries) ? catalog.entries : []
|
||||
const tiers = {
|
||||
'runtime-critical': [],
|
||||
'storage-critical': [],
|
||||
'network-critical': [],
|
||||
'pear-lifecycle': [],
|
||||
'gui-mobile': [],
|
||||
experimental: []
|
||||
}
|
||||
for (const e of entries) {
|
||||
const repo = String(e?.repo || '').trim()
|
||||
if (!repo) continue
|
||||
const tier = classify(repo)
|
||||
tiers[tier].push({
|
||||
repo,
|
||||
npmPublished: Boolean(e.npmPublished),
|
||||
npmVersion: e.npmVersion || null,
|
||||
includedInBooter: Boolean(e.includedInBooter)
|
||||
})
|
||||
}
|
||||
for (const key of Object.keys(tiers)) {
|
||||
tiers[key].sort((a, b) => String(a.repo).localeCompare(String(b.repo)))
|
||||
}
|
||||
const out = {
|
||||
schema: 1,
|
||||
generatedAt: new Date().toISOString(),
|
||||
sourceCatalog: path.relative(root, catalogPath),
|
||||
tiers
|
||||
}
|
||||
fs.mkdirSync(path.dirname(outPath), { recursive: true })
|
||||
fs.writeFileSync(outPath, JSON.stringify(out, null, 2) + '\n', 'utf8')
|
||||
console.log('gen-holepunch-catalog-tiers: wrote', path.relative(root, outPath))
|
||||
}
|
||||
|
||||
main()
|
||||
@@ -37,6 +37,10 @@ console.log(
|
||||
run('npm', ['run', 'audit:placeholder-baseline'])
|
||||
console.log('[release-checklist] report-holepunch-lockfile-drift')
|
||||
run('node', ['scripts/report-holepunch-lockfile-drift.mjs'])
|
||||
console.log('[release-checklist] report-holepunch-runtime-compat')
|
||||
run('node', ['scripts/report-holepunch-runtime-compat.mjs'])
|
||||
console.log('[release-checklist] gen-holepunch-catalog-tiers')
|
||||
run('node', ['scripts/gen-holepunch-catalog-tiers.mjs'])
|
||||
console.log(
|
||||
'[release-checklist] verify-holepunch-clone-drift (BARE_OS_HOLEPUNCH_DRIFT_CHECK=0 to skip; empty repos[] is no-op)'
|
||||
)
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
#!/usr/bin/env node
|
||||
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 booterPkgPath = path.join(root, 'packages/bare-os-booter/package.json')
|
||||
const outPath = path.join(root, 'docs/audit/holepunch-runtime-compat.json')
|
||||
const mirrorRoot = String(
|
||||
process.env.BARE_OS_HOLEPUNCH_CLONES_ROOT ||
|
||||
path.join(process.env.HOME || '', 'dev/pearcli/holepunch-repos/holepunchto_repos')
|
||||
).trim()
|
||||
|
||||
const CORE_REPOS = [
|
||||
'bare-runtime',
|
||||
'bare-module',
|
||||
'bare-fs',
|
||||
'bare-net',
|
||||
'hypercore',
|
||||
'corestore',
|
||||
'hyperdrive',
|
||||
'hyperdht',
|
||||
'hyperswarm',
|
||||
'pear',
|
||||
'pear-runtime'
|
||||
]
|
||||
|
||||
function readJson(p, fallback = null) {
|
||||
try {
|
||||
return JSON.parse(fs.readFileSync(p, 'utf8'))
|
||||
} catch {
|
||||
return fallback
|
||||
}
|
||||
}
|
||||
|
||||
function main() {
|
||||
const booterPkg = readJson(booterPkgPath, {})
|
||||
const deps = {
|
||||
...(booterPkg.dependencies || {}),
|
||||
...(booterPkg.optionalDependencies || {})
|
||||
}
|
||||
const rows = CORE_REPOS.map((repo) => {
|
||||
const clonePkgPath = path.join(mirrorRoot, repo, 'package.json')
|
||||
const clonePkg = readJson(clonePkgPath, {})
|
||||
const cloneVersion = String(clonePkg?.version || '').trim()
|
||||
const depRange = String(deps[repo] || '').trim()
|
||||
return {
|
||||
repo,
|
||||
booterRange: depRange || null,
|
||||
cloneVersion: cloneVersion || null,
|
||||
clonePath: path.join(mirrorRoot, repo),
|
||||
rangeMentionsLocalFile: depRange.startsWith('file:'),
|
||||
semverDrift: Boolean(depRange && cloneVersion && !depRange.includes(cloneVersion))
|
||||
}
|
||||
})
|
||||
const out = {
|
||||
schema: 1,
|
||||
generatedAt: new Date().toISOString(),
|
||||
mirrorRoot,
|
||||
booterPackage: path.relative(root, booterPkgPath),
|
||||
rows
|
||||
}
|
||||
fs.mkdirSync(path.dirname(outPath), { recursive: true })
|
||||
fs.writeFileSync(outPath, JSON.stringify(out, null, 2) + '\n', 'utf8')
|
||||
console.log(
|
||||
'report-holepunch-runtime-compat: wrote',
|
||||
path.relative(root, outPath),
|
||||
'rows=',
|
||||
rows.length
|
||||
)
|
||||
}
|
||||
|
||||
main()
|
||||
Reference in New Issue
Block a user