v1.91.220.0 stamp: merge main for train slot 4

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
garrytanandcapy-ai[bot] committed 2026-10-25 21:34:39 +00:00
commit 5a25ccdd4a
77 files changed
+2726 -265

No files matched your search

+19 -2
View File
@@ -295,6 +295,22 @@ export function launchDetached(opts: { log: string; label: string; timeoutSecond
return result.stdout.trim();
}
/** The run id a local lane exports: the run-scoped log's name, reduced to [A-Za-z0-9_.-] as the native-capture cases require. */
export function localRunId(log: string): string {
return path.basename(log, '.log').replace(/[^\w.-]/g, '-');
}
/**
* The local backend: CI sets EVALS_RUN_ID per slice, and the native-capture
* cases refuse to start without it, so a local lane exports one too (an
* exported value is kept). The id is logged under the header.
*/
export function launchLocal(opts: { log: string; label: string; timeoutSeconds: number; header: string; command: string[]; env?: NodeJS.ProcessEnv }): string {
const env = opts.env ?? process.env;
const runId = env.EVALS_RUN_ID || localRunId(opts.log);
return launchDetached({ ...opts, header: `${opts.header}\n[eval-bg] EVALS_RUN_ID=${runId}`, env: { ...env, EVALS_RUN_ID: runId } });
}
const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));
const pollMs = () => Number(process.env.GSTACK_EVAL_BG_POLL_MS) || 30_000;
@@ -362,7 +378,8 @@ log; it ends with "### gstack-detach EXIT=<code> ###" (0 passed, 1 failed,
Backend: a clean HEAD pushed to ${CANONICAL_REPO} dispatches the CI workflow and
follows it; anything else runs locally under bin/gstack-detach, capped at
ceil(1.5 x planned serial seconds / EVALS_JOBS) + 20 min (at most 4 h).
ceil(1.5 x planned serial seconds / EVALS_JOBS) + 20 min (at most 4 h), with
EVALS_RUN_ID set to the log's name unless one is exported.
--local / --dispatch force a backend (also GSTACK_EVAL_BG_MODE=local|dispatch);
--dispatch refuses instead of falling back
--timeout SECS override the computed local cap
@@ -417,7 +434,7 @@ async function main(argv: string[]): Promise<number> {
const header = `[eval-bg] backend=local lane=${lane} tested=${tested} cap=${cap.seconds}s jobs=${jobs}${timeoutOverride !== null ? ' (--timeout)' : ''} (${choice.reason})`;
console.log(header);
if (cap.capped) console.log(`[eval-bg] WARNING: planned work exceeds the ${LOCAL_CAP_SECONDS}s local cap; the tail may not run. Dispatch to CI or raise EVALS_JOBS.`);
console.log(launchDetached({ log, label, timeoutSeconds: cap.seconds, header, command: ['bun', 'run', LANE_SPECS[lane].script] }));
console.log(launchLocal({ log, label, timeoutSeconds: cap.seconds, header, command: ['bun', 'run', LANE_SPECS[lane].script] }));
return 0;
}
@@ -1,6 +1,13 @@
import { FREE_TEXT_WRITE_RULE, freeTextFileBash, freeTextFileUse } from '../free-text-file';
export function generateFailureRouting(): string {
return `**Failures: check the cause, then route.** A failing test, error or stack trace shows where a failure surfaces, not its root cause.
- **Cause supplied** (the user names a specific cause and a narrow fix): make one read-only check of the evidence it rests on, such as the named file, test or log. If that confirms the cause, make the fix and run the focused test that covers it. If it does not, invoke \`/investigate\` before any further tracing or edit.
- **Cause unknown:** make one read-only triage pass over the supplied evidence and the directly implicated test and code. Do not reproduce, test hypotheses or search wider. If that pass establishes the root cause and a narrow fix, make the fix and run the focused test that covers it. If the cause, scope or intended behavior is still unclear, invoke \`/investigate\` before any broader diagnosis or edit.`;
}
export function generateTestFailureTriage(): string {
return `## Test Failure Ownership Triage
@@ -48,7 +55,7 @@ Ask with AskUserQuestion in the AskUserQuestion Format. List each failure the sa
### Step T4: Execute the chosen action
**If "Investigate and fix now":**
- Switch to /investigate mindset: root cause first, then minimal fix.
- One read-only root-cause pass, then \`/investigate\` if unclear.
- Fix the pre-existing failure.
- Commit the fix separately from the branch's changes: \`git commit -m "fix: pre-existing test failure in <test-file>"\`
- Continue with the workflow.
+8 -3
View File
@@ -5,7 +5,8 @@
set -euo pipefail
BUN_VERSION=1.4.2
NODE_VERSION=22.20.0
NODE_VERSION=22.23.4
NODE_SHA256=1805bcd35e6815559bd2eb97db438d3fdb0eb3a5e6a977b7c1badca76337e9ce
export DEBIAN_FRONTEND=noninteractive
sudo -E apt-get update -qq
@@ -17,9 +18,13 @@ sudo -E apt-get install -y -qq --no-install-recommends \
# needs; GitHub-hosted runners ship with this relaxed.
sudo sysctl -qw kernel.apparmor_restrict_unprivileged_userns=0
# The same verified release archive as .github/docker/Dockerfile.ci.
if ! command -v node >/dev/null; then
curl -fsSL "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" \
| sudo tar -xJ -C /usr/local --strip-components=1
node_tmp=$(mktemp -d)
curl -fsSL "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" -o "$node_tmp/node.tar.xz"
echo "$NODE_SHA256 $node_tmp/node.tar.xz" | sha256sum -c - >/dev/null
sudo tar -xJ -C /usr/local --strip-components=1 -f "$node_tmp/node.tar.xz"
rm -rf "$node_tmp"
fi
# The exact release archive, verified by SHA-256 before it is unpacked, as in