@validate.qa/runner 1.0.102 → 1.0.104

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.
Files changed (32) hide show
  1. package/README.md +7 -2
  2. package/dist/{chunk-E2VEMBQQ.mjs → chunk-6N4QCCEH.mjs} +2 -2
  3. package/dist/{chunk-ZZYBRIBT.mjs → chunk-EBWZ7NGU.mjs} +11 -8
  4. package/dist/{chunk-3JM6XTSZ.mjs → chunk-EKY6CN4Y.mjs} +660 -123
  5. package/dist/{chunk-DN3O6EYT.mjs → chunk-MEE4DXRX.mjs} +19834 -3064
  6. package/dist/{chunk-CBVHPYVJ.mjs → chunk-OXDU6ARE.mjs} +86 -7
  7. package/dist/{chunk-AAUHXGDS.mjs → chunk-PUMRAFJS.mjs} +37 -13
  8. package/dist/{chunk-4WLP3RWN.mjs → chunk-TGVKABFN.mjs} +45 -3
  9. package/dist/{chunk-5DFBEL72.mjs → chunk-TS4OUJVT.mjs} +1 -1
  10. package/dist/{chunk-BXLEPT4M.mjs → chunk-UR7KDOTP.mjs} +32 -8
  11. package/dist/{chunk-E2RRAE27.mjs → chunk-UZ67UBXH.mjs} +14 -3
  12. package/dist/{chunk-HJ6FKHMM.mjs → chunk-VWE3SQ2Z.mjs} +1 -1
  13. package/dist/{chunk-PWFWMVZU.mjs → chunk-XXZZMG6Q.mjs} +15 -3
  14. package/dist/cli.js +35519 -17101
  15. package/dist/cli.mjs +1171 -251
  16. package/dist/credential-mcp-server.js +750 -133
  17. package/dist/credential-mcp-server.mjs +3 -3
  18. package/dist/discovery-mcp-server.js +714 -132
  19. package/dist/discovery-mcp-server.mjs +4 -4
  20. package/dist/dist-BXHLIG5H.mjs +17 -0
  21. package/dist/inbox-mcp-server.js +743 -129
  22. package/dist/inbox-mcp-server.mjs +3 -3
  23. package/dist/route-seed-worker.js +672 -125
  24. package/dist/route-seed-worker.mjs +3 -3
  25. package/dist/run-write-guard-preload.js +714 -126
  26. package/dist/run-write-guard-preload.mjs +4 -4
  27. package/dist/run-write-guard.js +714 -126
  28. package/dist/run-write-guard.mjs +3 -3
  29. package/dist/tar-extract-child.js +38 -14
  30. package/dist/tar-extract-child.mjs +2 -2
  31. package/package.json +3 -2
  32. package/dist/dist-52M5RDZ6.mjs +0 -17
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  require_run_write_guard
3
- } from "./chunk-4WLP3RWN.mjs";
4
- import "./chunk-E2RRAE27.mjs";
5
- import "./chunk-3JM6XTSZ.mjs";
3
+ } from "./chunk-TGVKABFN.mjs";
4
+ import "./chunk-UZ67UBXH.mjs";
5
+ import "./chunk-EKY6CN4Y.mjs";
6
6
  import {
7
7
  __toESM
8
8
  } from "./chunk-WQXBGQU4.mjs";
@@ -6739,7 +6739,13 @@ var require_tar_isolated = __commonJS({
6739
6739
  }
6740
6740
  async function extractZipIsolated(archivePath, destDir, options) {
6741
6741
  try {
6742
- await runTarJobIsolated({ op: "extract-zip", archivePath: (0, node_path_1.resolve)(archivePath), destDir: (0, node_path_1.resolve)(destDir) }, options.subject, options);
6742
+ const job = {
6743
+ op: "extract-zip",
6744
+ archivePath: (0, node_path_1.resolve)(archivePath),
6745
+ destDir: (0, node_path_1.resolve)(destDir),
6746
+ ...options.oversizeFiles ? { oversizeFiles: options.oversizeFiles } : {}
6747
+ };
6748
+ await runTarJobIsolated(job, options.subject, options);
6743
6749
  } catch (err) {
6744
6750
  if (err instanceof TarIsolationUnavailableError)
6745
6751
  throw refuseUnavailable(err, options.subject, options.log);
@@ -6817,7 +6823,7 @@ var require_repo_acquire = __commonJS({
6817
6823
  return mod && mod.__esModule ? mod : { "default": mod };
6818
6824
  };
6819
6825
  Object.defineProperty(exports2, "__esModule", { value: true });
6820
- exports2.ARCHIVE_TOO_LARGE_RE = exports2.MAX_ZIP_TOTAL_BYTES = exports2.MAX_ZIP_FILE_BYTES = exports2.MAX_ZIP_ENTRIES = exports2.MAX_ARCHIVE_BYTES = void 0;
6826
+ exports2.ARCHIVE_TOO_LARGE_RE = exports2.REPO_TARBALL_LIMITS = exports2.MAX_ZIP_TOTAL_BYTES = exports2.MAX_ZIP_FILE_BYTES = exports2.MAX_ZIP_ENTRIES = exports2.MAX_ARCHIVE_BYTES = void 0;
6821
6827
  exports2.acquireRepoForImport = acquireRepoForImport;
6822
6828
  exports2.downloadArchiveCapped = downloadArchiveCapped;
6823
6829
  exports2.formatArchiveCap = formatArchiveCap;
@@ -6843,6 +6849,7 @@ var require_repo_acquire = __commonJS({
6843
6849
  exports2.MAX_ZIP_ENTRIES = 2e4;
6844
6850
  exports2.MAX_ZIP_FILE_BYTES = 50 * 1024 * 1024;
6845
6851
  exports2.MAX_ZIP_TOTAL_BYTES = 600 * 1024 * 1024;
6852
+ exports2.REPO_TARBALL_LIMITS = { maxEntries: 2e5, maxFileBytes: exports2.MAX_ZIP_FILE_BYTES, maxTotalBytes: exports2.MAX_ZIP_TOTAL_BYTES, oversizeFiles: "skip" };
6846
6853
  function envGithubTokenForImports() {
6847
6854
  const optedIn = ["1", "true", "yes", "on"].includes(String(process.env.RUNNER_IMPORT_ENV_GITHUB_TOKEN ?? "").trim().toLowerCase());
6848
6855
  if (!optedIn)
@@ -6886,7 +6893,14 @@ var require_repo_acquire = __commonJS({
6886
6893
  extractRoot,
6887
6894
  /* strip */
6888
6895
  1,
6889
- { subject: "repository archive", onUnavailable: "in-process", log, signal: spec.signal, tenantKey: spec.projectId }
6896
+ {
6897
+ subject: "repository archive",
6898
+ onUnavailable: "in-process",
6899
+ log,
6900
+ signal: spec.signal,
6901
+ tenantKey: spec.projectId,
6902
+ limits: { ...exports2.REPO_TARBALL_LIMITS }
6903
+ }
6890
6904
  );
6891
6905
  await (0, promises_1.rm)(tarPath, { force: true }).catch(noop);
6892
6906
  log(`[repo-acquire] extracted github tarball (${archiveBytes} bytes)`);
@@ -6909,7 +6923,8 @@ var require_repo_acquire = __commonJS({
6909
6923
  log,
6910
6924
  signal: spec.signal,
6911
6925
  tenantKey: spec.projectId,
6912
- hint: "Check it is a valid .tar.gz, or upload it as a .zip."
6926
+ hint: "Check it is a valid .tar.gz, or upload it as a .zip.",
6927
+ limits: { ...exports2.REPO_TARBALL_LIMITS }
6913
6928
  }
6914
6929
  );
6915
6930
  } else if (kind === "zip") {
@@ -6918,7 +6933,8 @@ var require_repo_acquire = __commonJS({
6918
6933
  log,
6919
6934
  signal: spec.signal,
6920
6935
  tenantKey: spec.projectId,
6921
- hint: "Check it is a valid .zip, or upload it as a .tar.gz."
6936
+ hint: "Check it is a valid .zip, or upload it as a .tar.gz.",
6937
+ oversizeFiles: exports2.REPO_TARBALL_LIMITS.oversizeFiles
6922
6938
  });
6923
6939
  } else {
6924
6940
  await (0, promises_1.rm)(archivePath, { force: true }).catch(noop);
@@ -7128,7 +7144,7 @@ var require_repo_acquire = __commonJS({
7128
7144
  bad = new Error(`Tar entry path contains a NUL byte: ${JSON.stringify(shownPath)}`);
7129
7145
  } else if (typeof size !== "number" || !Number.isSafeInteger(size) || size < 0 || size > MAX_OCTAL_TAR_SIZE) {
7130
7146
  bad = new Error(`Tar entry has an invalid size field: ${shownPath}`);
7131
- } else if (size > limits.maxFileBytes) {
7147
+ } else if (size > limits.maxFileBytes && limits.oversizeFiles !== "skip") {
7132
7148
  bad = new Error(`Tar entry too large: ${shownPath} (declared ${size} bytes > ${limits.maxFileBytes} cap)`);
7133
7149
  } else if ((declaredTotal += size) > limits.maxTotalBytes) {
7134
7150
  bad = new Error(`Tar total uncompressed size exceeds ${limits.maxTotalBytes} cap (tar-bomb guard)`);
@@ -7195,7 +7211,8 @@ var require_repo_acquire = __commonJS({
7195
7211
  return false;
7196
7212
  }
7197
7213
  const sz = Number(entry.size ?? 0);
7198
- if (sz > limits.maxFileBytes) {
7214
+ const oversize = sz > limits.maxFileBytes;
7215
+ if (oversize && limits.oversizeFiles !== "skip") {
7199
7216
  capError = new Error(`Tar entry too large: ${p} (declared ${sz} bytes > ${limits.maxFileBytes} cap)`);
7200
7217
  return false;
7201
7218
  }
@@ -7204,13 +7221,13 @@ var require_repo_acquire = __commonJS({
7204
7221
  capError = new Error(`Tar total uncompressed size exceeds ${limits.maxTotalBytes} cap (tar-bomb guard)`);
7205
7222
  return false;
7206
7223
  }
7207
- return true;
7224
+ return !oversize;
7208
7225
  }
7209
7226
  }));
7210
7227
  if (capError)
7211
7228
  throw capError;
7212
7229
  }
7213
- async function extractZipSafely(buf, destDir, log = noop) {
7230
+ async function extractZipSafely(buf, destDir, log = noop, options = {}) {
7214
7231
  const zip = new adm_zip_1.default(buf);
7215
7232
  const entries = zip.getEntries();
7216
7233
  if (entries.length > exports2.MAX_ZIP_ENTRIES) {
@@ -7219,6 +7236,7 @@ var require_repo_acquire = __commonJS({
7219
7236
  const destResolved = (0, node_path_1.resolve)(destDir);
7220
7237
  let total = 0;
7221
7238
  let files = 0;
7239
+ let skipped = 0;
7222
7240
  for (const entry of entries) {
7223
7241
  const name = entry.entryName;
7224
7242
  if (isUnsafeEntryName(name)) {
@@ -7233,12 +7251,18 @@ var require_repo_acquire = __commonJS({
7233
7251
  continue;
7234
7252
  }
7235
7253
  const declared = entry.header?.size ?? 0;
7236
- if (declared > exports2.MAX_ZIP_FILE_BYTES) {
7237
- throw new Error(`Zip entry too large: ${name} (declared ${declared} bytes > ${exports2.MAX_ZIP_FILE_BYTES} cap)`);
7238
- }
7239
7254
  if (total + declared > exports2.MAX_ZIP_TOTAL_BYTES) {
7240
7255
  throw new Error(`Zip total uncompressed size exceeds ${exports2.MAX_ZIP_TOTAL_BYTES} cap (zip-bomb guard)`);
7241
7256
  }
7257
+ if (declared > exports2.MAX_ZIP_FILE_BYTES && options.oversizeFiles !== "skip") {
7258
+ throw new Error(`Zip entry too large: ${name} (declared ${declared} bytes > ${exports2.MAX_ZIP_FILE_BYTES} cap)`);
7259
+ }
7260
+ if (declared > exports2.MAX_ZIP_FILE_BYTES) {
7261
+ total += declared;
7262
+ skipped++;
7263
+ log(`[repo-acquire] zip: skipped ${name} (declared ${declared} bytes > ${exports2.MAX_ZIP_FILE_BYTES} per-file cap)`);
7264
+ continue;
7265
+ }
7242
7266
  const data = entry.getData();
7243
7267
  if (data.length > exports2.MAX_ZIP_FILE_BYTES) {
7244
7268
  throw new Error(`Zip entry too large: ${name} (${data.length} bytes > ${exports2.MAX_ZIP_FILE_BYTES} cap)`);
@@ -7251,7 +7275,7 @@ var require_repo_acquire = __commonJS({
7251
7275
  await (0, promises_1.writeFile)(target, data);
7252
7276
  files++;
7253
7277
  }
7254
- log(`[repo-acquire] zip extracted: ${files} file(s), ${total} bytes`);
7278
+ log(`[repo-acquire] zip extracted: ${files} file(s), ${total} bytes${skipped ? `, ${skipped} oversize file(s) skipped` : ""}`);
7255
7279
  }
7256
7280
  async function normalizeRepoRoot(extractRoot) {
7257
7281
  let entries;
@@ -7558,7 +7582,7 @@ var require_tar_extract_child = __commonJS({
7558
7582
  return { ok: true };
7559
7583
  case "extract-zip": {
7560
7584
  const logs = [];
7561
- await (0, repo_acquire_js_1.extractZipSafely)(await (0, promises_1.readFile)(job.archivePath), job.destDir, (line) => logs.push(line));
7585
+ await (0, repo_acquire_js_1.extractZipSafely)(await (0, promises_1.readFile)(job.archivePath), job.destDir, (line) => logs.push(line), { oversizeFiles: job.oversizeFiles });
7562
7586
  return { ok: true, logs };
7563
7587
  }
7564
7588
  case "slim":
@@ -2,7 +2,7 @@ import {
2
2
  require_repo_acquire,
3
3
  require_repo_snapshot_slim,
4
4
  require_tar_isolated
5
- } from "./chunk-AAUHXGDS.mjs";
5
+ } from "./chunk-PUMRAFJS.mjs";
6
6
  import {
7
7
  __commonJS,
8
8
  __require,
@@ -80,7 +80,7 @@ var require_tar_extract_child = __commonJS({
80
80
  return { ok: true };
81
81
  case "extract-zip": {
82
82
  const logs = [];
83
- await (0, repo_acquire_js_1.extractZipSafely)(await (0, promises_1.readFile)(job.archivePath), job.destDir, (line) => logs.push(line));
83
+ await (0, repo_acquire_js_1.extractZipSafely)(await (0, promises_1.readFile)(job.archivePath), job.destDir, (line) => logs.push(line), { oversizeFiles: job.oversizeFiles });
84
84
  return { ok: true, logs };
85
85
  }
86
86
  case "slim":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@validate.qa/runner",
3
- "version": "1.0.102",
3
+ "version": "1.0.104",
4
4
  "description": "validate local test runner - execute Playwright tests on your machine, connected to validate.qa cloud.",
5
5
  "bin": {
6
6
  "validate-runner": "dist/cli.js"
@@ -9,8 +9,9 @@
9
9
  "build": "tsup",
10
10
  "dev": "tsx src/cli.ts",
11
11
  "lint": "eslint .",
12
- "test": "node --import tsx --test src/supervisor-child-argv.test.ts src/audit-scrub.test.ts src/retry-on-429.test.ts src/version-check.test.ts src/poll-interval.test.ts src/node-version-notice.test.ts src/services/auth-state.test.ts src/run-no-longer-active.test.ts src/mode-abort-no-verdict.test.ts src/discovery-render-type.test.ts src/batch-heal-no-start.test.ts src/heartbeat-active-runs.test.ts src/result-post-structure-413.test.ts src/result-shed-routes-413.test.ts src/result-post-retry.test.ts src/result-media-stale-epoch.test.ts src/run-write-guard-bundle.test.ts src/spec-driver-bundle.test.ts src/mcp-servers-bundle.test.ts src/codex-files-mcp-server-bundle.test.ts src/claim-nonce-not-logged.test.ts src/sign-in-capture.test.ts src/run-status-verdicts.test.ts src/sign-in-failure.test.ts src/mobile-ui-path-succeeded.test.ts src/supervisor-policy.test.ts src/login-check.test.ts src/heal-post-lost-ack.test.ts src/ui-heal-result-video.test.ts src/heal-log-stream-chunks.test.ts src/shutdown-claim-window.test.ts src/result-post-redeploy-budget.test.ts src/shutdown-signals.test.ts",
12
+ "test": "node --import tsx --test src/supervisor-child-argv.test.ts src/audit-scrub.test.ts src/retry-on-429.test.ts src/version-check.test.ts src/runner-upgrade-exit.test.ts src/poll-interval.test.ts src/node-version-notice.test.ts src/services/auth-state.test.ts src/run-no-longer-active.test.ts src/mode-abort-no-verdict.test.ts src/discovery-render-type.test.ts src/batch-heal-no-start.test.ts src/heartbeat-active-runs.test.ts src/result-post-structure-413.test.ts src/result-shed-routes-413.test.ts src/result-post-retry.test.ts src/result-media-stale-epoch.test.ts src/run-write-guard-bundle.test.ts src/run-write-guard-bundle-skip.test.ts src/spec-driver-bundle.test.ts src/mcp-servers-bundle.test.ts src/codex-files-mcp-server-bundle.test.ts src/claim-nonce-not-logged.test.ts src/sign-in-capture.test.ts src/run-status-verdicts.test.ts src/sign-in-failure.test.ts src/mobile-ui-path-succeeded.test.ts src/supervisor-policy.test.ts src/login-check.test.ts src/config-permissions.test.ts src/heal-post-lost-ack.test.ts src/ui-heal-result-video.test.ts src/heal-log-stream-chunks.test.ts src/shutdown-claim-window.test.ts src/result-post-redeploy-budget.test.ts src/shutdown-signals.test.ts src/sign-in-detect.test.ts src/no-credentials-help.test.ts src/resolve-credentials.test.ts src/sign-in-url.test.ts src/status-check.test.ts src/status-exit-code.test.ts src/services/doctor-web.test.ts src/browser-pool-failure.test.ts src/login-check-wrong-server.test.ts src/login-wrong-server-cli.test.ts src/start-wrong-server-cli.test.ts src/plaintext-server-warning.test.ts",
13
13
  "test:mobile": "node --import tsx --test --test-concurrency=2 src/runner.mobile-ai-env.test.ts src/runner.mobile-heal-audit-wiring.test.ts src/mobile-device-queue.test.ts src/device-lease.test.ts src/runner-watchdog.test.ts src/result-payload-budget.test.ts src/result-media-upload.test.ts src/services/appium-*.test.ts src/services/*mobile*.test.ts src/services/mobile/*.test.ts",
14
+ "test:browser": "RUN_BROWSER_TESTS=1 PLAYWRIGHT_HEADLESS=true node --import tsx --test src/sign-in-prove.browser.ts",
14
15
  "smoke:installed": "node scripts/installed-run-smoke.mjs",
15
16
  "check:packed-mcp": "node scripts/packed-install-check.mjs",
16
17
  "prepublishOnly": "npm run build"
@@ -1,17 +0,0 @@
1
- import {
2
- require_dist
3
- } from "./chunk-DN3O6EYT.mjs";
4
- import "./chunk-AAUHXGDS.mjs";
5
- import "./chunk-EXRFHATN.mjs";
6
- import "./chunk-ZZYBRIBT.mjs";
7
- import "./chunk-BXLEPT4M.mjs";
8
- import "./chunk-5DFBEL72.mjs";
9
- import "./chunk-CBVHPYVJ.mjs";
10
- import "./chunk-HJ6FKHMM.mjs";
11
- import "./chunk-PWFWMVZU.mjs";
12
- import "./chunk-E2VEMBQQ.mjs";
13
- import "./chunk-4WLP3RWN.mjs";
14
- import "./chunk-E2RRAE27.mjs";
15
- import "./chunk-3JM6XTSZ.mjs";
16
- import "./chunk-WQXBGQU4.mjs";
17
- export default require_dist();