pipeline_python_init_function_shares_submodule_qn pinned the old Class
target for Layout("demo"). Layout defines __init__, so the constructor
call now lands on that method. The other tests that pin the contract
were moved in the previous commit; this one reached main afterwards.
Refs #1642
Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
A Python construction call resolved to the Class node, so a user
__init__ never received a caller from ClassName(...) and the dead-code
view reported live constructors as unreferenced.
When the called name is the class itself, resolve it to the __init__
found on the class or, depth-first, its declared bases (the lookup
super().__init__() already uses), with a new lsp_constructor_init
strategy that joins the textual call site through its reason. Classes
with no user __init__ keep the Class target (lsp_constructor), as does
a builtins.* __init__. Calls through an instance (f = Foo(); f()) are
unchanged, since they dispatch to __call__.
This changes the documented Class-target contract for classes that
define __init__; the three tests that pinned it are updated.
Refs #1642
Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
That call now passes false for the error argument when the method is
server/discover and true for every other unknown method, so the probe is
logged as level=info with status=ok while other misses stay level=warn
and status=error. The JSON-RPC response is still -32601 Method not
found. The new test server_handle_discover_probe_logs_info checks those
log fields, checks that unknown/method still logs a warning, checks that
an initialize request for 2026-07-28 still negotiates 2025-11-25, and
checks that resources/list still returns an empty resource list.
Fixes#2433
Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Addresses the four blockers from review:
- Capture the expected worker count while CBM_WORKERS is still unset in
mcp_auto_index_in_process_uses_background_worker_policy, so the assertion no
longer reads the lane override restored just before it.
- Give pipeline_background_policy_preserves_index_results a fixture past
MIN_FILES_FOR_PARALLEL and drop any inherited CBM_WORKERS /
CBM_INDEX_SINGLE_THREAD pin, so it really compares an all-core index against
a headroom index instead of two sequential runs.
- Route the two remaining all-core sites through cbm_pipeline_worker_count:
the LSP surface pass and incremental manifest hashing. The pipeline is
plumbed into cbm_pipeline_build_semantic_manifest for that.
- Rename the hidden key _background to _cbm_background, matching the existing
_cbm_index_policy convention, across every producer and consumer.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Du315CaKLufAYPEdEwcocq
Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
The markerless stale-rendezvous recovery test reset the activation runtime
parent to NULL instead of restoring g_cli_suite_runtime_parent, so every
later cli test ran the activation probe against the developer's real
/tmp/cbm-daemon-<uid>. Restore the suite value per the contract at
tests/test_cli.c:61-65 and the sibling at :1310.
Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
cbm_store_node_degree backs the MCP get_code_snippet callers/callees
counts and the Cypher in_degree/out_degree virtual property, which are
deliberately CALLS-scoped. Restore it to CALLS-only and scope the
INHERITS/IMPLEMENTS broadening to cbm_store_search alone, which is the
search_graph surface issue #558 is about. Adjust the new tests so
node_degree assertions expect CALLS-only counts while the search_graph
result assertions expect the broadened structural degree.
Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
search_graph reported in_degree/out_degree of 0 for Class nodes that
have real INHERITS edges, because the degree computation in both
cbm_store_node_degree (Cypher virtual properties) and cbm_store_search
(result population and min_degree/max_degree filter) only counted CALLS
(and USAGE) edges. A min_degree filter therefore silently excluded
well-connected classes.
Broaden the edge-type predicate in both surfaces to
IN ('CALLS', 'USAGE', 'INHERITS', 'IMPLEMENTS') so search_graph and
Cypher report the same edge-type-agnostic degree and stay consistent.
Add regression tests covering: a parent class with N INHERITS children,
combined CALLS+INHERITS degree without double counting, min_degree now
including inheritance-only classes, and isolated nodes still reporting
zero.
Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
- Declare cbm_artifact_export_last_error() in artifact.h and drop the ad-hoc
forward declarations in pipeline.c and test_artifact.c so there is a single
shared declaration.
- Document that dump_and_persist_hashes now intentionally propagates a failed
artifact export as a pipeline error (previously silently ignored), so the
behavior change is recorded in-tree.
- Use MoveFileExA(MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH) for the
Windows replace in write_file_atomic instead of unlink+rename; it replaces
the destination atomically (credit @Ayush7Ranjan, from #492).
Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Drop the repo-local .git/config pass in resolve_global_excludes_path() so
an untrusted repo cannot point core.excludesFile at an arbitrary file (e.g.
~/.ssh/id_rsa) and have cbm open and read it merely by being indexed. git is
safe here because it only trusts a repo's .git/config after a deliberate
clone/init; the indexer has no such trust step. Global excludes now resolve
only from the user-owned ~/.gitconfig and $XDG_CONFIG_HOME/git/config. A
repo's own ignores remain handled by .gitignore / .cbmignore.
Add a guard test asserting a repo-local .git/config whose excludesFile points
outside the repo is ignored, not read.
Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>