- disk.os: replication_operator_sketch schema 7 + corestoreSnapshotUxHint; wire corestore into bridge
- HRPC: bare_os.pkg_index_get, route table schema 3; pkg-swarm-index list/get; pathcap-verify --trusted - POSIX: profile 1.0.17, ctx API 1.53.0, syscalls.json schema 11 + susv4Refs; JSON schemas + matrix/dashboard - Feature bits: BARE_OS_KERNEL_FEATURE_BITS_DOC 16; contract + verify scripts; ctx.d.ts + gen helper sync - Ops: BARE_OS_HOLEPUNCH_DRIFT_TIER1 + tier1Repos; mktemp avoids false XXX marker; /proc boot_budget_summary test list - Docs: contract spine, env appendix, handbook, compatibility matrix, boot budget schema, vault threat model notes Covers bare-os P2P roadmap items 1–20 where implemented in-tree; kernel/lib/bare/README left minimal per maintainer edit.
This commit is contained in:
+1
-1
@@ -316,7 +316,7 @@ Fails when **`BARE_OS_POSIX_PROFILE_VERSION`** / **`BARE_OS_POSIX_PROFILE_ID`**
|
||||
|
||||
**Usage:** `node scripts/verify-holepunch-clone-drift.mjs` (root **`pretest`**)
|
||||
|
||||
Runs on every **`pretest`**. For each repo basename listed in **`repos`** inside **[`docs/audit/holepunch-drift-repos.json`](../docs/audit/holepunch-drift-repos.json)**, checks that **`origin/main`** is an ancestor of **`HEAD`** (clone not behind remote). With an empty **`repos`** array, the script is a no-op. The same file carries **`suggestedCriticalRepos`** and optional **`goldenPathRepos`** (wire stack + runtime hints); copy **`suggestedCriticalRepos`** into **`repos`** when you maintain local clones and want CI to enforce freshness. **`goldenPathRepos`** is informational only (surfaced in **`holepunch-clone-sync-report.json`**). Set **`BARE_OS_HOLEPUNCH_DRIFT_CHECK=0`** to skip the script entirely (e.g. offline sandboxes). **`sync-holepunch-clones.mjs`** echoes **`suggestedCriticalRepos`** into **`holepunch-clone-sync-report.json`** for review.
|
||||
Runs on every **`pretest`**. For each repo basename listed in **`repos`** inside **[`docs/audit/holepunch-drift-repos.json`](../docs/audit/holepunch-drift-repos.json)**, checks that **`origin/main`** is an ancestor of **`HEAD`** (clone not behind remote). With an empty **`repos`** array, the script is a no-op unless **`BARE_OS_HOLEPUNCH_DRIFT_TIER1=1`**, in which case it checks **`tier1Repos[]`** (hypercore, hyperdrive, hyperswarm, protomux, pear, pear-runtime, bare-fs, bare-process) instead. The same file carries **`suggestedCriticalRepos`** and optional **`goldenPathRepos`** (wire stack + runtime hints); copy **`suggestedCriticalRepos`** into **`repos`** when you maintain local clones and want CI to enforce freshness. **`goldenPathRepos`** is informational only (surfaced in **`holepunch-clone-sync-report.json`**). Set **`BARE_OS_HOLEPUNCH_DRIFT_CHECK=0`** to skip the script entirely (e.g. offline sandboxes). **`sync-holepunch-clones.mjs`** echoes **`suggestedCriticalRepos`** into **`holepunch-clone-sync-report.json`** for review.
|
||||
|
||||
## `verify-holepunch-clone-freshness.mjs`
|
||||
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
* local clones under `BARE_OS_HOLEPUNCH_CLONES_ROOT` are not behind `origin/main`.
|
||||
* Disable with `BARE_OS_HOLEPUNCH_DRIFT_CHECK=0` (offline / no clones).
|
||||
*
|
||||
* Optional maintainer gate: `BARE_OS_HOLEPUNCH_DRIFT_TIER1=1` checks **`tier1Repos[]`**
|
||||
* from the same JSON (ignores **`repos[]`**), for a small Holepunch spine set.
|
||||
*
|
||||
* Prereq: `git fetch origin main` in each clone so origin/main is meaningful.
|
||||
* Config: docs/audit/holepunch-drift-repos.json → { repos: ["name", ...] }
|
||||
* Clones root: BARE_OS_HOLEPUNCH_CLONES_ROOT (same default as sync-holepunch-clones.mjs)
|
||||
@@ -74,8 +77,28 @@ function main() {
|
||||
console.error('verify-holepunch-clone-drift: parse config failed', e)
|
||||
process.exit(1)
|
||||
}
|
||||
const repos = Array.isArray(cfg.repos) ? cfg.repos.map((r) => String(r).trim()).filter(Boolean) : []
|
||||
if (!repos.length) {
|
||||
const tier1 =
|
||||
process.env.BARE_OS_HOLEPUNCH_DRIFT_TIER1 === '1' ||
|
||||
process.env.BARE_OS_HOLEPUNCH_DRIFT_TIER1 === 'true'
|
||||
let repos = Array.isArray(cfg.repos)
|
||||
? cfg.repos.map((r) => String(r).trim()).filter(Boolean)
|
||||
: []
|
||||
if (tier1) {
|
||||
repos = Array.isArray(cfg.tier1Repos)
|
||||
? cfg.tier1Repos.map((r) => String(r).trim()).filter(Boolean)
|
||||
: []
|
||||
if (!repos.length) {
|
||||
console.log(
|
||||
'verify-holepunch-clone-drift: tier1 mode but tier1Repos[] empty — nothing to check'
|
||||
)
|
||||
return
|
||||
}
|
||||
console.log(
|
||||
'verify-holepunch-clone-drift: tier1 mode — checking',
|
||||
repos.length,
|
||||
'repo(s)'
|
||||
)
|
||||
} else if (!repos.length) {
|
||||
console.log('verify-holepunch-clone-drift: repos[] empty — nothing to check')
|
||||
return
|
||||
}
|
||||
|
||||
@@ -63,9 +63,9 @@ function main() {
|
||||
)
|
||||
process.exit(1)
|
||||
}
|
||||
if (!bits.includes('BARE_OS_KERNEL_FEATURE_BITS_DOC = 15')) {
|
||||
if (!bits.includes('BARE_OS_KERNEL_FEATURE_BITS_DOC = 16')) {
|
||||
console.error(
|
||||
'kernel-feature-bits.js: expected BARE_OS_KERNEL_FEATURE_BITS_DOC = 15'
|
||||
'kernel-feature-bits.js: expected BARE_OS_KERNEL_FEATURE_BITS_DOC = 16'
|
||||
)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* CI: forbid incomplete-implementation markers in first-party kernel + booter runtime sources only.
|
||||
*
|
||||
* Scanned: kernel/init.js, kernel/lib/init/init-main.js, all kernel/lib/boot/*.js, kernel/bin/*.js (walk skips bundles),
|
||||
* packages/bare-os-coreutils/src (`.js` + `.mjs` Tier-1 sources that ship into `/bin`),
|
||||
* packages/bare-os-booter/index.js, packages/bare-os-booter/lib (recursive .js),
|
||||
* packages/bare-os-protocol/lib (recursive .js; protocol constants only).
|
||||
* Not scanned: kernel/lib/bare/bundles (vendored IIFEs — verify-bundle-markers.mjs,
|
||||
@@ -23,7 +24,8 @@ const MARKER_RE = /\b(TODO|FIXME|HACK|XXX)\b/
|
||||
const NOT_IMPLEMENTED_RE = /throw\s+new\s+Error\s*\(\s*['"]Not implemented['"]\s*\)/
|
||||
|
||||
/** @param {string} dir */
|
||||
function walk(dir) {
|
||||
/** @param {string[]} [exts] */
|
||||
function walk(dir, exts = ['.js']) {
|
||||
/** @type {string[]} */
|
||||
const out = []
|
||||
if (!fs.existsSync(dir)) return out
|
||||
@@ -32,9 +34,10 @@ function walk(dir) {
|
||||
if (ent.isDirectory()) {
|
||||
if (ent.name === 'bundles') continue
|
||||
if (ent.name === 'node_modules') continue
|
||||
out.push(...walk(p))
|
||||
} else if (ent.isFile() && ent.name.endsWith('.js')) {
|
||||
out.push(p)
|
||||
out.push(...walk(p, exts))
|
||||
} else if (ent.isFile()) {
|
||||
const ext = path.extname(ent.name)
|
||||
if (exts.includes(ext)) out.push(p)
|
||||
}
|
||||
}
|
||||
return out
|
||||
@@ -76,6 +79,10 @@ function main() {
|
||||
...walk(path.join(root, 'kernel', 'lib', 'init', 'fragments')),
|
||||
...walk(path.join(root, 'kernel', 'lib', 'boot')),
|
||||
...walk(path.join(root, 'kernel', 'bin')),
|
||||
...walk(path.join(root, 'packages', 'bare-os-coreutils', 'src'), [
|
||||
'.js',
|
||||
'.mjs'
|
||||
]),
|
||||
...walk(path.join(root, 'packages', 'bare-os-booter', 'lib')),
|
||||
...walk(path.join(root, 'packages', 'bare-os-protocol', 'lib')),
|
||||
path.join(root, 'packages', 'bare-os-booter', 'index.js')
|
||||
|
||||
Reference in New Issue
Block a user