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
master npm run typecheck red — 4 test files break tsc, all CI test jobs fail #2013
On current master, npm run typecheck (tsc --noEmit --project tsconfig.json) fails with 10 errors across 4 test files. Consequence: every CI test job (ubuntu/windows × node22/24) fails at the typecheck step — verified on master HEAD 33d58e5e (all four test (...) check-runs completed failure). No PR can go green until this is repaired.
Repro
git checkout master && npm ci && npm run typecheck
Errors (exact, node 22)
tests/codex-responses-ws.test.ts(144,198): TS2339 Property 'map' does not exist on type '{}'
tests/codex-responses-ws.test.ts(192,42) / (192,76): TS2571 Object of type 'unknown' / TS7006 implicit any
tests/codex-responses-ws.test.ts(242,22): TS18046 'error.error' is of type 'unknown'
tests/issue1987-preflight-baseline-anchor.test.ts(11,28): TS2459 'ProxyOptions' declared locally in '../src/server.ts', not exported; plus (91,26)/(95,23): address() possibly null / port on string|AddressInfo
tests/issue1993-preflight-400.test.ts(17,28): TS2459 same ProxyOptions import
tests/ws-bridge.test.ts(45,67): TS2322 Promise not assignable to Promise
tests/ws-bridge.test.ts(111,59): TS2794 expected 1 argument — missing Promise<void> type arg
Root cause
src/server.ts now imports ProxyOptions from ./config.js and no longer re-exports it, but three test files from recent merges still import it from ../src/server.ts. Separately, a few untyped expressions in codex-responses-ws.test.ts and ws-bridge.test.ts fail strict tsc. Same failure domain (the repo's tsc gate), filed as one issue.
Impact
CI gate fully blocked: every open/new PR shows red test jobs regardless of content; §7.4 auto-merge condition "green on the rebased head" is unsatisfiable for anyone.
Suggested fix (already applied, type-level only, zero runtime change)
import ProxyOptions from ../src/config.ts (canonical location used by all other test files);
(server.address() as AddressInfo).port where address() result is used;
narrowing casts on Record<string, unknown> fields (as unknown[], as Record<string, unknown>).
Applied as a separate labeled commit (fix: repair pre-existing typecheck breakage in 4 test files (unblocks CI gate)) on branch wt-1996-ework-daemon alongside the 压缩的时候system消息不在最前面报错 #1996 work. Post-fix: npm run typecheck exits 0; the touched hermetic suites pass (issue1987/issue1993/ws-bridge 9/9).
Activity
ranxianglei commentedon Oct 3, 2026
[bot] 🏷 进展同步(初步审核已完成,正在做本地验证):
复现确认:master HEAD
33d58e5e上npm ci && npm run typecheck红,12 个错误、4 个测试文件,与 issue 清单逐条一致(codex-responses-ws ×4 / issue1987 ×5 / issue1993 ×1 / ws-bridge ×2)。根因核实:ProxyOptions定义在src/config.ts:598,src/server.ts:11只 import 不 re-export,而这两个测试文件仍从../src/server.ts导入(其余 ~190 个测试文件都从../src/config.ts导入)。查重发现(重要):已有两个 open PR 覆盖同一失败域——
2026-10-03_ci-typecheck-fix,master+1 commit):专用修复,方案是server.ts加export type { ProxyOptions } from "./config.js"re-export + 同样的类型收窄;wt-1996-ework-daemon,即本 issue 提到的分支):压缩的时候system消息不在最前面报错 #1996 工作 + 一个标注 commit,采用 issue 建议的方案(测试改从config.ts导入)。按「一个 issue 至多一个 PR」纪律,我不会再开第三个重复 PR。正在本地检出 fix(typecheck): unblock CI — export ProxyOptions + type-narrow #1987/#1994/ws-bridge tests #2007 的 head 跑 typecheck + 四个受影响测试套件取证,随后给出结构化结论与合并建议。
ranxianglei commentedon Oct 3, 2026
[bot] 🏷 验证完成。结论:本 issue 不需要新 PR —— 建议直接合并 PR #2007(我已在其正文追加
Closes #2013,合并后本 issue 自动关闭)。结构化七问:
npm run typecheck)在 fix: preflight transport resilience + shipped-payload baseline anchor (#1987) #1989/fix(preflight): log+dump rejected summary bodies and shrink-retry hard 400/413 #1994 合并后变红——4 个测试文件共 12 个错误,导致每个 PR(无论内容)的全部 4 条 CI test lane 必挂,§7.4「green on the rebased head」对所有人不可满足。ProxyOptions规范定义在src/config.ts:598,src/server.ts:11只 import 不 re-export,而 issue1987/issue1993 两个测试文件仍从../src/server.ts导入 → TS2459(快节奏合并下的语义竞态:两个 PR 各自分支 CI 都绿,叠加到 master 才断);② 同批合并在 codex-responses-ws/ws-bridge 引入的 strict 违规(unknown 上直接操作、Promise<void>缺类型参数)。db1766fb上tscrc=0(12→0);受影响 4 套件 14/14 全过(codex-responses-ws 5、issue1987 1、issue1993 5、ws-bridge 3);CI 全绿含 ubuntu/windows × node22/24 四条 test lane。wt-1996-ework-daemon,即 issue 点名的分支):head4fb0e6e5typecheck 同样 rc=0,但它捆绑 压缩的时候system消息不在最前面报错 #1996 功能——门禁修复不应等 feature review。(address() as AddressInfo);ws-bridge handler 改动运行时等价(两者都是writeHead(200).end())。零运行时行为变化,无阈值/时序/输出格式漂移,14 个测试断言逻辑零改动。既有行为清点:唯一触碰面是 server.ts 导出面(+1 type alias,纯增量)。判定:建议现在合并 #2007——专用、最小、全验证通过,立即解锁所有其他 PR 的 CI lane。合并后 #2014 的 labeled repair commit 变冗余(narrowing hunks 与 #2007 重叠),rebase 到新 master 时丢掉该 commit、只留 #1996 工作即可。另:#2007 正文提到的 esbuild devDep 发现已有 open PR #2010 覆盖,无需重复立项。