Commit Graph
455 Commits
Author SHA1 Message Date
Martin Vogel 468f0a1058 fix(resolver): an admitted alias call leaves no unresolved row
`import { foo as bar }` then `bar()` kept an unresolved_calls row even with the exact
edge admitted. The per-file LSP reported the exported name, and the diagnostic joins
its call site by spelling, so it never found the occurrence that later cleared it.
It reports the spelling the file wrote now.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 17:17:34 +01:00
Martin Vogel 1afb6e08f4 test(resolver): TS known gaps the new rules satisfy become required
Twelve RQ_KNOWN_GAP cases (inline constructor receivers, implicit constructors,
parameter-property and field receivers, a TS script's own declaration) now resolve
to the exact oracle target, and rq_check reports them as PROMOTE_TO_REQUIRED. Their
oracles are unchanged; only the excuse goes.

tslsp_param_property_this_dispatch_issue514 and tslsp_field_new_initializer_issue514
pinned the inference label lsp_ts_method. Those receivers are proved now, so they
assert the stricter ts514_proved_count at the same exact target; the decoy counts
(wrong override, unknown, factory, plain parameter) are untouched.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 17:03:47 +01:00
Martin Vogel 7a13f401eb wip(resolver): JavaScript and TypeScript modules, scopes and exports
Checkpoint against a usage limit. Proved on express and kilocode subtrees; the
test suites have not run on this tree yet, so later commits may adjust it.

- Real lexical scopes replace the module-wide veto on any local name.
- CommonJS syntax, module extensions, package.json type and TypeScript prove a
  module; a classic browser script stays unproved.
- require bindings and an exported-name table: aliases, default exports, barrels,
  export *, export * as, module.exports and exports.x.
- Directory imports resolve through main and index.
- TS method proofs survive destructuring, catch, generics and decorators, take
  own and inherited methods, this.field and new X() receivers, and have no budget.
- TS annotations give exact type-name occurrences.
- A registered route suppresses the unresolved diagnostic again.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 14:07:04 +01:00
Martin Vogel 6f9374281f Merge main a6d0d6c9 into the strict shared resolver
Threads main's Go rel_path (#1910) through the proof-source and import-snapshot variants, keeps main's ADR sidecar so the rebuild no longer re-applies ADRs, and keeps the feature's removal of the import name fallback and JVM tail join, inside which main had added a generated-member filter. Main took semantic index version 12 for Markdown Section names, so the resolver generation becomes version 13.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 22:12:49 +01:00
Martin Vogel de578b0d47 test: restore main's strategy helper and fix the yyjson include after the merge
The reviewed reconciliation of tests/test_pipeline.c kept main's call sites of cross_file_call_has_strategy but dropped its definition, and test_resolver_integration.c used a bare yyjson.h that no include path provides. Neither candidate had been compiled.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 21:57:40 +01:00
Martin Vogel ea54e63d55 Merge pinned main 7b398de4 into the strict shared resolver
Resolves the nine textual conflicts with the reviewed reconciliation: semantic index version 12 on top of main's migrations, digest stream v3 because both sides independently claimed v2, incremental metadata-current requires main completeness and the strict resolver generation receipt, and exact call joins by extraction index, full span and origin. Unresolved-call diagnostics reconcile only after final proof sealing and successful projection.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 21:34:07 +01:00
Martin Vogel a6d0d6c9bb Merge pull request #1936 from ilyabrykau-orca/fix/go-field-type-hint-owner-segment
fix(pipeline): bind field_type_hint by owning QN segment, not substring
2026-10-31 21:28:06 +01:00
Martin Vogel 7be2becf73 Merge pull request #2315 from 0xb007ab1e/fix/adr-reindex-race
fix(pipeline): preserve concurrent manage_adr write across reindex swap
2026-10-31 19:55:37 +01:00
Martin Vogel 257821805c Merge origin/main into fix/go-field-type-hint-owner-segment
Resolved tests/test_pipeline.c as the main version plus this PR diff: the owner-segment field-hint tests follow the new bare init tests, and both RUN_TEST pairs stay registered (pass_parallel.c merged cleanly).

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 19:35:24 +01:00
Martin Vogel a33cddcdba Merge origin/main into fix/go-field-type-hint-owner-segment
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 16:39:01 +01:00
Martin Vogel 8cef96dd88 Merge origin/main into fix/adr-reindex-race
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 16:38:41 +01:00
Martin Vogel 70a7062e18 Merge origin/main into fix/go-bare-init-never-binds
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 16:29:40 +01:00
Martin Vogel 4a78fe6a6b fix(go): a bare init never binds to a package init or an init method
Go gives `init` no binding in the package block: init functions cannot
be referred to from anywhere in a program, and a method or field named
init needs a selector. A bare `init` is therefore always a local name -
a closure (`init := func(ctx) {...}; init(ctx)`), a parameter, or the
`package init` clause of a directory named init.

Before #1915 same_module bound such a name to the flat package init.
With per-file init QNs it now falls through to the short-name fallback
and binds unrelated methods named init. On kubernetes that minted 24
CALLS (22 e2e storage DefineTests closures among them), 28 WRITES,
7 USAGE and one derived TESTS edge, all false.

cbm_go_suppress_bare_init_bind refuses, for a bare Go `init`, any
registry binding onto a Function (every Go Function named init is a
package init) and a weak short-name binding onto a Method or Field.
lsp_* answers and selector calls (`w.init()`) are untouched. Wired at
the CALLS, USAGE and READS/WRITES seams of both resolvers.

Kubernetes, full index, main vs branch: only those 60 edges removed,
nodes identical, no resolver edge added; the 14 LSP-typed selector
CALLS into init methods are unchanged.

Tests: pipeline_go_bare_init_binds_nothing (+ parallel twin) are RED
with the predicate disabled (closure CALLS, parameter CALLS, closure
WRITES, package-clause USAGE onto Watcher.init) and GREEN with it; the
selector control keeps Watcher.Start/Boot -> Watcher.init.
go_bare_init_never_binds_init_namesake pins the predicate.

Refs #1915

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 14:16:05 +01:00
Martin Vogel afb499b62a test(pipeline): pin owner-segment field-type hints for C#
Go no longer runs the parallel field-type hint (e554a2ab), so the Go test
of this PR passes with or without the owner-segment fix. C# still reaches
try_field_type_hint, and its PascalCase method names make every candidate
QN contain a one-letter receiver's hint: `w.Write()` on a StreamWriter was
upgraded to an arbitrary project Write as field_type_hint. The test is RED
on main's pass_parallel.c and GREEN with the fix, and its positive control
pins `store.Put()` to Store.Put, never FileStore.Put.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 13:56:42 +01:00
Martin Vogel 747665d71f Merge pull request #2752 from gaurav0107/fix/2537-go-net-http-servemux-patterns-with-a-met
fix(routes): read Go 1.22 ServeMux method and host patterns
2026-10-31 13:53:35 +01:00
Martin Vogel a2787346c0 Merge origin/main into fix/go-field-type-hint-owner-segment
Resolve tests/test_pipeline.c as main's file plus this PR's own test hunk; the RUN_TEST line is re-anchored before pipeline_go_multi_init_nodes_survive.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 10:08:36 +01:00
Martin Vogel 3e075d59be Merge origin/main into fix/2537-go-net-http-servemux-patterns-with-a-met
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 06:11:15 +01:00
Martin Vogel 0b0e294be0 Merge origin/main into fix/adr-reindex-race
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 06:11:08 +01:00
Martin Vogel 8c62cb3344 Merge origin/main into fix/go-init-qn
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 06:10:26 +01:00
Martin Vogel 47474b668a Merge pull request #2826 from knewstimek/fix/inc-c-family-routing
fix(discover): select C++ for C-family .inc fragments
2026-10-30 22:42:29 +01:00
Martin Vogel 7ee29d8841 Merge origin/main into fix/go-init-qn
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-30 22:33:54 +01:00
Martin Vogel 46c95bcddb Merge origin/main into fix/2537-go-net-http-servemux-patterns-with-a-met
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-30 22:29:48 +01:00
Martin Vogel 359bd2f3ff Merge origin/main into fix/adr-reindex-race
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-30 22:29:41 +01:00
Martin Vogel bff6ce9c23 Merge origin/main into fix/java-record-accessor-calls
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-29 04:48:28 +01:00
Martin Vogel 218123b036 Merge origin/main into fix/adr-reindex-race
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-29 04:48:21 +01:00
Martin Vogel d841ddd177 Merge origin/main into fix/inc-c-family-routing
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-29 04:33:04 +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 fec0b87b4c Merge origin/main into fix/2537-go-net-http-servemux-patterns-with-a-met
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-29 03:33:16 +01:00
Martin Vogel 7a9e6c628e Merge origin/main into fix/go-init-qn
test_pipeline.c: kept the main version and re-applied this branch diff; its three Go init RUN_TESTs precede the #2769 alias tests. test_go_lsp.c: the two #2769 alias tests pass NULL for the new rel_path parameter.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-29 02:51:35 +01:00
Martin Vogel 32bd1d3047 Merge origin/main into fix/java-record-accessor-calls
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-29 02:34:20 +01:00
Martin Vogel 0947903cb2 Merge origin/main into fix/adr-reindex-race
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-29 02:34:13 +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 b66ac8454c Merge origin/main into fix/adr-reindex-race
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-29 01:58:40 +01:00
Martin Vogel 19b57f3e64 Merge origin/main into fix/go-init-qn
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-29 01:58:11 +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 d758fd6080 Merge origin/main into fix/2537-go-net-http-servemux-patterns-with-a-met
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-29 01:10:44 +01:00
Martin Vogel 7ee3124bca Merge origin/main into fix/java-record-accessor-calls
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-29 01:10:38 +01:00
knewstimek 51fd445f66 fix(discover): select C++ for C-family include fragments
Recognize explicit C-family code in .inc files before extraction while
preserving BitBake recipe bodies and ObjectScript markers. Exercise disk
and byte classifiers, callback/linkage extraction and fast/full indexing.

Signed-off-by: knewstimek <knewstimek@users.noreply.github.com>
2026-10-29 07:05:52 +09:00
Martin Vogel 2aaef23111 Merge origin/main into fix/java-record-accessor-calls
Conflict in src/pipeline/pass_calls.c: #2305 moved the inline LSP-target
emission of resolve_single_call into calls_emit_lsp_target() and added
the unresolved-call evidence around emit_classified_edge. The Java
data-member veto of this branch is ported into that structure:

- calls_emit_lsp_target: the veto runs once the target node is known,
  before the resolution, the evidence and any spawn or edge. It returns
  true (handled), so as before no edge is emitted and no registry
  fallback runs after it.
- resolve_single_call: the veto stays in front of main's
  candidate_qn/calls_emitted bookkeeping, matching the parallel
  resolver, whose veto also precedes that bookkeeping.

pass_parallel.c and the remaining files merged cleanly.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 22:57:43 +01:00
Martin Vogel f33f976458 Merge origin/main into fix/2537-go-net-http-servemux-patterns-with-a-met
origin/main (#2305) moved the route-registration checks of the sequential
resolver into calls_emit_route_call and made emit_classified_edge return
whether it emitted. Keep the structure and bookkeeping of main and carry
the ServeMux pattern reading over: emit_classified_edge and
calls_emit_route_call now take the registration path from route_reg_path,
so "POST /v1/x" patterns register in both passes as before.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 22:43:04 +01:00
Martin Vogel dda8f8a953 test(pipeline): restore the tests split by the merge resolution
Main and this branch added tests at the same spot of tests/test_pipeline.c.
Joining the two conflict sides lost the closing lines git had moved out
of the conflict, so a test function was left open and the file did not
compile. Rebuild the file as main plus this branch own changes to it.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 21:49:08 +01:00
Martin Vogel 8fae39e294 Merge origin/main into fix/adr-reindex-race
tests/test_pipeline.c: main and this branch added tests at the same spot;
both are kept unchanged.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 18:29:56 +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 a3ff99de91 Merge origin/main into fix/go-init-qn
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 18:13:42 +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 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 f0f7ff3098 Preserve source fixture bytes for usage resolution tests
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 09:46:44 +01:00
Martin Vogel 9d1642a5c8 Preserve exact resolver oracle source bytes on Windows
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 09:04:45 +01:00
Martin Vogel decc140035 Complete strict resolver regression migration
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 07:37:07 +01:00