@inixiative/config 0.5.253 → 0.5.255
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 +3 -1
- package/dist/cli.js +35 -0
- package/package.json +1 -1
- package/versions.json +6 -7
package/README.md
CHANGED
|
@@ -97,7 +97,7 @@ bunx @inixiative/config bounded [--minutes=40] [--memory-gb=12] [--wait-minutes=
|
|
|
97
97
|
|
|
98
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. Every repo's `check` script is `inixiative-config bounded -- bun run check:all`, with the repo's own chain in `check:all`; `check` flags a repo whose script is anything else and `sync` rewrites it, moving the old chain to `check:all`; when both scripts already hold a chain, or `check` names `bounded` in another way, `sync` leaves them and the finding says to settle them by hand (limits of its own, `--minutes=`, `--memory-gb=`, `--wait-minutes=`, may sit before the `--`). So the full check is always plain `bun run check`. Never wrap it in `lockf … ~/.foundry/check.lock`, the command sessions used before 2026-11-21: `lockf` would hold the lock `bounded` then waits for, so a `bounded` started under one refuses at once (exit 2) and says to run the check plain. `bun run check:all` is the chain with no lock and no limits: for CI images and for looking at one failure, never for the full check on a shared machine. The `--` is required; everything after it reaches the command untouched.
|
|
99
99
|
|
|
100
|
-
- **One at a time.** It takes the machine's check lock, `~/.foundry/check.lock`, a flock(2) file taken through `lockf` (`flock` on Linux). 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
|
|
100
|
+
- **One at a time.** It takes the machine's check lock, `~/.foundry/check.lock`, a flock(2) file taken through `lockf` (`flock` on Linux). 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, but a train also takes this one, once, before it moves any repo, and holds it until it ends: its repo checks run without waiting again, and other sessions' checks wait for the whole train. Before 2026-11-26 a train took it once per repo and rejoined the queue each time (97 minutes of one run were waiting, three were tests).
|
|
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.
|
|
@@ -211,6 +211,8 @@ jobs:
|
|
|
211
211
|
|
|
212
212
|
## Release flow
|
|
213
213
|
|
|
214
|
+
One agent runs every train: the release conductor, a Foundry schedule on this repo. Its charter is [`docs/RELEASE-CONDUCTOR.md`](docs/RELEASE-CONDUCTOR.md). Every other session stops at "merged, row written" in `~/code/inixiative/RELEASE-QUEUE.md` and never runs `train` or merges a PR here.
|
|
215
|
+
|
|
214
216
|
Two lanes, each publishing in dependency order, with config last:
|
|
215
217
|
|
|
216
218
|
- **primitives:** for example field-map → json-rules → permissions → transitions → rules-builder, plus prisma-map (retiring into field-map), atlas and gloss. Consumers: template, kingdom.
|
package/dist/cli.js
CHANGED
|
@@ -1292,6 +1292,35 @@ var runBounded = async (command2, options = {}) => {
|
|
|
1292
1292
|
for (const [signal, handler] of stopOnSignal) process.off(signal, handler);
|
|
1293
1293
|
}
|
|
1294
1294
|
};
|
|
1295
|
+
var HOLDING_UNTIL_CLOSED = "echo held >&4; exec 4>&-; read _ <&3";
|
|
1296
|
+
var holdCheckLock = async (options = {}) => {
|
|
1297
|
+
const path = options.lockPath ?? checkLockPath();
|
|
1298
|
+
const say = options.say ?? ((line) => console.error(line));
|
|
1299
|
+
mkdirSync2(dirname2(path), { recursive: true });
|
|
1300
|
+
const [file = "", ...args] = underLock(
|
|
1301
|
+
path,
|
|
1302
|
+
Math.ceil(options.waitSeconds ?? DEFAULT_BOUNDS.waitSeconds),
|
|
1303
|
+
["sh", "-c", HOLDING_UNTIL_CLOSED]
|
|
1304
|
+
);
|
|
1305
|
+
const holder = spawn(file, args, { stdio: ["ignore", "inherit", "inherit", "pipe", "pipe"] });
|
|
1306
|
+
const waiting = setTimeout(
|
|
1307
|
+
() => say(`train: waiting for the machine's check lock (${path})`),
|
|
1308
|
+
5e3
|
|
1309
|
+
);
|
|
1310
|
+
const held = await new Promise((done) => {
|
|
1311
|
+
holder.stdio[4]?.once("data", () => done(true));
|
|
1312
|
+
holder.on("error", () => done(false));
|
|
1313
|
+
holder.on("exit", () => done(false));
|
|
1314
|
+
});
|
|
1315
|
+
clearTimeout(waiting);
|
|
1316
|
+
if (!held) return false;
|
|
1317
|
+
process.on("exit", () => holder.kill());
|
|
1318
|
+
holder.unref();
|
|
1319
|
+
for (const pipe of [holder.stdio[3], holder.stdio[4]])
|
|
1320
|
+
pipe?.unref?.();
|
|
1321
|
+
process.env[INSIDE_BOUNDED] = String(process.pid);
|
|
1322
|
+
return true;
|
|
1323
|
+
};
|
|
1295
1324
|
var boundedVerdict = (outcome, bounds) => {
|
|
1296
1325
|
if (outcome.ended === "exited") return null;
|
|
1297
1326
|
if (outcome.ended === "not started")
|
|
@@ -1788,6 +1817,12 @@ if (command === "train") {
|
|
|
1788
1817
|
);
|
|
1789
1818
|
}
|
|
1790
1819
|
holdTrainLock(lock.release);
|
|
1820
|
+
if (!process.env[INSIDE_BOUNDED] && !await holdCheckLock()) {
|
|
1821
|
+
console.error(
|
|
1822
|
+
`\u2717 gave up waiting for the machine's check lock (${checkLockPath()}); the train needs it for every repo's check`
|
|
1823
|
+
);
|
|
1824
|
+
process.exit(LOCK_WAIT_EXIT_CODE);
|
|
1825
|
+
}
|
|
1791
1826
|
}
|
|
1792
1827
|
git(packageRoot, "fetch", "--quiet");
|
|
1793
1828
|
if (behindOrigin(packageRoot) > 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inixiative/config",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.255",
|
|
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,12 +13,12 @@
|
|
|
13
13
|
"@types/bun"
|
|
14
14
|
],
|
|
15
15
|
"ecosystem": {
|
|
16
|
-
"@inixiative/config": "0.5.
|
|
16
|
+
"@inixiative/config": "0.5.255",
|
|
17
17
|
"@inixiative/field-map": "0.1.1",
|
|
18
18
|
"@inixiative/json-rules": "3.16.0",
|
|
19
19
|
"@inixiative/permissions": "0.25.0",
|
|
20
|
-
"@inixiative/transitions": "0.
|
|
21
|
-
"@inixiative/rules-builder": "0.
|
|
20
|
+
"@inixiative/transitions": "0.10.0",
|
|
21
|
+
"@inixiative/rules-builder": "0.35.0",
|
|
22
22
|
"@inixiative/prisma-map": "0.4.1",
|
|
23
23
|
"@inixiative/atlas": "0.4.1",
|
|
24
24
|
"@inixiative/gloss": "0.1.1"
|
|
@@ -56,12 +56,11 @@
|
|
|
56
56
|
"candidates": {
|
|
57
57
|
"@inixiative/atlas": "0.5.1",
|
|
58
58
|
"@inixiative/json-rules": "4.7.0",
|
|
59
|
-
"@inixiative/agent-session": "0.
|
|
59
|
+
"@inixiative/agent-session": "0.23.0",
|
|
60
60
|
"@inixiative/field-map": "0.1.2",
|
|
61
61
|
"@inixiative/archive": "0.35.2",
|
|
62
|
-
"@inixiative/permissions": "0.
|
|
62
|
+
"@inixiative/permissions": "0.30.0",
|
|
63
63
|
"@inixiative/signet": "0.29.0",
|
|
64
|
-
"@inixiative/
|
|
65
|
-
"@inixiative/transitions": "0.10.0"
|
|
64
|
+
"@inixiative/integrations": "0.3.0"
|
|
66
65
|
}
|
|
67
66
|
}
|