Repository navigation
Description
Finding (PR diff review, 2026-10-24)
Open PR #768 — warm: keep-alive pools for design-code-proxy + clef-proxy (#480) (head d452f7527) — changes credential-caching and connection behaviour in two proxies but adds no tests for the new behaviour. Its changed-file list is only bin/clef-proxy.mjs and bin/design-code-proxy.mjs; the body cites the pre-existing suites passing (11/11), which by construction cannot cover code that did not exist when they were written.
Evidence
- clef-proxy credential cache (new, untested). The diff adds
configFileCachetobin/clef-proxy.mjs:readConfigFileSyncnow stats each Cloudflare config file and serves the cached contents unlessmtimeMschanges, so a rotated token is picked up without a restart. Verified: neitherbin/clef-proxy.test.mjsnorbin/design-code-proxy.test.mjson main mentions the cache,mtime,readConfigFile, orgetCredentialsat all. The failure mode this introduces is silent and credential-shaped: if the mtime check ever misfires (rotation tooling that preserves mtime, e.g.cp -p/ atomic replace with a pinned timestamp), the proxy keeps presenting the old Cloudflare token indefinitely with no error. - design-code-proxy keep-alive + error teardown (new, untested). The diff adds module-level
http.Agent/https.Agentkeep-alive pools (maxSockets: 32) to every backend/upstream dispatch, plus newerrorhandlers on backend and upstream responses that fall back when headers are unsent anddestroy()the client response otherwise. No test pins: socket reuse across sequential requests, fallback on a mid-stream backend error before headers, or teardown (not hang) after headers are sent. The PR body's socket-reuse evidence is a manual sandbox smoke (4 requests, 1 source port), not a regression test.
Why it matters
Both changes sit on hot, failure-sensitive paths (Cloudflare credential presentation; streamed chat completions through pooled sockets). Without tests, a future refactor can silently revert the rotation pickup or reintroduce the half-open-socket stall the PR exists to fix — the same class of proxy bug this repo has already had to re-fix (see #684's design-code-proxy Content-Length regression, which was caught by a stub test).
Acceptance criteria
- A clef-proxy test pins the cache contract: a second request does not re-read an unchanged config file; a config file whose contents and mtime change is re-read (rotated token served on the next request); a missing file still yields the fallback.
- A design-code-proxy test (stub backend) pins: sequential requests reuse the keep-alive pool, and a backend response error before headers triggers the fallback path while one after headers tears the client response down instead of hanging.
- The new tests fail against the pre-warm: keep-alive pools for design-code-proxy + clef-proxy (#480) #768 behaviour where applicable (ablation), and pass on the PR head; existing proxy suites stay green.
Part of the #480 warm-proxy set. Filed by the pr-diff-review job; this job files only.
Activity
dezren39 commentedon Oct 26, 2026
Intake review
Fleet monitor intake pass (protocol §5).
Related: PR #768 (the change under review), PR #759 (open, shepherd task 1058 in the pilot queue). This issue already carries
queue/queuedwith a live triage task in repo-health-code-pilot (verified this run), so no new packet was enqueued.Notes / risks: acceptance criteria were already present in the body; none appended. The follow-through items are test-coverage gaps for the session-visible tailnet device set in the clef-proxy mtime credential cache and design-code keep-alive error paths — the risk they guard against is a silent regression in credential caching, so the tests matter more than their size suggests (effort/s, priority/normal).
Suggested approach: the queued triage task should confirm each follow-through item against current main, then either land the missing tests or close the item with evidence they already exist.
Labels normalized by the monitor.
29 remaining items
dezren39 commentedon Oct 31, 2026
🤖 Agent note · parked
Merge pull request #3190 from developing-today/queue/1252-782-proxy-t…
dezren39 commentedon Oct 31, 2026
🤖 Agent note · done
fixed_merged6c782b76d2fb2821520608799a54f7153c95346a: Codex review receipt at 19:39Z reviewed exactly that commit and found no major issues; the diff is tests-only (bin/clef-proxy.test.mjs,bin/design-code-proxy.test.mjs);node --teston both suites re-run first-hand on the laptop at the head — 25/25 pass. No CI workflow covers the bin suites (only a skipping CodeRabbit check), so the laptop run is the test evidence, as recorded by the earlier shifts.cd1267d02555550d94b2b5de40a1efc44ae9ceea; this issue closes with the merge.