Commit Graph
4836 Commits
Author SHA1 Message Date
Martin Vogel 435baf6bd8 fix(ruby-lsp): survive allocation failure in the stdlib seed
The REG_* macros wrote through the return-type vector without checking
the allocation, and registered entries whose formatted QN came back NULL.
A shared ruby_seed_signature helper now leaves a failed vector out, so the
signature types as unknown (the fallback ruby_register_method already
uses), and REG_METHOD / REG_SMETHOD skip an entry whose formatted name is
NULL, since a NULL QN would reach strcmp in finalize and in every lookup.

rubylsp_stdlib_seed_survives_alloc_failure seeds a registry from an arena
that cannot allocate. Before: UBSan reported a store to a null pointer and
the run crashed with SEGV at ruby_stdlib_data.c:163. After: every
registered entry carries a name, the registry finalizes, and the Kernel
built-ins with literal names still resolve.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 21:17:28 +01:00
Martin Vogel 214a9ac843 fix(ruby-lsp): build constant paths in one pass
ruby_const_path recursed once per :: segment and re-formatted the growing
prefix at every level, so an A::B::C path cost one stack frame per segment
and quadratic bytes in the per-file arena. It now follows the scope fields
in a loop: one pass measures the segments, a second copies them right to
left into a single buffer. The result is the same string as before,
including a leading ::Foo and a scope that is not a constant path.

rubylsp_const_path_is_linear pins the arena bytes for an 800 vs a 1,600
segment path (before: 494,520 -> 1,660,520 bytes already at 400 -> 800
segments; after: 136,248 -> 150,848 at 800 -> 1,600) and the exact class
QN for a five-level path and for a rooted ::Top::Inner.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 21:17:28 +01:00
Martin Vogel 0210ea9794 fix(ruby-lsp): search each ancestor once per method lookup
The mixin walk recursed into prepend and include at every level with only
the depth cap of 16 as a bound, so a module that both prepends and
includes the next one doubled the paths per level: a miss on a chain of n
such modules cost 2^n visits (measured 4 -> 20,744 for n = 2..14).

Each lookup is now one walk that carries the fail-closed blocked flag and
a visit stamp. Ruby linearizes ancestors, so a module reached a second
time in one walk was already searched and missed (a hit or a block would
have ended the walk); skipping the repeat keeps every lookup linear in the
ancestors the file declares. Lookup order, hits and the fail-closed rules
are unchanged. The stamps live on the per-file class table, so the walk
allocates nothing.

The walk entries feed CBM_LSP_WORK (seam builds only; product builds
compile it to nothing). rubylsp_mixin_walk_visits_each_module_once pins
linear work for the doubled chain on the instance and the class side
(before: 66 -> 4,098 visits for n = 6 -> 12; after: 14 -> 26) and keeps a
diamond and a prepend-plus-include pair resolving exactly once.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 21:17:21 +01:00
Ben Fairless 41f27cca4b Merge branch 'main' into feat/ruby-lsp-per-file 2026-10-29 15:53:17 +08:00
Martin Vogel a3831c9795 Merge pull request #2017 from kobaz/feat/path-allow-broad-too-shallow-override
feat(workspace): add PATH_ALLOW_BROAD override for too-shallow roots
2026-10-29 07:53:11 +01:00
Martin Vogel d807b1eca7 Merge pull request #2419 from Fieldnote-Echo/perf/py-lexical-ancestor-kind
perf(python): climb the walk cursor for scope-directive and default checks
2026-10-29 06:32:06 +01:00
Martin Vogel 3be5a02708 Merge pull request #2601 from bline/fix/doc-link-missing-member
fix(doc-links): report a path::member reference to a missing member (#2587)
2026-10-29 04:47:39 +01:00
Martin Vogel 59d6b52679 Merge pull request #2421 from Fieldnote-Echo/fix/dotd-depinfo-sniff
fix(discover): keep make/cargo dep-info .d files out of the D grammar
2026-10-29 04:32:21 +01:00
Martin Vogel ba4122d3cc Merge pull request #2418 from Fieldnote-Echo/fix/sequential-definitions-retention
fix(pipeline): free trees and compact results in sequential definitions pass
2026-10-29 03:47:38 +01:00
Martin Vogel 006101ae4f Merge pull request #1710 from benrfairless/fix/ruby-namespaced-constructor-callee
fix(extraction): reduce A::B.new callee to the constant
2026-10-29 03:32:26 +01:00
Martin Vogel 2658a181b5 Merge pull request #2600 from bline/fix/snapshot-coherence
fix(mcp): verify content for freshness and snippets; expose store generation (#2585)
2026-10-29 03:27:46 +01:00
Martin Vogel beddaaaa2e Merge pull request #2731 from DeusData/fix/mimalloc-3.5.3-preinit-free
fix(mem): vendor mimalloc 3.5.3 so free(NULL) before init is safe (supersedes #2562)
2026-10-29 02:47:58 +01:00
Martin Vogel ba0f8a8409 Merge pull request #2717 from oscarbol09/docs/windows-troubleshooting
docs(troubleshooting): add Windows troubleshooting guide
2026-10-29 02:47:52 +01:00
Martin Vogel 7b398de4e4 Merge pull request #2769 from gaurav0107/fix/2033-go-type-alias-alias-of-is-never-register
fix(go-lsp): follow a type alias declared in another file of the package
2026-10-29 02:32:34 +01:00
Martin Vogel c4e37c1239 Merge pull request #2290 from knewstimek/pr/windows-setenv-utf8
fix(windows): set UTF-8 environment values through wide CRT
2026-10-29 01:56:52 +01:00
Martin Vogel f1efbf60d8 Merge pull request #2746 from gaurav0107/fix/2297-typescript-calls-through-a-renamed-named
fix(ts-lsp): resolve calls through renamed named imports
2026-10-29 01:33:12 +01:00
Martin Vogel 0002acd002 Merge pull request #2090 from sanskar717/feat/solidity-support
fix(lang): track Solidity modifier invocations as decorators
2026-10-29 01:08:06 +01:00
Martin Vogel 442989ebaa Merge pull request #2754 from gaurav0107/fix/2666-c-extraction-a-macro-argument-identifier
fix(pipeline): a bare C reference never binds a struct Field
2026-10-29 01:07:58 +01:00
Martin Vogel 72ab1cefe1 Merge origin/main into perf/py-lexical-ancestor-kind
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-29 00:19:09 +01:00
Martin Vogel e1405eaeb7 Merge origin/main into fix/sequential-definitions-retention
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 23:27:16 +01:00
Martin Vogel 3bd645efd5 Merge origin/main into pr/windows-setenv-utf8
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 18:15:29 +01:00
Martin Vogel 95279bd74f Merge origin/main into fix/snapshot-coherence
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 18:15:21 +01:00
Martin Vogel e2c9de1d1b Merge origin/main into feat/solidity-support
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 18:14:55 +01:00
Martin Vogel ba246dad4f Merge origin/main into fix/2033-go-type-alias-alias-of-is-never-register
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 18:14:30 +01:00
Martin Vogel 9fe25c476f Merge origin/main into fix/doc-link-missing-member
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 18:14:22 +01:00
Martin Vogel 9ae55eb0b6 Merge origin/main into feat/path-allow-broad-too-shallow-override
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 18:13:51 +01:00
Martin Vogel eb76d04acf Merge origin/main into fix/dotd-depinfo-sniff
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 18:13:34 +01:00
Martin Vogel 1aeaf6f024 Merge origin/main into fix/2666-c-extraction-a-macro-argument-identifier
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 18:13:26 +01:00
Martin Vogel 849e74f69e Merge origin/main into fix/ruby-namespaced-constructor-callee
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 18:13:18 +01:00
Martin Vogel 5d374a7634 Merge origin/main into fix/2297-typescript-calls-through-a-renamed-named
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 18:13:10 +01:00
Martin Vogel 5d97172b89 Merge origin/main into docs/windows-troubleshooting
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 18:12:53 +01:00
Martin Vogel ebdf9bafd5 test(mem): unpoison mimalloc output before the handler reads it
The MSan output handler checked msg[0] before marking the text
initialized, so MSan reported the handler's own read
(tests/test_main.c:2151). Unpoison first, then test for the empty
replay.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 18:11:31 +01:00
Martin Vogel dca2a44ef0 Merge pull request #2807 from divakantpandey/fix/2787-pi-extension-string-enum
fix(cli): emit string enums as Type.String({ enum }) in Pi adapter (#2787)
2026-10-28 18:10:35 +01:00
Martin Vogel e425666aab Merge pull request #2760 from gaurav0107/fix/2388-extraction-remaining-fixed-size-tsnode-w
fix(extract): YAML walkers grow their stacks instead of capping content
2026-10-28 18:08:25 +01:00
Martin Vogel 635f8e3b63 Merge pull request #2309 from BumaldaOverTheWater94/fix/home-user-symlink-alias
fix(cli): trust root-owned per-user /home entries during activation walk
2026-10-28 18:08:15 +01:00
Martin Vogel 2796460efe Merge pull request #2305 from pcristin/fix/issue-2265-unresolved-call-coverage
fix(pipeline): expose unresolved call coverage
2026-10-28 18:07:59 +01:00
Martin Vogel ea892c5349 Merge pull request #2817 from DeusData/feat/drift-reminder-hook
feat(cli): note when a Claude Code session keeps searching without the graph
2026-10-28 18:07:44 +01:00
Ben Fairless b86e65df39 Merge branch 'main' into feat/ruby-lsp-per-file 2026-10-28 19:38:05 +08:00
Divakant Pandey 323e88fa0b Merge branch 'main' into fix/2787-pi-extension-string-enum 2026-10-28 16:51:53 +05:30
Pcristin 8a2f718e1c Merge branch 'main' into fix/issue-2265-unresolved-call-coverage 2026-10-28 08:27:52 +00:00
Martin Vogel 820cd02307 Merge pull request #2161 from htarnacki/fix/discover-external-fast-mode
fix(discover): retain external source directories in fast mode (#2151)
2026-10-28 07:47:51 +01:00
Martin Vogel 1306c276f2 Merge origin/main into fix/2033-go-type-alias-alias-of-is-never-register
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 07:27:51 +01:00
Martin Vogel ee9dc48d1e Merge origin/main into fix/issue-2265-unresolved-call-coverage
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 07:07:50 +01:00
Martin Vogel 5b3fe0646f Merge origin/main into fix/ruby-namespaced-constructor-callee
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 06:48:23 +01:00
Martin Vogel 62965bc0f6 test(doc-links): exercise the ambiguous member row on a Ruby group (#2587)
The "group shrinks" step of doc_links_md_member_missing_incremental
removed one of two Python `area` methods and expected the closure-repair
route. Since the Python namespace admission on main (merged into this
branch with origin/main), a Python file whose surface changes always
takes the full route (closure_decline reason=python_namespace_changed),
so the step ran FORCED_FULL on every platform; the Windows leg was simply
the first to report it. Nothing here depends on timing: the planner
compares content hashes.

The group now lives in a Ruby file. Ruby has no doc-link scope, so the
lost method reports no removed name and the document re-resolves only
through the ambiguous `path::member` rule, which this step exists to
bind. (A Rust group was tried too: its scope reports the method as a
removed name, so the step passed with the rule removed.)

Test: the step takes closure repair with closure=2 (shapes.rb and
docs/areas.md). With "ambiguous" dropped from doc_row_member_reason it
stays on closure repair with closure=1 and keeps the stale ambiguous row
where the full index has the Areas -> Square.area edge.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 05:37:32 +01:00
Martin Vogel 6217b49381 Merge origin/main into feat/solidity-support
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 05:27:56 +01:00
Martin Vogel 8984e7e989 Merge origin/main into fix/2297-typescript-calls-through-a-renamed-named
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 05:27:48 +01:00
Martin Vogel 8aeee865e6 Merge origin/main into pr/windows-setenv-utf8
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 04:27:57 +01:00
Martin Vogel bd144c2544 Merge origin/main into fix/snapshot-coherence
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 04:07:48 +01:00
Martin Vogel 8012a7516f Merge origin/main into fix/2388-extraction-remaining-fixed-size-tsnode-w
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 03:28:13 +01:00