@prodcycle/prodcycle 0.6.4 → 0.6.5

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 (2) hide show
  1. package/dist/api-client.js +18 -3
  2. package/package.json +1 -1
@@ -47,10 +47,25 @@ const MAX_RETRY_AFTER_SECONDS = envInt('PC_MAX_RETRY_AFTER_SECONDS', 300);
47
47
  /**
48
48
  * Per-request fetch timeout. Without this a stalled connection would tie
49
49
  * up the CLI indefinitely, bypassing both the retry cap and the async-poll
50
- * deadline. Default is 2 minutes — long enough for the largest non-async
51
- * sync `/validate` call, short enough that a hung TCP socket gets aborted.
50
+ * deadline.
51
+ *
52
+ * Default is 5 minutes — chosen so the chunked-session `/chunks` upload
53
+ * path has enough headroom under server-side load. The bottleneck on
54
+ * busy servers is the per-chunk transaction (policy eval + per-finding
55
+ * unique-index check on `(scan_id, fingerprint)`), which can take tens
56
+ * of seconds on big chunks. Sync `/validate` scans normally finish in
57
+ * seconds, so a longer default doesn't hurt them — it only matters
58
+ * when a single request stalls. CI runs that want tighter feedback can
59
+ * shrink via `PC_REQUEST_TIMEOUT_MS`.
60
+ *
61
+ * Pre-fix this was 120 s and a megarepo chunked scan (infisical-
62
+ * infisical, ~11.5 k files, 2026-05-13 GA-validation sweep) burned
63
+ * through the full retry budget (4 × 120 s per stuck chunk) before
64
+ * giving up with `Failed to connect to ProdCycle API: The operation
65
+ * was aborted due to timeout`. The body-read retry path from #30 was
66
+ * firing correctly — it just wasn't enough budget.
52
67
  */
53
- const REQUEST_TIMEOUT_MS = envInt('PC_REQUEST_TIMEOUT_MS', 120_000);
68
+ const REQUEST_TIMEOUT_MS = envInt('PC_REQUEST_TIMEOUT_MS', 300_000);
54
69
  /**
55
70
  * Conservative client-side chunk sizing for the chunked-session flow. The
56
71
  * /chunks endpoint accepts up to 50 MB / 2000 files per request, but most
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prodcycle/prodcycle",
3
- "version": "0.6.4",
3
+ "version": "0.6.5",
4
4
  "description": "Multi-framework policy-as-code compliance scanner for infrastructure and application code.",
5
5
  "homepage": "https://docs.prodcycle.com",
6
6
  "repository": {