@inixiative/config 0.5.236 → 0.5.237

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -95,20 +95,20 @@ bunx @inixiative/config bounded [--minutes=40] [--memory-gb=12] [--wait-minutes=
95
95
 
96
96
  ### bounded
97
97
 
98
- `bounded -- <command>` runs a repo's full check as the machine's one check at a time, inside a time limit and a memory ceiling. A repo's `check` script becomes `inixiative-config bounded -- bun run check:all`, with the old chain moved to `check:all`. The `--` is required; everything after it reaches the command untouched.
98
+ `bounded -- <command>` runs a repo's full check as the machine's one check at a time, inside a time limit and a memory ceiling. A repo's `check` script becomes `inixiative-config bounded -- bun run check:all`, with the old chain moved to `check:all`. A repo that has done so is checked with plain `bun run check`, never under `lockf … ~/.foundry/check.lock`: `lockf` would hold the lock `bounded` then waits for. The `--` is required; everything after it reaches the command untouched.
99
99
 
100
- - **One at a time.** It waits for `~/.inixiative/check.lock`, saying whose check it waits for (directory, pid, host, since when), and gives up with exit 75 after `--wait-minutes`. This is its own lock file on the same code as the train's (`acquireMachineLock`): a train and a check can run together. A lock left by a dead process on this host is taken over. Waiters ask again every five seconds and there is no queue, so with several waiting the order is not first come, first served.
100
+ - **One at a time.** It takes the machine's check lock, `~/.foundry/check.lock`: the flock(2) file sessions already queue on with `lockf -k -t 14400 ~/.foundry/check.lock bun run check`, taken through `lockf` (`flock` on Linux), so a `bounded` check and a plain `lockf` one wait for each other. The system frees the lock when its holder dies, so a file left behind is never a lock. After five seconds of waiting it says so, and it gives up with exit 75 after `--wait-minutes`. A train's own lock is another file: a train and a check can run together.
101
101
  - **Time limit.** After `--minutes` (default 40, counted from when it holds the lock) the command's whole process group is stopped: SIGTERM, then SIGKILL ten seconds later. Exit 124.
102
102
  - **Memory ceiling.** It adds up the memory of the group, compressed pages included (`top`'s MEM on macOS; RSS from `ps` elsewhere, or when `top` gives nothing in 30 s), and stops the group past `--memory-gb` (default 12). Exit 137. The last line names the bound, the peak and the process holding the most.
103
103
  - **Both limits are read every ten seconds**, so a command can overrun either by up to that long.
104
- - **Nothing outlives it.** When the command ends, whatever it left running in its group is stopped. When `bounded` gets SIGINT, SIGTERM or SIGHUP it stops the group before it frees the lock. When `bounded` itself is killed, a watcher inside the group kills the group at once.
104
+ - **Nothing outlives it.** When the command ends, whatever it left running in its group is stopped. When `bounded` gets SIGINT, SIGTERM or SIGHUP it stops the group, which frees the lock. When `bounded` itself is killed, a watcher inside the group kills the group at once, whether the command is running or still waiting for the lock.
105
105
  - **What escapes.** A process that leaves the group (`setsid`, a detached spawn, a container started through Docker) is neither stopped nor counted.
106
- - **Nested.** A `bounded` started under another (`INIXIATIVE_BOUNDED` set) runs its command as it is; the outer one holds the lock and the limits. **In CI** (`CI` set) likewise: one check per runner, under the runner's limits.
106
+ - **Nested.** A `bounded` started under another (`INIXIATIVE_BOUNDED` set) takes no lock, since the outer one holds it, and keeps its own time limit and memory ceiling. **In CI** (`CI` set) the command runs as it is: one check per runner, under the runner's limits.
107
107
  - **Exit codes** otherwise are the command's own: 127 when it does not exist, 128 plus the signal when a signal ended it.
108
108
 
109
109
  Why (Aron, 2026-11-19: "We should definitely make something that stops that from happening"): on 2026-11-18/19 a Foundry test looped to 23 GB twice; its ten-minute tool timeout only moved it to the background, and it thrashed a 64 GB machine until its owner was told. The same night three to five full checks ran at once from different sessions: the machine's load was a median 31 with one check running, 118 with two or three and 264 with four or more (`~/.foundry/evals/probes/2026-11-19-foundry-load/`). RSS would not have caught the loop: the system had compressed it to 4 to 9 GB of RSS while its footprint was 23 GB.
110
110
 
111
- Not yet: the train's own check after `train:adopt` still runs `bun run check` under its `--adopt-check-timeout`, which stops only the top process and would count lock wait as check time. Move it onto `bounded` before any repo adopts `bounded` in its `check`.
111
+ The train runs every repo's check through `bounded` (the re-lock check, the check after `train:adopt` with `--adopt-check-timeout` as its time limit, and this package's own before it publishes), so a train's checks queue behind a session's and behind each other, a hung check's whole process group is stopped, and time spent waiting for the lock is not counted as check time. Outside `--adopt-check-timeout` the train's own limits are a loose backstop (two hours, 24 GB); a repo whose `check` is `bounded` keeps its tighter ones.
112
112
 
113
113
  ### Retired terms
114
114
 
package/dist/cli.js CHANGED
@@ -4,15 +4,15 @@
4
4
  import { spawnSync as spawnSync4 } from "child_process";
5
5
  import {
6
6
  existsSync as existsSync3,
7
- mkdirSync as mkdirSync3,
7
+ mkdirSync as mkdirSync4,
8
8
  mkdtempSync,
9
9
  readdirSync as readdirSync3,
10
10
  readFileSync as readFileSync3,
11
11
  rmSync as rmSync3,
12
12
  writeFileSync as writeFileSync3
13
13
  } from "fs";
14
- import { hostname as hostname3, tmpdir } from "os";
15
- import { basename, dirname as dirname3, join as join4, resolve as resolve2 } from "path";
14
+ import { hostname as hostname2, tmpdir } from "os";
15
+ import { basename, dirname as dirname4, join as join4, resolve as resolve2 } from "path";
16
16
 
17
17
  // src/args.ts
18
18
  import { parseArgs } from "util";
@@ -960,8 +960,7 @@ var removeStale = (path, stale) => {
960
960
  rmSync(mutex, { force: true });
961
961
  }
962
962
  };
963
- var acquireTrainLock = (path, holder) => acquireMachineLock(path, holder);
964
- var acquireMachineLock = (path, holder) => {
963
+ var acquireTrainLock = (path, holder) => {
965
964
  mkdirSync(dirname(path), { recursive: true });
966
965
  const mine = `${JSON.stringify(holder, null, 2)}
967
966
  `;
@@ -984,26 +983,14 @@ var acquireMachineLock = (path, holder) => {
984
983
  }
985
984
  };
986
985
  var holdTrainLock = (release) => {
987
- holdMachineLock(release);
988
- };
989
- var holdMachineLock = (release, beforeExit = async () => {
990
- }) => {
991
986
  process.on("exit", release);
992
- const handlers = [
987
+ for (const [signal, code] of [
993
988
  ["SIGINT", 130],
994
989
  ["SIGTERM", 143],
995
990
  ["SIGHUP", 129]
996
- ].map(([signal, code]) => {
997
- const handler = () => {
998
- void beforeExit().finally(() => process.exit(code));
999
- };
1000
- process.on(signal, handler);
1001
- return [signal, handler];
1002
- });
1003
- return () => {
1004
- process.off("exit", release);
1005
- for (const [signal, handler] of handlers) process.off(signal, handler);
1006
- };
991
+ ]) {
992
+ process.on(signal, () => process.exit(code));
993
+ }
1007
994
  };
1008
995
  var isConfigCheckout = (dir2) => {
1009
996
  const top = spawnSync("git", ["rev-parse", "--show-toplevel"], { cwd: dir2, encoding: "utf8" });
@@ -1106,15 +1093,19 @@ var parseCommandLine = (argv) => {
1106
1093
 
1107
1094
  // src/bounded.ts
1108
1095
  import { spawn, spawnSync as spawnSync2 } from "child_process";
1109
- import { constants, homedir as homedir2, hostname as hostname2 } from "os";
1110
- import { join as join2 } from "path";
1096
+ import { mkdirSync as mkdirSync2 } from "fs";
1097
+ import { constants, homedir as homedir2 } from "os";
1098
+ import { dirname as dirname2, join as join2 } from "path";
1111
1099
  var DEFAULT_BOUNDS = {
1112
1100
  seconds: 40 * 60,
1113
1101
  memoryBytes: 12 * 2 ** 30,
1114
1102
  waitSeconds: 4 * 60 * 60
1115
1103
  };
1116
1104
  var INSIDE_BOUNDED = "INIXIATIVE_BOUNDED";
1117
- var checkLockPath = () => join2(homedir2(), ".inixiative", "check.lock");
1105
+ var TIME_LIMIT_EXIT_CODE = 124;
1106
+ var checkLockPath = () => join2(homedir2(), ".foundry", "check.lock");
1107
+ var LOCK_WAIT_EXIT_CODE = 75;
1108
+ var underLock = (path, seconds, command2) => process.platform === "linux" ? ["flock", "-o", "-E", String(LOCK_WAIT_EXIT_CODE), "-w", String(seconds), path, ...command2] : ["lockf", "-k", "-s", "-t", String(seconds), path, ...command2];
1118
1109
  var exitCodeOf = (code, signal) => code ?? (signal ? 128 + (constants.signals[signal] ?? 0) : 1);
1119
1110
  var UNITS = { B: 1, K: 2 ** 10, M: 2 ** 20, G: 2 ** 30, T: 2 ** 40 };
1120
1111
  var groupProcessesInTop = (output, pgid) => output.split("\n").flatMap((line) => {
@@ -1165,86 +1156,104 @@ var stopGroup = async (pgid) => {
1165
1156
  for (let waited = 0; waited < 1e4 && signalGroup(pgid, 0); waited += 200) await sleep(200);
1166
1157
  signalGroup(pgid, "SIGKILL");
1167
1158
  };
1168
- var WITH_WATCHER = '(read _ <&3; kill -KILL 0) >/dev/null 2>&1 & exec "$@"';
1159
+ var WITH_WATCHER = '(exec 4>&-; read _ <&3; kill -KILL 0) >/dev/null 2>&1 & exec "$@"';
1160
+ var HOLDING_THE_LOCK = 'echo held >&4; exec 4>&- 3<&-; "$@"; exit $?';
1169
1161
  var runBounded = async (command2, options = {}) => {
1170
1162
  if (command2.length === 0) throw new Error("bounded: no command given");
1171
1163
  const bounds = { ...DEFAULT_BOUNDS, ...options.bounds };
1172
1164
  const say = options.say ?? ((line) => console.error(line));
1173
- const cwd = options.cwd ?? process.cwd();
1174
1165
  const path = options.lockPath ?? checkLockPath();
1175
1166
  const sampleMs = options.sampleMs ?? 1e4;
1176
- const holder = {
1177
- pid: process.pid,
1178
- hostname: hostname2(),
1179
- processStart: processStart(process.pid),
1180
- startedAt: (/* @__PURE__ */ new Date()).toISOString(),
1181
- cwd,
1182
- command: command2.join(" ")
1183
- };
1184
- const waitUntil = Date.now() + bounds.waitSeconds * 1e3;
1185
- let told = "";
1186
- let lock = acquireMachineLock(path, holder);
1187
- while (!lock.ok) {
1188
- if (Date.now() > waitUntil) return { ended: "lock wait", code: 75, heldBy: lock.heldBy, path };
1189
- const { heldBy } = lock;
1190
- const who = `${heldBy.cwd} (pid ${heldBy.pid} on ${heldBy.hostname}, since ${heldBy.startedAt}; lock ${path})`;
1191
- if (who !== told) say(`bounded: waiting for the check in ${who}`);
1192
- told = who;
1193
- await sleep(Math.min(5e3, sampleMs));
1194
- lock = acquireMachineLock(path, holder);
1195
- }
1196
- const { release } = lock;
1197
- const child = spawn("sh", ["-c", WITH_WATCHER, "sh", ...command2], {
1198
- cwd,
1199
- stdio: ["inherit", "inherit", "inherit", "pipe"],
1200
- detached: true,
1201
- env: { ...process.env, [INSIDE_BOUNDED]: String(process.pid) }
1202
- });
1167
+ mkdirSync2(dirname2(path), { recursive: true });
1168
+ const holding = ["sh", "-c", HOLDING_THE_LOCK, "sh", ...command2];
1169
+ const child = spawn(
1170
+ "sh",
1171
+ [
1172
+ "-c",
1173
+ WITH_WATCHER,
1174
+ "sh",
1175
+ ...options.lock === false ? holding : underLock(path, Math.ceil(bounds.waitSeconds), holding)
1176
+ ],
1177
+ {
1178
+ cwd: options.cwd ?? process.cwd(),
1179
+ stdio: ["inherit", "inherit", "inherit", "pipe", "pipe"],
1180
+ detached: true,
1181
+ env: { ...process.env, [INSIDE_BOUNDED]: String(process.pid) }
1182
+ }
1183
+ );
1203
1184
  const pgid = child.pid;
1204
1185
  const exited = new Promise((done) => {
1205
1186
  child.on("error", (error) => done({ code: 127, reason: error.message }));
1206
1187
  child.on("exit", (code, signal) => done({ code: exitCodeOf(code, signal) }));
1207
1188
  });
1189
+ const held = new Promise((done) => child.stdio[4]?.once("data", () => done(true)));
1208
1190
  const stop = async () => {
1209
1191
  if (pgid) await stopGroup(pgid);
1210
1192
  };
1211
- const unhold = holdMachineLock(release, stop);
1212
- const deadline = Date.now() + bounds.seconds * 1e3;
1193
+ let signalled = null;
1194
+ const stopOnSignal = [
1195
+ ["SIGINT", 130],
1196
+ ["SIGTERM", 143],
1197
+ ["SIGHUP", 129]
1198
+ ].map(([signal, code]) => {
1199
+ const handler = () => {
1200
+ signalled = code;
1201
+ void stop().finally(() => process.exit(code));
1202
+ };
1203
+ process.on(signal, handler);
1204
+ return [signal, handler];
1205
+ });
1213
1206
  let peakBytes = 0;
1214
1207
  let heaviest = "";
1215
1208
  try {
1209
+ const waiting = setTimeout(
1210
+ () => say(`bounded: waiting for the machine's check lock (${path})`),
1211
+ Math.min(5e3, sampleMs)
1212
+ );
1213
+ const first2 = await Promise.race([held, exited]);
1214
+ clearTimeout(waiting);
1215
+ if (first2 !== true) {
1216
+ if (first2.reason !== void 0)
1217
+ return { ended: "not started", code: 127, reason: first2.reason };
1218
+ const ran = await Promise.race([held, sleep(200).then(() => false)]);
1219
+ return !ran && first2.code === LOCK_WAIT_EXIT_CODE ? { ended: "lock wait", code: LOCK_WAIT_EXIT_CODE, path } : { ended: "exited", code: first2.code };
1220
+ }
1221
+ const deadline = Date.now() + bounds.seconds * 1e3;
1216
1222
  for (; ; ) {
1217
1223
  const end = await Promise.race([exited, sleep(sampleMs).then(() => null)]);
1218
1224
  if (end?.reason !== void 0) return { ended: "not started", code: 127, reason: end.reason };
1219
1225
  if (end) return { ended: "exited", code: end.code };
1220
1226
  if (!pgid) continue;
1221
- const held = (options.memoryOf ?? fetchGroupMemory)(pgid);
1222
- const bytes = held.reduce((sum, entry) => sum + entry.bytes, 0);
1227
+ const group = (options.memoryOf ?? fetchGroupMemory)(pgid);
1228
+ const bytes = group.reduce((sum, entry) => sum + entry.bytes, 0);
1223
1229
  if (bytes > peakBytes) {
1224
1230
  peakBytes = bytes;
1225
- const most = held.reduce((a, b) => b.bytes > a.bytes ? b : a);
1231
+ const most = group.reduce((a, b) => b.bytes > a.bytes ? b : a);
1226
1232
  heaviest = `${most.command} (pid ${most.pid})`;
1227
1233
  }
1228
1234
  const over = bytes > bounds.memoryBytes ? "memory ceiling" : Date.now() > deadline ? "time limit" : null;
1229
1235
  if (!over) continue;
1230
1236
  await stop();
1231
1237
  await exited;
1232
- return { ended: over, code: over === "time limit" ? 124 : 137, peakBytes, heaviest };
1238
+ return {
1239
+ ended: over,
1240
+ code: over === "time limit" ? TIME_LIMIT_EXIT_CODE : 137,
1241
+ peakBytes,
1242
+ heaviest
1243
+ };
1233
1244
  }
1234
1245
  } finally {
1235
1246
  await stop();
1236
- unhold();
1237
- release();
1247
+ if (signalled !== null) process.exit(signalled);
1248
+ for (const [signal, handler] of stopOnSignal) process.off(signal, handler);
1238
1249
  }
1239
1250
  };
1240
1251
  var boundedVerdict = (outcome, bounds) => {
1241
1252
  if (outcome.ended === "exited") return null;
1242
1253
  if (outcome.ended === "not started")
1243
1254
  return `\u2717 bounded: the command did not start: ${outcome.reason}`;
1244
- if (outcome.ended === "lock wait") {
1245
- const { heldBy } = outcome;
1246
- return `\u2717 bounded: gave up after ${Math.round(bounds.waitSeconds)} s waiting for the check in ${heldBy.cwd} (pid ${heldBy.pid} on ${heldBy.hostname}); if that check is gone, remove ${outcome.path}`;
1247
- }
1255
+ if (outcome.ended === "lock wait")
1256
+ return `\u2717 bounded: gave up after ${Math.round(bounds.waitSeconds)} s waiting for the machine's check lock (${outcome.path})`;
1248
1257
  const peak = (outcome.peakBytes / 2 ** 30).toFixed(1);
1249
1258
  const most = outcome.heaviest || "unknown";
1250
1259
  return outcome.ended === "time limit" ? `\u2717 bounded: stopped at the ${Math.round(bounds.seconds / 60)} min time limit (peak ${peak} GB, most in ${most})` : `\u2717 bounded: stopped at the ${(bounds.memoryBytes / 2 ** 30).toFixed(1)} GB memory ceiling (peak ${peak} GB, most in ${most})`;
@@ -1297,13 +1306,13 @@ import { spawnSync as spawnSync3 } from "child_process";
1297
1306
  import {
1298
1307
  existsSync as existsSync2,
1299
1308
  lstatSync,
1300
- mkdirSync as mkdirSync2,
1309
+ mkdirSync as mkdirSync3,
1301
1310
  readdirSync as readdirSync2,
1302
1311
  readFileSync as readFileSync2,
1303
1312
  rmSync as rmSync2,
1304
1313
  writeFileSync as writeFileSync2
1305
1314
  } from "fs";
1306
- import { dirname as dirname2, join as join3 } from "path";
1315
+ import { dirname as dirname3, join as join3 } from "path";
1307
1316
  var RETIRED_TERMS = [
1308
1317
  {
1309
1318
  id: "kastle",
@@ -1518,7 +1527,7 @@ var writeRetiredTermsBaseline = (root) => {
1518
1527
  rmSync2(path, { force: true });
1519
1528
  return { written: 0, refused: [] };
1520
1529
  }
1521
- mkdirSync2(dirname2(path), { recursive: true });
1530
+ mkdirSync3(dirname3(path), { recursive: true });
1522
1531
  writeFileSync2(path, `${[...header, ...lines].join("\n")}
1523
1532
  `);
1524
1533
  return { written: lines.length, refused: [] };
@@ -1539,7 +1548,7 @@ try {
1539
1548
  var { command, positionals, preset: presetFlag, dryRun, adoptCheckTimeout } = commandLine;
1540
1549
  var dir = resolve2(command === "bounded" ? "." : positionals[0] ?? ".");
1541
1550
  if (command === "bounded") {
1542
- if (process.env.CI || process.env[INSIDE_BOUNDED]) {
1551
+ if (process.env.CI) {
1543
1552
  const [file, ...args] = positionals;
1544
1553
  const ran = spawnSync4(file ?? "", args, { stdio: "inherit" });
1545
1554
  if (ran.error) {
@@ -1554,7 +1563,7 @@ if (command === "bounded") {
1554
1563
  memoryBytes: memoryGb === void 0 ? DEFAULT_BOUNDS.memoryBytes : memoryGb * 2 ** 30,
1555
1564
  waitSeconds: waitMinutes === void 0 ? DEFAULT_BOUNDS.waitSeconds : waitMinutes * 60
1556
1565
  };
1557
- const outcome = await runBounded(positionals, { bounds });
1566
+ const outcome = await runBounded(positionals, { bounds, lock: !process.env[INSIDE_BOUNDED] });
1558
1567
  const verdict = boundedVerdict(outcome, bounds);
1559
1568
  if (verdict) console.error(verdict);
1560
1569
  process.exit(outcome.code);
@@ -1709,7 +1718,7 @@ if (command === "train") {
1709
1718
  const path = trainLockPath();
1710
1719
  const lock = acquireTrainLock(path, {
1711
1720
  pid: process.pid,
1712
- hostname: hostname3(),
1721
+ hostname: hostname2(),
1713
1722
  processStart: processStart(process.pid),
1714
1723
  startedAt: (/* @__PURE__ */ new Date()).toISOString(),
1715
1724
  lanes,
@@ -1767,7 +1776,7 @@ if (command === "train") {
1767
1776
  });
1768
1777
  } else {
1769
1778
  git(repo, "worktree", "remove", "--force", path);
1770
- rmSync3(dirname3(path), { recursive: true, force: true });
1779
+ rmSync3(dirname4(path), { recursive: true, force: true });
1771
1780
  }
1772
1781
  };
1773
1782
  process.on("exit", () => {
@@ -1838,6 +1847,20 @@ if (command === "train") {
1838
1847
  staleLock: inspection.findings.some((finding) => finding.kind === "stale-lock")
1839
1848
  };
1840
1849
  };
1850
+ const runRepoCheck = (cwd, seconds = 2 * 60 * 60) => spawnSync4(
1851
+ process.execPath,
1852
+ [
1853
+ process.argv[1] ?? "",
1854
+ "bounded",
1855
+ `--minutes=${seconds / 60}`,
1856
+ "--memory-gb=24",
1857
+ "--",
1858
+ "bun",
1859
+ "run",
1860
+ "check"
1861
+ ],
1862
+ { cwd, stdio: "inherit" }
1863
+ ).status;
1841
1864
  const relockAndCheck = (checkout, check = true) => effect(`re-lock ${checkout.name}${check ? " and run its check" : ""}`, void 0, () => {
1842
1865
  const install = (...flags) => spawnSync4("bun", ["install", ...flags], { cwd: checkout.dir, stdio: "inherit" }).status === 0;
1843
1866
  if (!install() && !install("--no-cache")) {
@@ -1849,7 +1872,7 @@ if (command === "train") {
1849
1872
  )) {
1850
1873
  spawnSync4("bun", ["update", ...names], { cwd, stdio: "inherit" });
1851
1874
  }
1852
- if (check && spawnSync4("bun", ["run", "check"], { cwd: checkout.dir, stdio: "inherit" }).status !== 0) {
1875
+ if (check && runRepoCheck(checkout.dir) !== 0) {
1853
1876
  throw new CheckFailed(`check failed in ${checkout.name}`);
1854
1877
  }
1855
1878
  });
@@ -1942,7 +1965,7 @@ if (command === "train") {
1942
1965
  );
1943
1966
  for (const file of envFiles) {
1944
1967
  if (existsSync3(join4(path, file))) continue;
1945
- mkdirSync3(dirname3(join4(path, file)), { recursive: true });
1968
+ mkdirSync4(dirname4(join4(path, file)), { recursive: true });
1946
1969
  writeFileSync3(join4(path, file), readFileSync3(join4(checkout.dir, file)));
1947
1970
  }
1948
1971
  return { ...checkout, dir: path };
@@ -2023,16 +2046,11 @@ if (command === "train") {
2023
2046
  reason = "train:adopt failed";
2024
2047
  console.log(`\u26A0 train:adopt failed in ${checkout.name} \u2014 ${leftOut}`);
2025
2048
  } else {
2026
- const check = spawnSync4("bun", ["run", "check"], {
2027
- cwd: branchCheckout.dir,
2028
- stdio: "inherit",
2029
- timeout: adoptCheckTimeout * 1e3,
2030
- killSignal: "SIGKILL"
2031
- });
2032
- if (check.status !== 0) {
2049
+ const check = runRepoCheck(branchCheckout.dir, adoptCheckTimeout);
2050
+ if (check !== 0) {
2033
2051
  reason = "check failed after train:adopt";
2034
2052
  console.log(
2035
- check.error || check.signal ? `\u26A0 check timed out after ${adoptCheckTimeout}s in ${checkout.name} after train:adopt \u2014 ${leftOut}` : `\u26A0 check still fails in ${checkout.name} after train:adopt \u2014 ${leftOut}`
2053
+ check === TIME_LIMIT_EXIT_CODE ? `\u26A0 check timed out after ${adoptCheckTimeout}s in ${checkout.name} after train:adopt \u2014 ${leftOut}` : `\u26A0 check still fails in ${checkout.name} after train:adopt \u2014 ${leftOut}`
2036
2054
  );
2037
2055
  }
2038
2056
  }
@@ -2129,7 +2147,7 @@ if (command === "train") {
2129
2147
  if (entry.path === "package.json") {
2130
2148
  return spawnSync4("npm", ["publish"], { cwd: checkout.dir, stdio: "inherit" }).status === 0;
2131
2149
  }
2132
- const memberDir = join4(checkout.dir, dirname3(entry.path));
2150
+ const memberDir = join4(checkout.dir, dirname4(entry.path));
2133
2151
  const out = mkdtempSync(join4(tmpdir(), "inixiative-train-"));
2134
2152
  try {
2135
2153
  const pack = spawnSync4("bun", ["pm", "pack", "--destination", out], {
@@ -2392,8 +2410,7 @@ blessed: ${promoted.length === 0 ? "nothing" : promoted.join(", ")}`);
2392
2410
  }
2393
2411
  );
2394
2412
  effect("run bun run check in @inixiative/config", void 0, () => {
2395
- const check = spawnSync4("bun", ["run", "check"], { cwd: packageRoot, stdio: "inherit" });
2396
- if (check.status !== 0) {
2413
+ if (runRepoCheck(packageRoot) !== 0) {
2397
2414
  console.error("\u2717 check failed in @inixiative/config \u2014 aborting before publish");
2398
2415
  process.exit(1);
2399
2416
  }
@@ -2547,7 +2564,7 @@ if (fixed > 0) console.log(`applied ${fixed} fix${fixed === 1 ? "" : "es"}`);
2547
2564
  if (!commandLine.noInstall) {
2548
2565
  const relinked = new Set(
2549
2566
  first.findings.flatMap(
2550
- (finding) => finding.kind === "member-toolchain" && finding.path ? [dirname3(finding.path)] : []
2567
+ (finding) => finding.kind === "member-toolchain" && finding.path ? [dirname4(finding.path)] : []
2551
2568
  )
2552
2569
  );
2553
2570
  for (const member of relinked) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inixiative/config",
3
- "version": "0.5.236",
3
+ "version": "0.5.237",
4
4
  "description": "Shared toolchain and theme for the inixiative packages: tsconfig/biome/tsup presets, theme CSS, a version manifest (BOM), and a sync/check/train CLI",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/versions.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "@types/bun"
14
14
  ],
15
15
  "ecosystem": {
16
- "@inixiative/config": "0.5.236",
16
+ "@inixiative/config": "0.5.237",
17
17
  "@inixiative/field-map": "0.1.1",
18
18
  "@inixiative/json-rules": "3.16.0",
19
19
  "@inixiative/permissions": "0.21.1",
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "candidates": {
55
55
  "@inixiative/atlas": "0.5.1",
56
- "@inixiative/json-rules": "4.2.0",
56
+ "@inixiative/json-rules": "4.3.0",
57
57
  "@inixiative/permissions": "0.25.0",
58
58
  "@inixiative/agent-session": "0.21.0",
59
59
  "@inixiative/field-map": "0.1.2",