@levr-one/cli 0.11.1 → 0.11.2
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/dist/cli.js
CHANGED
|
@@ -673,7 +673,7 @@ Examples:
|
|
|
673
673
|
}
|
|
674
674
|
},
|
|
675
675
|
loader: async () => {
|
|
676
|
-
const { gatesRunHandler } = await import("./runHandler-
|
|
676
|
+
const { gatesRunHandler } = await import("./runHandler-9tfiD3ZK.js");
|
|
677
677
|
return gatesRunHandler;
|
|
678
678
|
}
|
|
679
679
|
});
|
|
@@ -869,7 +869,7 @@ Examples:
|
|
|
869
869
|
|
|
870
870
|
//#endregion
|
|
871
871
|
//#region package.json
|
|
872
|
-
var version = "0.11.
|
|
872
|
+
var version = "0.11.2";
|
|
873
873
|
|
|
874
874
|
//#endregion
|
|
875
875
|
//#region src/app.ts
|
|
@@ -88,6 +88,20 @@ const issueGateVerificationReportGateResultsV1 = (options) => {
|
|
|
88
88
|
const GATE_STEP_TAIL_LIMIT = 4e3;
|
|
89
89
|
/** How long one command may run before it is killed (15 min). */
|
|
90
90
|
const GATE_COMMAND_TIMEOUT_MS = 900 * 1e3;
|
|
91
|
+
/**
|
|
92
|
+
* How long an L4 semantic judge may run (3 min) — ENG-4469.
|
|
93
|
+
*
|
|
94
|
+
* The L4 templates used to carry their own `timeout 120`, which bounded the
|
|
95
|
+
* judge on Linux and broke it on stock macOS (no GNU `timeout`). With the
|
|
96
|
+
* wrapper gone, the runner holds the budget, as qinetic-mcp's executor does
|
|
97
|
+
* with the same 180s. A hung judge (agy waiting on a prompt that never
|
|
98
|
+
* renders) would otherwise hold `levr gates run` for the full 15 minutes.
|
|
99
|
+
*/
|
|
100
|
+
const GATE_SEMANTIC_TIMEOUT_MS = 180 * 1e3;
|
|
101
|
+
/** The kill budget for one command: semantic judges get the shorter one. */
|
|
102
|
+
function commandTimeoutMs(command) {
|
|
103
|
+
return command.technique === "semantic" ? GATE_SEMANTIC_TIMEOUT_MS : GATE_COMMAND_TIMEOUT_MS;
|
|
104
|
+
}
|
|
91
105
|
/** Keep the END of a stream — where runner summaries and verdicts are. */
|
|
92
106
|
function tail(value, limit = GATE_STEP_TAIL_LIMIT) {
|
|
93
107
|
const s = value ?? "";
|
|
@@ -145,12 +159,12 @@ function shellExists(shell) {
|
|
|
145
159
|
* can report ENOBUFS with a numeric status (ENG-5106 L1 review round 4
|
|
146
160
|
* F-010/F-011).
|
|
147
161
|
*/
|
|
148
|
-
const runInShell = (command) => {
|
|
162
|
+
const runInShell = (command, timeoutMs = GATE_COMMAND_TIMEOUT_MS) => {
|
|
149
163
|
const shell = chooseShell();
|
|
150
164
|
const r = spawnSync(shell.file, shell.args(command), {
|
|
151
165
|
encoding: "utf8",
|
|
152
166
|
maxBuffer: 64 * 1024 * 1024,
|
|
153
|
-
timeout:
|
|
167
|
+
timeout: timeoutMs
|
|
154
168
|
});
|
|
155
169
|
const stderr = (r.stderr ?? "") + (r.error ? `\n[runner] ${r.error.message}` : "") + (r.signal ? `\n[runner] killed by ${r.signal}` : "");
|
|
156
170
|
const killed = r.error !== void 0 || r.signal !== null;
|
|
@@ -189,7 +203,7 @@ function toReportResult(command, outcome) {
|
|
|
189
203
|
function runLocalCommands(commands, run = runInShell, onEach, onBefore) {
|
|
190
204
|
return commands.map((command, index) => {
|
|
191
205
|
onBefore?.(command, index);
|
|
192
|
-
const result = toReportResult(command, run(command.command));
|
|
206
|
+
const result = toReportResult(command, run(command.command, commandTimeoutMs(command)));
|
|
193
207
|
onEach?.(command, result);
|
|
194
208
|
return result;
|
|
195
209
|
});
|