Skip to content

fix(extraction): walk declaration initializers scoped to the declared symbol (#1510) - #1802

Merged
colbymchenry merged 1 commit into
mainfrom
forge/fix-1510-declaration-initializers
Sep 8, 2026
Merged

colbymchenry merged 1 commit into
mainfrom
forge/fix-1510-declaration-initializers

Conversation

@colbymchenry

Copy link
Copy Markdown
Owner

Summary

Linux verification (fail to pass)

Linux x64, Node v22.19.0, rebuilt dist + native kernel. Evidence: /workspace/cg-1510-repro/{before,after}.

Language Before After
TS/JS load on file node; object/list missing constant:eager; object/list retained
Python assignment RHS empty owned by declaring name
Java only directCall fieldLambda, anon run, eager present
Kotlin property/init/destructuring empty retained on declaring symbols
Scala val initializer empty fieldLambda/direct/lazily owned
Rust const/static empty LEN/REGISTRY owned

Focused initializer vitest: 10/10 wasm + 10/10 kernel. Related: 879 passed, 1 skipped. Torture parity: 12/12.

Note

Agency land of #1511; close that PR as superseded. Do not merge this from Forge — review as usual.

Test plan

  • FAIL reproduced on Linux main tip across six languages
  • PASS on wasm + rebuilt kernel
  • Focused vitest green
  • CI on this PR

Squash danusha2345's PR #1511 at d282f9e onto main 8c9c476,
preserving its nine non-merge commits and main's existing Unreleased notes.
Calls in Kotlin, Java, TS/JS, Scala, Rust and Python declaration initializers
now retain the owner established by the upstream regression expectations.
Include the upstream CFML, dynamic-dispatch summary and viewer follow-ups.

Linux fail-to-pass validation (Node 22.19.0, rebuilt dist and native kernel):
- Before: TS load belonged to file:app.ts; Python/Kotlin/Scala/Rust calls
  vanished; Java lost the field-lambda, anonymous override and eager calls.
- After: all six languages PASS; 12 native/WASM LF/CRLF parity checks PASS.
- Focused initializer regressions: 10 passed with CODEGRAPH_KERNEL=0 and
  10 passed with the kernel enabled; Kotlin's grammar fallback is recorded.
- Related regression suites: 879 passed, 1 skipped across 15 test files.
- Evidence: /workspace/cg-1510-repro/before and /workspace/cg-1510-repro/after
  (combined test output: after/vitest.log).

Fixes #1510
Supersedes #1511

Co-authored-by: danusha2345 <ewidusoc498@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant