You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[scanner] prebuild sync scripts fetch() without any timeout — a stalled remote hangs the build until job timeout #394
Every network request made during prebuild uses bare fetch() with no deadline. If a remote accepts the connection but never completes the response, the sync step blocks until the GitHub Actions job timeout-minutes (15) kills it — or until Netlify's build timeout on production deploys — with no log line naming the URL that hung.
scripts/sync-sibling-docs.ts:444 — fetchFile: const res = await fetch(rawUrl(r, source));
scripts/sync-sibling-docs.ts:450 — fetchBinary: const res = await fetch(rawUrl(r, source)); (called once per referenced asset, so a single stalled image stalls the whole step)
scripts/run-sync-step.ts only propagates the child's exit code; it has no deadline of its own, so it cannot help here.
Impact
CI build / Netlify deploys fail by job timeout instead of by a fast, attributable error.
DOCS_SYNC_OPTIONAL=1 (the offline/local fallback) never gets a chance to engage, because the step never exits.
Proposed fix
Add one small shared helper (e.g. scripts/fetch-with-timeout.ts) that wraps fetch in an AbortController with a bounded deadline (30–60s, overridable via an env var for slow networks), rethrows an abort as a clear Error("timed out after Ns fetching <url>"), and use it at the four call sites above. Keep existing non-2xx semantics (throw in fetchText, null in fetchFile/fetchBinary, warn-and-keep-committed-data in update-meeting-recordings.ts). Add a vitest covering the timeout path with a fake fetch that never resolves.
Decision taken by hive: single shared helper + per-request timeout (simplest additive, backward-compatible option); no per-step total budget in this change.
Folded finding. This was filed as a separate issue, but 1 open agent-filed issue (plus 5 closed as completed in the last 14 days) already cite scripts/sync-hive-docs.ts, so it was folded into the oldest of them instead of opening another. Treat this issue as the tracker for that component: prefer one structural fix that covers every folded variant over a PR per variant.
Review backlog (style): New import breaks alphabetical sibling-import order in sync-hive-docs.ts
Filed from an out-of-scope finding in the Hive review of PR #395.
)
Finding: New import breaks alphabetical sibling-import order in sync-hive-docs.ts
scripts/sync-hive-docs.ts:7 inserts ./fetch-with-timeout after ./link-rewrite, while the surrounding relative imports (link-rewrite, markdown-fences, scrub-legacy-branding) are alphabetical and sync-sibling-docs.ts:18 places the same import correctly. No eslint import/order rule exists (eslint.config.mjs), so this is cosmetic only.
Activity
hivecommons-hive commentedon Oct 20, 2026
Folded finding. This was filed as a separate issue, but 1 open agent-filed issue (plus 5 closed as completed in the last 14 days) already cite
scripts/sync-hive-docs.ts, so it was folded into the oldest of them instead of opening another. Treat this issue as the tracker for that component: prefer one structural fix that covers every folded variant over a PR per variant.Review backlog (style): New import breaks alphabetical sibling-import order in sync-hive-docs.ts
Filed from an out-of-scope finding in the Hive review of PR #395.
PR: #395 (#395)
Perspective: style
Severity: info (P3)
Evidence:
scripts/sync-hive-docs.ts:7(docs/scripts/sync-hive-docs.ts
Line 7 in 13ad83b
Finding: New import breaks alphabetical sibling-import order in sync-hive-docs.ts
scripts/sync-hive-docs.ts:7 inserts
./fetch-with-timeoutafter./link-rewrite, while the surrounding relative imports (link-rewrite, markdown-fences, scrub-legacy-branding) are alphabetical and sync-sibling-docs.ts:18 places the same import correctly. No eslint import/order rule exists (eslint.config.mjs), so this is cosmetic only.Fingerprint:
f724ed74fad77f2ad4efd32307704f389b81397fd2ada341a9e3bfa64222d9fafiled by Hive review backlog
hivecommons-hive commentedon Oct 20, 2026
Linked again from the Hive review of PR #395.
fix(scripts): bound prebuild sync fetches with a timeout (#395)