mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-19 06:34:43 +01:00
Commands that read cut-off output now fail instead of judging part of it (GST-3086) (#4492)
Commands that read large git or gh output, including the credential pre-push hook, the pre-merge secret and literal scans and the sealed-output guard, now fail when Bun cuts that output off, instead of judging the part they got. Why: Bun can report exit status 0 together with ENOBUFS and partial stdout, so a push whose diff passed 64 MiB could get a credential past the pre-push hook. Nothing to do: the failure names `SPAWN_OUTPUT_INCOMPLETE` and links its troubleshooting entry. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
2767d229fb
commit
36b349d660
137 files changed
+311
-134
No files matched your search
@@ -17,7 +17,7 @@
|
||||
* skipped. Prints one CONFLICT_MARKER: <path>:<line> <marker> per hit and exits 1, or CONFLICT_MARKERS: none
|
||||
* and exits 0; a git failure exits 2.
|
||||
*/
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { spawnSync } from '../lib/spawn-sync';
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* differ from the current source is older than its inputs and must be
|
||||
* requalified (or its runtimes withdrawn) before it ships.
|
||||
*/
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { spawnSync } from '../lib/spawn-sync';
|
||||
import * as fs from 'node:fs';
|
||||
import * as os from 'node:os';
|
||||
import * as path from 'node:path';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env -S bun --no-env-file --config=/dev/null
|
||||
/** Native trusted-CI verification for reviewed OCI build inputs. */
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { spawnSync } from '../lib/spawn-sync';
|
||||
import { committedImageBuildMatrix, type ImageBuildRow } from './cso-image-matrix';
|
||||
|
||||
const MAX_OUTPUT = 1024 * 1024;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { spawnSync } from '../lib/spawn-sync';
|
||||
import { buildEvalInputIdentity, lookupEvalInputCache, sourceDependencyClosure, storeEvalInputCache,
|
||||
type EvalCacheValue, type EvalInputIdentity, type EvalPassingProof } from '../crew/scripts/eval-input-cache';
|
||||
import { matchGlob } from '../test/helpers/test-selection';
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@
|
||||
import * as fs from 'node:fs';
|
||||
import * as os from 'node:os';
|
||||
import * as path from 'node:path';
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { spawnSync } from '../lib/spawn-sync';
|
||||
import { pollDelayMs } from '../lib/gh-poll';
|
||||
import { detectBaseBranch } from '../test/helpers/touchfiles';
|
||||
import { DEFAULT_JOBS, ROOT, type PaidTier } from './lib/paid-types';
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { spawnSync } from '../lib/spawn-sync';
|
||||
import { createHash } from 'node:crypto';
|
||||
import { LIVE_REGISTRY, readTrialOutcomeDir, type Registry } from './eval-flake-rank';
|
||||
import { formatTrialOutcomes, parseTrialOutcomes } from '../test/helpers/eval-store';
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { spawnSync } from '../../lib/spawn-sync';
|
||||
import type { FlakeLedgerEntry } from '../test-free-shards';
|
||||
|
||||
// --- Clients ---
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
*/
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { spawnSync } from '../../lib/spawn-sync';
|
||||
import { panelVerdict, type TrialOutcomeRecord } from '../../test/helpers/eval-store';
|
||||
import { HEADROOM_FAIL, HEADROOM_WARN } from '../../test/helpers/eval-budgets';
|
||||
import { sanitizeFixedFenceLine } from './published-text';
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { spawnSync } from '../../lib/spawn-sync';
|
||||
import { normalizeRelativePath } from './shard-engine';
|
||||
import { isPaidTestFile } from '../../test/helpers/paid-test-set';
|
||||
import { PERIODIC_CI_EXCLUDE } from '../../test/helpers/periodic-exclude-data';
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* (name, digest and an install lock) beyond the newest KEEP by last use are
|
||||
* removed once unused for PRUNE_GRACE_MS.
|
||||
*/
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { spawnSync } from '../lib/spawn-sync';
|
||||
import { createHash, randomBytes } from 'node:crypto';
|
||||
import * as fs from 'node:fs';
|
||||
import * as os from 'node:os';
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { spawnSync } from '../lib/spawn-sync';
|
||||
import { matchGlob } from '../test/helpers/test-selection';
|
||||
import { isPaidTestFile } from '../test/helpers/paid-test-set';
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { spawnSync } from '../lib/spawn-sync';
|
||||
import { CASE_QUARANTINE } from '../test/helpers/periodic-exclude-data';
|
||||
import { E2E_KINDS, E2E_TIERS, LLM_JUDGE_TOUCHFILES } from '../test/helpers/touchfiles-data';
|
||||
import { parseCliFlags } from './lib/shard-engine';
|
||||
|
||||
@@ -52,7 +52,8 @@
|
||||
import * as fs from 'node:fs';
|
||||
import * as os from 'node:os';
|
||||
import * as path from 'node:path';
|
||||
import { spawn, spawnSync } from 'node:child_process';
|
||||
import { spawn } from 'node:child_process';
|
||||
import { spawnSync } from '../lib/spawn-sync';
|
||||
import { EVAL_POLICY } from '../test/helpers/periodic-exclude-data';
|
||||
import { E2E_KINDS, E2E_TIERS, LLM_JUDGE_TOUCHFILES } from '../test/helpers/touchfiles-data';
|
||||
import { getClaudeCliVersion, getProjectEvalDir, isFinalizedEvalResultFile } from '../test/helpers/eval-store';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import * as fs from 'fs';
|
||||
import * as os from 'os';
|
||||
import * as path from 'path';
|
||||
import { spawnSync } from 'child_process';
|
||||
import { spawnSync } from '../lib/spawn-sync';
|
||||
import { validateSkill, externalHostPathLeaks } from '../test/helpers/skill-parser';
|
||||
import { ALL_HOST_CONFIGS } from '../hosts/index';
|
||||
import {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
* 0 when every check passes, 1 when one fails, 2 on a setup error.
|
||||
* Docs: docs/skill-gates.md#headless-smoke.
|
||||
*/
|
||||
import { spawnSync } from 'child_process';
|
||||
import { spawnSync } from '../lib/spawn-sync';
|
||||
import * as fs from 'fs';
|
||||
import * as os from 'os';
|
||||
import * as path from 'path';
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* bun run slop:diff origin/release # diff against another base
|
||||
*/
|
||||
|
||||
import { spawnSync } from "child_process";
|
||||
import { spawnSync } from "../lib/spawn-sync";
|
||||
import * as fs from "fs";
|
||||
import * as os from "os";
|
||||
import * as path from "path";
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { spawnSync } from '../lib/spawn-sync';
|
||||
import { GH_CLIENT, downloadRunArtifacts, formatFlakeSummary, historyFetcher, listRunJobs, listWorkflowRuns, readCiFlakeLedgers,
|
||||
readFlakeLedgerDir, repoSlug, unavailableReason, type CiRun, type FlakeWindow, type GhClient } from './lib/ci-history';
|
||||
import { analyzePassRates, readTrialOutcomeDir, type TrialRecord } from './eval-flake-rank';
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
*
|
||||
* Nothing here changes what CI runs. Exit codes: 0 done, 1 a traced run or key failed, 2 usage or setup.
|
||||
*/
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { spawnSync } from '../lib/spawn-sync';
|
||||
import * as fs from 'node:fs';
|
||||
import * as os from 'node:os';
|
||||
import * as path from 'node:path';
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* Fixing one error and adding an identical-message error in the same file is
|
||||
* the one substitution this cannot see.
|
||||
*/
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { spawnSync } from '../lib/spawn-sync';
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
|
||||
|
||||
Reference in new issue
Block a user