332 Commits
Author SHA1 Message Date
Martin Vogel dedd429215 Merge origin/main into fix/swift-init-extraction
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-03 18:09:19 +01:00
Martin Vogel 6d5cb97b6f Merge origin/main into fix/swift-init-extraction
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-02 22:00:45 +01:00
Martin Vogel ff74ab0982 Merge origin/main into fix/php-inline-html-2000
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-02 18:09:51 +01:00
Martin Vogel b2edaef43c Merge origin/main into fix/swift-init-extraction
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-02 02:38:00 +01:00
Martin Vogel e8cb85cf0f Merge origin/main into fix/php-inline-html-2000
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 21:30:01 +01:00
Petteri Ponsimaa 6e54ac3ce7 Merge origin/main into feat/nextjs-app-router-routes
Main took semantic index version 12 for its Markdown section change, so
the Next.js App Router routes move to version 13 with their own history
entry. pipeline_nextjs_semantic_upgrade_issue759 now starts from a
version-12 index.

Signed-off-by: Petteri Ponsimaa <petterip@gmail.com>
2026-11-01 17:19:23 +02:00
Martin Vogel 176991c036 Merge origin/main into fix/swift-init-extraction
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 00:05:24 +01:00
Martin Vogel 2caf51a4c6 fix(elixir): a folded multi-clause function carries the metrics of every clause
Since #2371 the clauses of a multi-clause function fold into one Function
node whose span covers all of them, but only the first clause was measured:
the folded node kept the complexity, cognitive, loop and access metrics and
the line count of that clause while its span grew.

fold_elixir_clause now receives the metrics of each clause it folds and
adds them to the node: cyclomatic, cognitive and loop_count add up,
loop_depth and max_access_depth take the deepest clause, every clause past
the first adds one dispatch decision to cyclomatic, and lines is recomputed
from the folded span. A clause whose walk reports
CBM_WALK_METRIC_UNAVAILABLE makes the folded value unavailable rather than a
partial sum. This is the treatment proposed in the PR description and
agreed in the review thread.

Indexed elixir-lang/elixir (669f8481, 6703 Elixir Function nodes) against
the merge parent: the 2212 folded functions change, the 4491 single-clause
functions keep identical metrics, Functions with complexity above 0 go from
3412 to 4785, and every node now has lines equal to its span (4491 did
before).

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 21:31:23 +01:00
Martin Vogel aa3161fd81 fix(elixir): grow the complexity walk stack instead of capping it
elixir_compute_complexity kept its pending frames in one fixed 4096-entry
array (48 bytes each, 196,608 bytes in a single stack frame) and stopped
pushing children once it was full. Children are pushed last to first, so a
wider body lost its FIRST children and the function reported a lower
complexity with no signal, on exactly the largest functions. Worker threads
do not get the 8 MB main-thread stack, so the array was a risk of its own.

It now uses the walker pattern cbm_compute_complexity has used since #2375:
a 512-frame on-stack first chunk that spills to the heap through
cbm_walk_stack_reserve (memory core, class EXTRACT) and is released with
cbm_walk_stack_release. If the stack cannot grow, every metric reports
CBM_WALK_METRIC_UNAVAILABLE instead of an undercount. This answers items 2
and 3 of the 2026-08-20 review.

The new test builds a 5000-statement body of alternating if and for. The
fixed stack reports complexity 4095 for it instead of 5000.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 21:31:06 +01:00
Martin Vogel b19ac1e923 test(elixir): the same body shape under other names shares a fingerprint
The 2026-08-20 review asked for the fingerprint to be equal for two
structurally identical functions with different names, since duplicate
detection is what it exists for. tally repeats the body of summarize with
every function and variable name changed, and both must carry the same
MinHash values. The fingerprint hashes normalised leaf token kinds, so names
never enter it.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 21:30:27 +01:00
Martin Vogel d5cf735ce0 test(elixir): pin the fingerprint half of the complexity/fingerprint change
The carried #1731 test asserted complexity and line counts but never the fingerprint, which is half of what the change adds. A body past the MinHash size gate must now carry one, and a one-expression body must not. Raised in the 2026-08-20 review.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 21:30:02 +01:00
Martin Vogel 2e6ab84fd9 Merge origin/main into the Elixir complexity branch
Brings the branch up to f6fb3e0d, which carries #2371 (guarded def heads,
the multi-clause fold and typespec attributes) and #1730.

Two files conflicted, both at spots where main rewrote the Elixir
definition code. Each is rebuilt as the main version of the file plus the
lines this branch adds, at the same place; no conflict side is
concatenated:

- internal/cbm/extract_defs.c: the complexity helpers sit between the
  definition comment and extract_elixir_func_def as before, and the
  metrics plus fingerprint block follows def.is_exported in the unfolded
  path.
- tests/test_extraction.c: TEST(elixir_complexity_and_fingerprint) and
  its RUN_TEST go just before the Haskell block, after the Elixir tests
  main added.

Per-file patch-id (git diff -U0 | git patch-id --stable) of this merge
against origin/main equals the branch change against its old base:
extract_defs.c b591a7bc, test_extraction.c 7b507156. The merge removes no
line of either file.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 20:56:13 +01:00
Martin Vogel a5c5b42fea Merge origin/main into fix/elixir-extraction-defects
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 16:38:55 +01:00
Martin Vogel 2e8865c8d0 Merge origin/main into fix/swift-init-extraction
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 16:38:48 +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 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 f6100d905e Merge origin/main into fix/swift-init-extraction
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 06:10:54 +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 bdf204b2e5 Merge origin/main into fix/elixir-extraction-defects
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-30 22:48:50 +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 ca1f750469 Merge origin/main into fix/swift-init-extraction
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-30 22:29:33 +01:00
Petteri Ponsimaa 1237096a46 Merge origin/main into feat/nextjs-app-router-routes
Main has used semantic index versions 10 and 11 since this branch took 10,
so the Next.js App Router routes move to version 12 with their own history
entry: an index main wrote at 11 rebuilds once for the new Routes.
pipeline_nextjs_semantic_upgrade_issue759 now starts from a version-11 index.
The other conflicts were tests both sides added at the same place; both kept.

Signed-off-by: Petteri Ponsimaa <petterip@gmail.com>
2026-10-29 22:13:57 +02:00
Martin Vogel f925afaab7 Merge origin/main into fix/elixir-extraction-defects
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-29 06:32:58 +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 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 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 bd19732017 Merge origin/main into fix/elixir-extraction-defects
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-29 03:33:10 +01:00
Martin Vogel 97628c0160 Merge origin/main into fix/swift-init-extraction
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-29 03:33:02 +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 1c97a4d8a6 Merge origin/main into fix/elixir-extraction-defects
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-29 02:33:59 +01:00
Martin Vogel 5efa56463e Merge origin/main into fix/swift-init-extraction
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-29 02:33:31 +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 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 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 ebe2e6fa30 Merge origin/main into fix/swift-init-extraction
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-29 01:10:30 +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
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 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 6cc63d2c69 Merge origin/main into fix/elixir-extraction-defects
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 18:15:38 +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 3fbe17f7fc Merge origin/main into fix/swift-init-extraction
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 18:15:12 +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 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 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 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 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 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 c4bb4b524f Merge origin/main into fix/elixir-extraction-defects
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 04:07:56 +01:00