Fixes codebase://architecture returning only 10 results all from graph-ui
by wiring hardcoded limits through the config system and raising defaults to 25.
Key changes:
- mcp.c: add key_functions_count config (default 25); wire into
build_key_functions_sql (was hardcoded LIMIT 10 at line 4317) and
build_resource_architecture call site
- mcp.c: add arch_hotspot_limit config (default 25); wire into classic
get_architecture tool handler
- store.c/store.h: raise CBM_ARCH_HOTSPOT_DEFAULT_LIMIT 10->25; add
hotspot_limit param to cbm_store_get_architecture
- store.c/store.h: add sort_by=calls (ORDER BY calls_in+calls_out DESC)
and sort_by=linkrank (ORDER BY linkrank_in DESC) dispatch cases;
add degree_mode config (weighted|unweighted|calls_only) for
min_degree/max_degree filter column selection
- watcher.c/watcher.h: add poll_base_ms/poll_max_ms to struct cbm_watcher;
change cbm_watcher_run and cbm_watcher_poll_interval_ms signatures to
accept base_ms/max_ms params (0=defaults); wire watcher_poll_base_ms and
watcher_poll_max_ms config keys through main.c
- cli.h: extend cbm_config_entry_t with range and guidance fields (5->7)
- cli.c: replace entire CBM_CONFIG_REGISTRY with 7-field entries for all 32
config keys with broadest feasible ranges and actionable guidance strings;
update config list/get/help display to print [range] + guidance per entry
- scripts/autotune.py: new standalone Python 3.9+ script that sends JSON-RPC
directly to the binary via stdin/stdout, tries 7 experiments, scores
against expected top-10 ground truth for 3 repos, resets config on exit
- tests: update all callers of cbm_store_get_architecture (pass 0 for
hotspot_limit) and cbm_watcher_poll_interval_ms (pass 0,0 for defaults)
All 2238 tests pass.
Signed-off-by: Andrew Hundt <ATHundt@gmail.com>
MSYS2 mktemp returns /tmp/tmp.XXX but the Windows binary can't resolve
POSIX paths. Use cygpath -m to convert to C:/msys64/tmp/tmp.XXX which
works in both MSYS2 shell and Windows file APIs.
1. smoke-windows: Use CLANG64 (not UCRT64) so runtime matches the
build environment. Binary built with CLANG64 needs CLANG64 DLLs.
2. smoke-unix: Add fail-fast: false so one platform failure doesn't
cancel all 7 other smoke jobs.
3. smoke-test.sh: Capture and display stderr on indexing failure to
help debug smoke-unix errors.
4. release.yml: Same CLANG64 smoke fix.
1. Add zip to MSYS2 build packages (both dry-run and release).
2. embed-frontend.sh: replace xxd with od+sed for hex dump — xxd
requires vim which isn't in MSYS2 CLANG64 by default.
3. embed-frontend.sh: flip IS_MACOS→IS_LINUX — Linux gets ld -r -b
binary (ELF-only), everything else (macOS, Windows) gets the
portable C-array approach via od.
4. release.yml: same Windows archive fix (msys2 shell + .exe detect).
1. dry-run.yml: Add skip_tests and skip_builds workflow_dispatch inputs
for faster iteration. Build jobs use always() to run even when tests
are skipped.
2. Windows archive: Switch from PowerShell Copy-Item to MSYS2 shell
with .exe extension detection. MSYS2 Clang produces .exe suffix
that Copy-Item didn't account for.
3. Linux embed: Use absolute path for ld output when cd'd into dist
directory. Relative path build/c/embedded/*.o was invalid from
inside graph-ui/dist/.
4. release.yml: Same Windows archive fix as dry-run.
- Use env: block instead of shell quoting for WIN32_LIBS in CI
- Forward WIN32_LIBS from environment in test.sh and build.sh
- Add skip_lint input to dry-run workflow for faster iteration
MinGW GCC does not ship ASan runtime on Windows. MSYS2 CLANG64
provides full sanitizer support via compiler-rt. All platforms
now run tests with ASan + UBSan — no exceptions.
- Fix GCC -O2 warnings: calloc for cf (maybe-uninitialized),
suppress stringop-truncation/alloc-size-larger-than (false positives),
guard louvain against negative node_count
- Default compiler: cc on macOS, gcc on Linux/Windows (fixes gcc-14
not found on MSYS2)
- Docker test infra now runs BOTH test (ASan) and build (-O2 -Werror)
- Add scripts/clean.sh, test.sh, build.sh, lint.sh as single source
of truth for local and CI builds (always clean, always parallel)
- Fix -Wmissing-braces: replace {{0}} with memset for struct arrays
- Fix -Wrestrict: use intermediate buffer for same-struct snprintf
- Update dry-run.yml and release.yml to use the new scripts
Delete Go MCP server, CGo bridges, Go pipeline, store, tools, watcher,
cypher engine, language specs, and all Go tests. Replace Go pre-commit
hook with C-only linting (clang-tidy, cppcheck, clang-format, tests).
Tree-sitter extraction engine (internal/cbm/*.c) retained for C pipeline.
Complete C implementation of the indexing pipeline (src/), parallel worker
pool, graph buffer with merge support, SQLite writer, and 1893-test suite.
Linter setup: zero warnings from clang-tidy (all checks enabled, no NOLINT
suppressions), cppcheck, and clang-format. All issues fixed at source —
proper headers for external linkage, GROW_ARRAY macro restructured to
eliminate type parameter, null-deref paths guarded, named intermediates
for suspicious-argument checks.
- Replace Go-binding tree-sitter with vendored C grammars compiled via
CGo (internal/cbm/); eliminates all Go module/linker fragility
- Add 32 new languages: Clojure, CMake, COBOL, Common Lisp, CUDA, Elm,
Emacs Lisp, Fortran, F#, GLSL, GraphQL, INI, JSON, Julia, Makefile,
Markdown, Meson, Nix, Protobuf, Svelte, Verilog, Vim Script, Vue, XML
(plus C, C#, Erlang, SQL, YAML quality improvements)
- Adaptive worker concurrency and mmap prefetch for faster indexing
- Graph buffer: batched SQLite writes for 3-5x throughput improvement
- Fix cancellation test: use 50ms timeout (pipeline now indexes 212-file
Erlang repo in ~400ms, well under the old 2s deadline)
- Fix isTestFunction: add "Test" prefix for C#, "test" prefix for Scala
- detect_platform() now checks hw.optional.arm64 sysctl on macOS to
pick the arm64 binary even when bash runs under Rosetta (uname -m
reports x86_64 in that case)
- Move tmpdir to a global CLEANUP_DIR so the EXIT trap does not hit
an unbound variable error from set -u after the function returns