dynamic: remaining SC1090/SC2020 lowering gaps for a pi-coding-agent worker (follow-up to #472; related #213 #217 #220 #221 #223)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- node.js, typescript
- 領域
- compilers
調査の方向性
Start by reproducing the scriptc build --dynamic diagnostics with the described Node 26 worker; the issue lists ten remaining sites and their codes, with the eleventh tracked separately in #471. Compare each gap with the open related work in #213, #220, and #221, and decide which cases remain untracked (notably row 2). Done means triage identifies the remaining work and the listed diagnostics are addressed or assigned clear follow-ups.
索引モデルが issue の本文から書いたものです。
説明
Summary
This is a follow-up tracking the --dynamic lowering gaps that still block one real-world worker: a Node 26 ESM program built on @earendil-works/pi-coding-agent, pi-ai, pi-mcp-adapter and typebox. These gaps are distinct from the .node addon case (#471) and the runtime-only failures (#575, #576).
With scriptc build --dynamic, the worker has 11 errors on 0.1.7 and the same 11 on main at 0d9d946. Ten of them are listed below (9× SC1090, 1× SC2020); the eleventh is the .node addon from #471. Coverage is 86/89 statements (96%). The static build has 10 errors.
Remaining diagnostics (from the main build)
| # | Site | Code | Diagnostic |
|---|---|---|---|
| 1 | tools: [...options.tools.map((tool) => tool.name), ...(options.extensionToolNames ?? [])] (object passed to createAgentSession, a package API) |
SC1090 | spreading 'any' into a 'string[]' literal (only a same-element-type array spreads) |
| 2 | const tools = [...createRepositoryTools(root), createDelegateTool(...), createSubmitReportTool(...)] |
SC1090 | spread arguments are not supported yet |
| 3 | pi.setActiveTools([...new Set([...pi.getActiveTools(), ...toolNames])]) (pi is a package ExtensionAPI) |
SC1090 | spreading 'any' into a 'string[]' literal |
| 4 | let unsubscribe = () => {}; unsubscribe = session.subscribe((event) => { ... }) |
SC1090 | using an 'any' value where '() => void' is expected |
| 5 | let unsubscribe = () => {}; unsubscribe = pi.events.on(EVENT, (value) => { ... }) |
SC1090 | using an 'any' value where '() => void' is expected |
| 6 | pi.on("tool_call", (event) => { if (...) return; ...; return { block: true, reason: "...", terminate: true }; }) |
SC1090 | functions with this signature crossing into dynamically-executed code ... |
| 7 | factory: createMcpAdapter({ config }) assigned to a field typed as the package's ExtensionFactory ((pi) => void) |
SC1090 | using an 'any' value where '(any) => void' is expected |
| 8 | return { extensions: [], ready: Promise.resolve() } from a function whose return type is used by a package API |
SC1090 | passing a value of type '{ extensions: number[]; ready: Promise }' into dynamically-executed ('any'-typed) code |
| 9 | const request = JSON.parse(readFileSync(0, "utf8")) as RepositoryAuditRequest; (the type contains a package TSchema-typed field) |
SC1090 | a checked cast of 'unknown' to 'any' ... |
| 10 | lastAssistant?.content.filter((b) => b.type === "text").map((b) => b.text).join("\n").trim() ?? "" |
SC2020 | 'string[] | undefined.join' has no scriptc lowering yet |
Two notes:
- #10: #472 was closed as completed, and the fix is in 0.1.7, but this site (an optional chain continued through
.filter().map().join()) still fails on both 0.1.7 andmain. See my comment on #472. - #8: the array literal is inferred as
number[]instead of the declared element type, which looks like a separate inference issue.
Related upstream work
All of the PRs below are still open and unmerged, so none of them is in a release. I haven't built them against this worker, so the mapping to rows is a guess.
- #472: closed; row 10 still reproduces
- #220 "fix: erase non-validatable 'as T' casts instead of SC1090 in --dynamic mode": probably row 9
- #221 "fix(dynamic): map unmappable function params/returns and type parameters to JSVAL": probably rows 4–7
- #213 "fix: three jsval-representation gaps in checked-dynamic lowering": probably rows 1, 3 and 8
- #217 "fix(dynamic): lower globalThis, JSVAL property access, and 'in' on JSVAL": general JSVAL surface
- #223 "fix(dynamic): propagate JSVAL through .then() callbacks on JSVAL-settling promises": general JSVAL surface
As far as I can tell, nothing tracks row 2 (non-any spread arguments / array spread of a function result).
Related, but not part of this issue: #471 (the .node addon, won't-fix), #575 (.ts npm sources not type-stripped) and #576 (export cycle through a namespace import).
Ask
Could these be triaged together, ideally with a decision on #213, #220 and #221? I'm happy to re-test any of those branches against the worker and report back.
Versions
scriptc 0.1.7 (npm) and main at 0d9d946 (built from source), linux-x64-gnu, Node 26.10.0.
- 主要言語
- TypeScript
- スター
- 5.1k
- フォーク
- 130
- 平均マージ
- 1時間 13分
- マージ済み PR(30日)
- 254
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
vercel-labs/scriptc のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
vercel-labs/scriptc#576 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
vercel-labs/scriptc#575 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
vercel-labs/scriptc#522 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
vercel-labs/scriptc#293 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
vercel-labs/scriptc#265 ·
メンテナーはふだん 1 日以内に返信
vercel-labs/scriptc の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
automated issue report
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
github/copilot-sdk#2804 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
drizzle-team/drizzle-orm#6418 ·
メンテナーはふだん 4 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
diegosouzapw/OmniRoute#15307 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信