Repository navigation
fix(javascript): resolve literal spreads and const aliases in kill signals - #10678
Conversation
…gnals Address review feedback on the kill() signal fact: - Drop the semanticResolutionBlocked import, which isUnshadowedGlobal superseded. - Expand spreads of array literals before selecting the signal, so kill(...[]) reports Node's SIGTERM default and kill(...["SIGINT"]) reports SIGINT. A spread of anything else stays unknown. - Follow const aliases whose only write is one unconditional initializer (the same !mutable + semanticStableInitializer rule other producers use), so `const signal = undefined; kill(signal)` reports SIGTERM. let, var, reassigned, and shadowed bindings stay unknown. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Medium impact] The PR appears safe to merge; the requested test coverage is now present. SummaryResolves child-process kill signals through literal array spreads and immutable aliases.
Reviews (2) · Last reviewed commit: "test(javascript): cover array holes, nes..." · Reviewed by Greptile |
…ad before an argument in kill signals Review follow-up: firstRuntimeArgument has separate paths for an array hole, a nested array spread and an empty spread followed by another argument. child.kill(...[, "SIGINT"]) sends SIGTERM, child.kill(...[...["SIGINT"]]) sends SIGINT and child.kill(...[], "SIGKILL") sends SIGKILL; the case now pins all three.
|
Ready to merge: full CI is green on this head, Greptile's latest review is 5/5 with no open threads, and it merges into main 42cab26 without conflicts. |
gensokyo-dev
left a comment
There was a problem hiding this comment.
Verified: the new kill-signal cases fail on main and pass here. Spreads of array literals, holes, void and the unshadowed undefined resolve to SIGTERM, and const aliases resolve only through single unconditional initializers; anything else stays unknown. Thanks, and thanks to the original author of #2830.
Summary
Supersedes #2830 by @ahmed0magdy. That PR has been inactive since 2026-10-26, is about 4,500 commits behind
mainand never had its readiness declaration filled. Its fix commit is cherry-picked unchanged with @ahmed0magdy as the author; it applied to currentmainwithout conflicts. If @ahmed0magdy reopens or updates #2830, close this one.The
kill()signal fact on child-process interactions read only the first syntactic argument. Two common spellings therefore stayed unknown:child.kill(...[])andchild.kill(...["SIGINT"]): a spread of an array literal, which Node receives as no argument (SIGTERM) or"SIGINT";const signal = undefined; child.kill(signal)andconst named = "SIGKILL"; child.kill(named): immutable const aliases.Change and scope
src/domain/javascript/javascriptSemanticChildProcesses.ts:undefined;!mutableplussemanticStableInitializer, the rule other producers use);let,var, reassigned, shadowed and non-literal spreads unknown.Evidence and regression coverage
javascriptSemanticAnalysis.native_bindings.test.tsadds one case with 9 calls covering expanded spreads, unexpanded spreads, const aliases,let, reassignment and a shadowedundefined.mainit fails: all 9 signals arenull.Validation performed
npm run test:localover the child-process andjavascriptSemanticAnalysis.*tests: 56 files, 1,954 tests passed.npm run check:fastpassed.Author readiness
Human owner: @Davmunrey
Before merge
type(scope): outcome.