Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/ci/version-currency.baseline
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1
0
26 changes: 20 additions & 6 deletions scripts/ci/version-currency.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,22 @@ function gh(args) {
return execFileSync("gh", args, { encoding: "utf8", timeout: 60000 });
}

/**
* Forks are EXEMPT, not measured. A fork that tracks an upstream does not own
* its manifest — upstream's dependency policy is the SSOT, and patching the
* fork's lockfile only buys merge friction (learned on bitbaum/openclaw
* 2026-09-01: an openai bump there could never be more current than the next
* upstream sync, and its CI baseline belongs to upstream too). A fork's
* currency action is SYNCING, which this audit cannot ratchet. Exempted forks
* are printed by name so the exemption is visible, never silent.
*/
function listRepos(owner, limit) {
const raw = gh(["repo", "list", owner, "--limit", String(limit), "--json", "name,isArchived"]);
return JSON.parse(raw)
.filter((r) => !r.isArchived)
.map((r) => r.name)
.sort();
const raw = gh(["repo", "list", owner, "--limit", String(limit), "--json", "name,isArchived,isFork"]);
const all = JSON.parse(raw).filter((r) => !r.isArchived);
return {
repos: all.filter((r) => !r.isFork).map((r) => r.name).sort(),
forks: all.filter((r) => r.isFork).map((r) => r.name).sort(),
};
}

function fetchManifest(owner, repo) {
Expand All @@ -148,8 +158,9 @@ function main() {
const limit = Number(process.env.GH_LIMIT || 100);
const blessed = JSON.parse(readFileSync(BLESSED_PATH, "utf8"));

const { repos, forks } = listRepos(owner, limit);
const results = [];
for (const repo of listRepos(owner, limit)) {
for (const repo of repos) {
const present = hasPackageJson(owner, repo);
if (present === false) continue; // shell/docs repo: no Node surface, not a gap
if (present === null) {
Expand Down Expand Up @@ -177,6 +188,9 @@ function main() {
if (uncheckedRepos.length) {
console.log(`\n UNCHECKED (could not read — not counted as clean): ${uncheckedRepos.join(", ")}`);
}
if (forks.length) {
console.log(`\n fork-exempt (upstream owns the manifest; currency = syncing): ${forks.join(", ")}`);
}
console.log(`\n TOTAL GAPS: ${total}`);

if (mode === "update") {
Expand Down