You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Django URL route feature slices. New django-route / FeatureKind::Route seed source. The Python mapper now scans .py files that import from django.urls / django.conf.urls and declare a urlpatterns = [...] list for path(), re_path(), and legacy url() entries, emitting one route feature per distinct normalized URL. path() converter prefixes are stripped (<int:year> → <year>); re_path() / url() regexes are normalized (drop ^/$ anchors, rewrite (?P<name>…) named groups to <name>, unescape \/ and \.). The view symbol is resolved onto entry_symbol where possible (views.home → home, ArticleList.as_view() → ArticleList). Tags are [python, framework:django, route]. Consistent with the existing Flask / FastAPI conservatism: include(...) mounts are NOT expanded (the child URLConf contributes its own routes without the parent prefix) and non-literal route patterns are skipped. Ports clawpatch's Django route mapping (python.tsdjangoRouteSeeds). Closes the most common Python web framework gap, since Flask + FastAPI shipped in 0.7.x. Four regression tests cover path() routes with converter stripping, re_path() regex normalization, class-based as_view() symbols with include() skipped, and the django-import gate.
auth-sensitive tag on shape-flagged route slices. Route seeds whose shape suggests a privileged or state-changing surface now carry an auth-sensitive tag: the HTTP method is anything other than GET/HEAD, or a path segment is exactly admin / auth / login / token (segment-exact and case-insensitive, so /authors does not match). Applied across all route mappers — Flask, FastAPI, Django (path-shape only, no verb at the URL layer), and the Node Express/Fastify/Hono server routes. Surfaces a route-shape heuristic for humans and agents reviewing a slice; filter with list_features --tag auth-sensitive. Ported from clawpatch's per-route trust-boundary heuristic, but deliberately demoted to a free-form tag: CodeSage's trust-boundary model stays single-sourced from parsed imports/references (trust_boundary_rules.rs), so a file never shows a boundary it didn't earn from a real include/call. route_is_auth_sensitive lives in the shared mapper module with three unit tests (method, path-segment, empty-method path-only).
CUDA support: .cu / .cuh indexing, target detection, and concurrency boundary..cu / .cuh files are now recognized by language detection (mapped to C++, parsed with the tree-sitter-cpp grammar) — so they enter the structural index and show up in search / find_symbol / find_references, where previously they were skipped entirely. They're deliberately kept out of the C++ .h-dialect signal, so a C project carrying a stray .cu file doesn't have its .h headers re-routed to C++. In the C/C++ mapper, CMake cuda_add_executable / cuda_add_library (legacy FindCUDA macros) are parsed alongside add_executable / add_library, and any target — however declared — that pulls in a .cu / .cuh source is tagged cuda; standalone .cu files with a top-level main() get the tag too. Filter with list_features --tag cuda. The security signal is reference-derived, not seed-set: CUDA headers (cuda.h, cuda_runtime.h, cuda_runtime_api.h, device_launch_parameters.h) are added to the C trust-boundary rules as a concurrency boundary (inherited by C++), so any indexed file that includes them — now including .cu/.cuh themselves — surfaces concurrency in assess_risk through the normal per-file derivation. Ports clawpatch's CUDA mapper support (c-cpp.ts, commit 35497e9). Eight regression tests: four in the mapper (cuda_add_executable, plain add_executable with a .cu source, standalone .cu main, non-CUDA negative), two in language detection (.cu/.cuh → C++, and the no-.h-reroute guard), and one each for the CUDA-header→concurrency derivation and the boundary-rule table.
--since <ref> on features-list (CLI) and since on list_features (MCP). Restricts the feature list to slices whose entry, owned, or context files changed since a git ref, via git diff --name-only --relative <ref>...HEAD (three-dot merge-base form — "what HEAD changed since it branched from "). Lets an agent scope the feature surface to a diff (e.g. review only the slices a branch touched). The entry file counts because for many slices (Rust crates, route handlers, C main() binaries) the entrypoint is itself the source file, recorded only with the Entry role; test-role siblings are excluded so an unchanged slice doesn't surface on a neighbouring test edit. Unknown refs error out rather than silently returning nothing. When combined with a result limit, the diff intersection runs before the cap so the limit isn't consumed by features the filter would have dropped. New codesage_graph::changed_files_since helper wraps the git call, mirroring clawpatch's changedFilesSince.
Qualified-name boost on search, opt-in via CODESAGE_QUALIFIED_NAME_BOOST=1. New apply_qualified_name_boost stage runs after symbol annotation and applies a ×2.0 multiplicative boost to chunks whose annotated symbol qualified-name matches a query-derived identifier token. Different from the existing additive apply_symbol_boost (which matches tokens against raw chunk content) in two ways: this one matches against the chunk's overlapping symbols' qualified-names, and the boost is multiplicative rather than additive. An anti-trigger filter (39 tokens covering Rust trait methods, common accessors, common verbs that double as method names) suppresses the boost when the matching segment is the qualified-name's leaf (e.g. query default matching Mode::default doesn't fire). Validated across three rounds: a 15-case smoke (1 win / 0 losses after the anti-trigger filter) and a 138-query / 7-repo semble subset (net wash on miss rate and recall@10, modest mean-first-hit improvement, strong corpus-dependent split — wins on heavily-typed framework code like monolog and laravel-framework, losses on lighter library code where NL query tokens false-positive on unrelated qualified-names). Default-off because the lift isn't reliable enough across corpora to be everyone's default; opt-in for users whose corpus profile aligns with the wins. Full validation reports at notes/20260526-search-lift-ab-report-round2.md and notes/20260527-search-lift-ab-report-round3.md. Ports half of code-review-graph commit c04af36; the companion change (identifier word-split injected into embedded text at index time, requiring a re-embed pass) is deferred to a future session with GPU time budgeted.
Fixed
CMake test-target classification respects target-name precedence.is_cmake_test_executable was using pure OR logic (target name matches test pattern OR any source matches test path), so a regular binary like add_executable(app src/main.c src/test_mode.c) flipped to cmake-test / TestSuite because the helper source test_mode.c matched the test-path heuristic — even though the target name "app" is clearly not a test. Now target-name match wins outright; source-pattern match alone (with a neutral target name) only flips the classification when every compilable source matches the test heuristic. Header-only target lists fall through to the regular binary path. Mirrors clawpatch commit de82d0a and the §2.13 audit memo. Four regression tests cover the test-helper-doesn't-flip case, name-takes-precedence, all-sources-test-shaped, and the header-only no-compilable-sources guard.
Automake $(srcdir) source-directory variable expansion.bin_PROGRAMS / lib_LTLIBRARIES source lists containing $(srcdir)/foo.c or ${srcdir}/bar.cpp previously fell through to prefix_dir verbatim, producing broken paths like subdir/$(srcdir)/foo.c in entry_path and owned_files. New expand_automake_vars helper strips $(srcdir)/ and ${srcdir}/ to the empty prefix (the value the makefile's own directory implicitly contributes, which the existing prefix_dir(makefile_dir, ...) pipeline already adds). $(top_srcdir) and $(top_builddir) references are left verbatim — handling them correctly would require subtracting the makefile-dir prefix that gets re-added downstream, work not worth doing until a real user case demands it. User-defined macros ($(SOURCES)/foo.c) also stay verbatim. Mirrors clawpatch commit 39a2545. Five new regression tests cover the strip, the top-srcdir leave-alone, unknown-vars passthrough, plain-path passthrough, and a Makefile.am-in-subdir integration test that verifies $(srcdir)/thing.c lands at subdir/thing.c end-to-end.
CMake ${PROJECT_NAME} target-name resolution.add_executable(${PROJECT_NAME} src/main.c) / add_library(${PROJECT_NAME} ...) were previously skipped because the literal ${PROJECT_NAME} failed is_valid_target_name (which rejects any token containing $). New cmake_project_name helper pre-scans the CMakeLists.txt body for project(NAME ...) calls (last call wins per CMake semantics) and resolve_cmake_target_name substitutes ${PROJECT_NAME} and ${CMAKE_PROJECT_NAME} with the captured name before the validity check. When no project() call exists, the unresolved variable still fails validity and the target is dropped — the existing behavior, just no longer false-dropping the common case. Applied to add_executable, add_library, and target_sources so late-bound sources attach to the resolved target. Mirrors clawpatch commit 8550604. Four new regression tests cover last-project-wins, absent-project-stays-unresolved, canonical+CMake-namespaced variants, and an integration test that exercises the full mapper pipeline on project(myapp) + add_executable(${PROJECT_NAME} src/main.c).
MCP daemon runtime-dir fallback treats empty env vars as unset. The wiki-documented WSL2 workaround for the set-but-unusable /run/user/$UID trap injects XDG_RUNTIME_DIR="" in the client's MCP env so the shim falls through to /tmp/codesage-$UID. The fallback in default_runtime_dir was reading both CODESAGE_DAEMON_RUNTIME_DIR and XDG_RUNTIME_DIR via std::env::var_os, which returns Some("") for set-but-empty vars rather than None. The empty string then collapsed to a relative codesage/ runtime dir that the daemon tried to create next to whatever the shim's cwd happened to be at spawn — silently littering arbitrary directories with codesage/mcp-<version>-<hash>.{sock,pid,lock,log} when cwd was writable, and surfacing Failed to connect for directories where it wasn't. Both env reads now treat an empty value as unset so the documented workaround behaves the way the wiki promised; the /tmp/codesage-$UID fallback also kicks in for any client that explicitly blanks the var. Regression test in crates/cli/src/daemon.rs asserts the resolved path is absolute and rooted under std::env::temp_dir() when both vars are empty.
Reranker model loading matches the embedder's path.Reranker::new and Embedder::new now share one load_onnx_session loader (an internal dedup), which closes two reranker-only gaps: the reranker now fetches the optional onnx/model.onnx_data external-weights sidecar — so a >2 GB cross-encoder no longer fails at session commit — and, when device = "gpu" is configured on a binary built without the cuda feature, it fails fast before downloading the model instead of after. No config or API change.