Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

chore(merge): integrate accepted browser capacity [C7,O5]

Corey Olsoncaddcb6757ca
diff --cc src/settings.js
index 57002d35,7b4860ff..af49470b
--- a/src/settings.js
+++ b/src/settings.js
@@@ -82,7 -98,32 +98,32 @@@ export function setGateSlots(capacity)
return next;
}
+ /**
+ * Short gate slots admit runs that name their test files while every ordinary slot is busy.
+ * The default 0 keeps them off, so the pool behaves exactly as it did before the setting existed.
+ */
+ export function gateShortSlots() {
+ return loadMachineSettings().gate?.shortSlots ?? DEFAULT_SHORT_SLOTS;
+ }
+
+ /** Set the short slot count only while the gate pool is idle, like gateSlots, so no holder changes class mid-run. */
+ export function setGateShortSlots(count) {
+ if (!Number.isSafeInteger(count) || count < 0) throw new Refused('BAD_SHORT_SLOTS', 'gate.shortSlots must be a whole number, 0 or more; run pullboard settings gate.shortSlots <n>');
+ let next;
+ try {
+ setResourceCapacity({ name: 'gate', capacity: loadMachineSettings().gateSlots, scope: 'machine', persist: () => {
+ const current = loadMachineSettings();
+ next = { ...current, gate: { ...current.gate, shortSlots: count } };
+ writeMachineSettings(next);
+ } });
+ } catch (error) {
+ if (error?.code !== 'RESOURCE_BUSY') throw error;
+ throw new Refused('RESOURCE_BUSY', `the gate pool is in use; wait for it to become idle, then retry pullboard settings gate.shortSlots ${count}`);
+ }
+ return next;
+ }
+
-/** Set machine browser capacity only when its browser holders and waiters are empty. */
+/** Raise machine browser capacity immediately; decreases require an empty browser queue. */
export function setBrowserSlots(capacity) {
if (!Number.isSafeInteger(capacity) || capacity < 1) throw new Refused('BAD_BROWSER_SLOTS', 'browserSlots must be a positive integer; run pullboard settings browserSlots <n>');
let next;