Compiler SIGABRT: narrowed value does not have the type its narrowing proved (effect Schema/Config-heavy graph)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- compilers
调研方向
Start with the compiler’s narrowing and type-predicate checking paths, then compare this crash with issue #4171. Reproduce using the repro.ts import of ./src/cli/config.ts from the issue and scriptc build repro.ts -o /tmp/repro --optimization dev. The issue does not identify compiler source files or a focused test; done means the narrowed-value assertion no longer aborts on this repro and a regression test covers the case.
由索引模型根据 Issue 内容生成。
描述
Symptom
Compiling the t3code CLI graph (apps/server/src/binMain.ts or binCli.ts) fails with:
error SC3004: TypeScript API protocol: unexpected end of stream
The SC3004 is a secondary symptom: the compiler process aborts (SIGABRT, exit 134) early — within a minute, at only ~25 MB RSS, so this is not the large-graph memory ceiling. A single-file probe reproduces the abort directly with the real diagnostic:
scriptc: a narrowed value does not have the type its narrowing proved (a type predicate or assertion may be wrong)
Minimal-ish repro
From espetro/t3code branch cursor/scriptc-native-server-7e1f (commit 06d4b24314), in apps/server:
// repro.ts
import * as M from "./src/cli/config.ts";
console.log(typeof M);
scriptc build repro.ts -o /tmp/repro --optimization dev
# exit 134 (SIGABRT): "a narrowed value does not have the type its narrowing proved"
src/cli/config.ts is a narrowing-heavy module: effect/Config, effect/Schema, SchemaTransformation, effect/cli Flag schemas, @t3tools/contracts schemas. The crash fires during checking/lowering before any diagnostic location is printed.
Notes
- Same class of internal assertion as #4171 (that one reports it via
scriptc coverageon @effect/platform-node programs); this repro crashes during a plainscriptc build, on a different (narrowing-heavy) shape, and earlier in the pipeline. - Bisecting the t3code graph narrowed the trigger to the config/schema module cluster above; a standalone file importing only that module reproduces.
- Happy to provide the module sources or a trimmed repro if useful.
Environment
- scriptc 0.4.17 (also reproduces on the fork synced to upstream main
ddbbc1e30b) - macOS arm64
- 主要语言
- TypeScript
- 星标
- 6.7k
- 派生
- 229
- 平均合并
- 14 小时 29 分钟
- 30 天内合并 PR
- 787
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
vercel-labs/scriptc 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 58/100
vercel-labs/scriptc#4865 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 58/100
vercel-labs/scriptc#4864 ·
维护者通常 1 天内回复
-
Windows ARM64 as a cross-compile target可能已有人在做 @hum-n 于 1 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 35/100
vercel-labs/scriptc#4858 ·
维护者通常 1 天内回复
-
post-merge-bisect-unresolved
难度 3/5 1-2 天 新手友好度 43/100
vercel-labs/scriptc#4791 ·
维护者通常 1 天内回复
-
post-merge-bisect-unconfirmed
难度 5/5 一周以上 新手友好度 12/100
vercel-labs/scriptc#4755 · 1 条评论 ·
维护者通常 1 天内回复
查看 vercel-labs/scriptc 的全部 Issue
相似的 Issue
-
bug data-types
难度 2/5 1-3 小时 新手友好度 88/100
ClickHouse/clickhouse-js#1293 ·
维护者通常 1 天内回复
-
area: middleware enhancement good first issue
难度 2/5 1-3 小时 新手友好度 68/100
-
agent/quality testing
难度 1/5 1 小时以内 新手友好度 95/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 92/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
juspay/agent-distro#203 ·
维护者通常 1 天内回复