Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
7b6c02d
fix(ci): fix test gate and restore skipped tests
Timwood0x10 Sep 17, 2026
f8a9896
refactor: split oversized source files into focused modules
Timwood0x10 Sep 18, 2026
88908d4
feat(communities): Restore community detection and expose as an MCP tool
Timwood0x10 Sep 18, 2026
c614bd4
fix(verify): fix validator false positives and silent failures
Timwood0x10 Sep 18, 2026
5970048
Fix architecture violation misreporting, close knowledge-builder read…
Timwood0x10 Sep 18, 2026
b884cb4
fix(store): fail schema migrations loudly instead of half-migrating
Timwood0x10 Sep 19, 2026
fe64fd6
fix: Fixed multiple correctness issues in indexing and validation.
Timwood0x10 Sep 20, 2026
55d42c5
fix: Fixed silent errors in the parser, storage, and graph.
Timwood0x10 Sep 20, 2026
ab8cb7d
fix(model): fix architecture edge column names and scheduler resource…
Timwood0x10 Sep 21, 2026
5a25b67
refactor(verify): deprecate verify_statement and clean up obsolete ve…
Timwood0x10 Sep 21, 2026
d8c16b7
fix: Fixed issues with ignore rules, the MCP protocol, and database m…
Timwood0x10 Sep 21, 2026
7650342
feat(parser): Added support for cross-directory TS/JS imports and fix…
Timwood0x10 Sep 22, 2026
2f35440
chore: clean up broken references and fix repository hygiene issues
Timwood0x10 Sep 22, 2026
c3e1069
fix: close 27 code-review findings and harden failure signalling, SQL…
Timwood0x10 Sep 24, 2026
7c2de89
fix: close 6 review findings on force-index, id allocation, and open …
Timwood0x10 Sep 24, 2026
bb4a004
fix: force-index exit code, build-output skip markers, doc cleanup
Timwood0x10 Sep 25, 2026
d103176
fix: rules-dir CWD independence, module_summary dedupe, has/should cl…
Timwood0x10 Sep 25, 2026
721fcbd
fix: find_symbol hint language, verify_integrity output cap, module-b…
Timwood0x10 Sep 26, 2026
0901a54
fix: complete enhance response metrics, correct overview stats, trace…
Timwood0x10 Sep 27, 2026
d5d637c
fix: complete enhance response metrics, correct overview stats, trace…
Timwood0x10 Sep 28, 2026
bb6d441
fix: Fixed idempotency issues in scope/capability/workflow, race cond…
Timwood0x10 Sep 29, 2026
a1b12d1
fix: Fixed memBulk path parse_failures causing accounting to complete…
Timwood0x10 Sep 29, 2026
ddb28d7
fix: force_index_files explicitly bypass fail-fast, clean up Swift de…
Timwood0x10 Sep 30, 2026
6fa4507
fix: Make FTS rebuild idempotent, deduplicate path identities, make p…
Timwood0x10 Sep 30, 2026
d8ab1ec
fix: graph_query now supports LIMIT and explicitly rejects illegal tr…
Timwood0x10 Sep 30, 2026
8ce1423
docs: added a quick start guide, archived old index scripts
Timwood0x10 Oct 1, 2026
53e2537
docs: Organize the document structure by language, fix the quick star…
Timwood0x10 Oct 2, 2026
97253c6
fix: Fixed lingering silent failures on the default release path (imp…
Timwood0x10 Oct 3, 2026
d44f0fd
fix: Introduce util::JsonWriter to standardize JSON construction and …
Timwood0x10 Oct 3, 2026
ed045ff
refactor: standardize using util::errorEnvelope/okFalseEnvelope to re…
Timwood0x10 Oct 3, 2026
9d48238
refactor: Fully switch to using util::JsonWriter instead of manually …
Timwood0x10 Oct 4, 2026
4bb5e6a
refactor: Fully use util::JsonWriter to build JSON output and remove …
Timwood0x10 Oct 4, 2026
e1bb592
feat: Make parallel indexing available on Windows, add shared memory …
Timwood0x10 Oct 5, 2026
175dcce
fix: Fixed batch silent failures revealed in MCP tests (missing index…
Timwood0x10 Oct 6, 2026
8b44418
refactor: changed engine ABI to handle-based and removed global singl…
Timwood0x10 Oct 6, 2026
447a5b2
fix: Fixed legacy silent failures in the index pipeline (forcing inde…
Timwood0x10 Oct 6, 2026
4d087cc
fix: Fixed silent failures in the parser (missing arity/param_count, …
Timwood0x10 Oct 7, 2026
9e5c557
fix: Fixed silent failures like Maven projects not being indexed and …
Timwood0x10 Oct 8, 2026
fd0e576
Fixes: Resolved issues where symbolic link paths were missed during c…
Timwood0x10 Oct 8, 2026
15e5022
Fix: Resolved silent failures in the indexing pipeline (Java/Maven pr…
Timwood0x10 Oct 9, 2026
68e930e
release:0.2.7
Timwood0x10 Oct 9, 2026
d31e67e
release:0.2.7
Timwood0x10 Oct 9, 2026
1937342
fix: Switch to the pinned CMake 3.31.6 from PyPI in CI and verify the…
Timwood0x10 Oct 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
67 changes: 40 additions & 27 deletions .github/workflows/_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,23 @@ jobs:
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build git gcc g++ pkg-config libssl-dev ccache patchelf
# NOT `apt-get install cmake`: ubuntu-24.04 ships CMake 3.28.3 while
# the engine requires 3.30+ (engine/CMakeLists.txt:1, README "CMake
# 3.30+"), and CMake refuses to read a project above its own version.
# Every invocation therefore aborted at line 1 —
# `cmake_minimum_required` — so both Ubuntu jobs died before compiling
# a single file: the Rust step because server/build.rs drives cmake,
# and the engine step directly. macOS (Homebrew cmake, 4.x) configured
# and ran the tests without noticing, which is why this only ever
# showed up on Linux. The PyPI wheel pins one version for both Ubuntu
# runners and takes precedence over the distro package in /usr/local.
sudo apt-get install -y ninja-build git gcc g++ pkg-config libssl-dev ccache patchelf
pip install "cmake==3.31.6"
cmake --version
cmake --version | grep -qE "version 3\.(3[0-9]|[4-9])" || {
echo "::error::CMake 3.30+ is required (engine/CMakeLists.txt:1), got: $(cmake --version | head -1)"
exit 1
}

- name: Install deps (macOS)
if: matrix.os == 'macos-15'
Expand Down Expand Up @@ -186,38 +202,35 @@ jobs:

# Run every C++ test binary produced under the build dir.
# nullglob: unmatched globs expand to nothing instead of a literal.
#
# The set of tests is defined by engine/tests/*.cpp, NOT by a
# hand-maintained list. The previous hard-coded skip list had
# drifted badly: it skipped 26 tests whose recorded reasons
# ("known failing", "requires removed LadybugDB graph feature")
# were no longer true, including the entire per-language
# false-positive precision suite (test_fp_*). Those tests all pass
# on this tree, so skipping them only hid regressions.
#
# Keep skip_tests EMPTY unless a test genuinely cannot run here.
# Never add an entry to silence a failure — fix the test or remove
# it from engine/tests/ with a tracked issue.
skip_tests=""
shopt -s nullglob
failed=0
for test_bin in engine/build-tests/test_*; do
# Only run regular executable files (skip dirs / non-binaries).
[ -f "$test_bin" ] && [ -x "$test_bin" ] || continue
test_name=$(basename "$test_bin")
# Skip known manual/debug tools that need external args,
# and known-failing tests tracked for future fix.
# This list must match the Makefile's TEST_EXES skip list.
case "$test_name" in
test_bench|test_bench_enhance|test_bench_project|test_pipeline_bench|test_fast_scan_debug|test_verify_aiscope)
echo " SKIP $test_name (requires external args)"
continue
;;
test_enhance_e2e|test_js_visitor|test_ts_visitor|test_tsx_visitor)
echo " SKIP $test_name (known failure, tracked for future fix)"
continue
;;
test_rust_e2e|test_qualified_id_ast|test_ts_e2e|test_type_extraction)
echo " SKIP $test_name (requires removed LadybugDB graph feature)"
continue
;;
test_c_e2e|test_cpp_e2e|test_e2e|test_go_e2e|test_java_e2e|test_js_e2e)
echo " SKIP $test_name (find_def requires removed LadybugDB graph feature)"
continue
;;
test_fp_c|test_fp_cpp|test_fp_go|test_fp_java|test_fp_js|test_fp_python|test_fp_rust|test_fp_ts)
echo " SKIP $test_name (known failing test, tracked for future fix)"
continue
;;
test_call_graph_method|test_call_graph_p1|test_membulk_parity|test_query_algorithms)
echo " SKIP $test_name (requires graph_nodes table, migrated to entity/relation)"
# A restored build cache can contain binaries for tests that no
# longer exist in the tree; running those would fail for the
# wrong reason. The source tree is the source of truth.
if [ ! -f "engine/tests/${test_name}.cpp" ]; then
echo " SKIP $test_name (no engine/tests/${test_name}.cpp)"
continue
fi
case " $skip_tests " in
*" $test_name "*)
echo " SKIP $test_name (listed in skip_tests)"
continue
;;
esac
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@ jobs:
- name: Install system deps
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build
# cmake is not installed from apt: ubuntu-24.04 ships 3.28.3 and the
# engine requires 3.30+ (engine/CMakeLists.txt:1). `cargo clippy`
# builds server/build.rs, which drives cmake over the engine, so the
# old version made this job fail for a reason that had nothing to do
# with linting. Same pinned wheel as _ci.yml.
sudo apt-get install -y ninja-build
pip install "cmake==3.31.6"
cmake --version
# Install clang-format via pip — the PyPI wheel provides an
# exact version match (21.1.8) with the local dev environment
# (Homebrew llvm@21, which is what `which clang-format` resolves
Expand Down
80 changes: 79 additions & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ name: Dev CI (Windows Cross-Compile)
on:
workflow_dispatch:
push:
branches: [hhh]
# `dev` is the integration branch this workflow is named after; without it
# the Windows cross-compile only ever ran on `master`, so a regression in
# build.rs cross-compilation (e.g. the target-cpu=native failure fixed in
# d44f0fd) could not be caught before merge.
branches: [dev, master]

permissions:
contents: read
Expand Down Expand Up @@ -49,3 +53,77 @@ jobs:
run: |
file target/x86_64-pc-windows-gnu/release/codescope.exe | grep -i "PE32"
echo "✅ Windows cross-compile succeeded"

# ── TD-5 step 3: run the parallel scheduler on a real Windows host ──
# The cross-compile job above proves the binary *links*; it cannot prove the
# shared-file chunk queue works, because that is a runtime property of two
# Windows processes mapping the same file (`src/scheduler/mapped_file.rs`).
# This job indexes a real project twice — once through the module-level
# scheduler, once through the chunk-level (work-stealing) one — and asserts
# the graph came out non-empty both times.
#
# Three Windows-specific requirements, all handled below:
# * CodeScope needs the GNU ABI (build.rs panics on msvc), so even on a
# Windows host the build target is x86_64-pc-windows-gnu and MinGW's
# gcc/g++ must be on PATH — build.rs looks for plain `gcc`/`g++`.
# * The merge step of the parallel scheduler shells out to the `sqlite3`
# CLI (`scheduler/merge.rs`), which the runner image does not ship.
# * The chunk queue and per-module DBs live in the platform temp directory,
# so no /tmp-like path is assumed.
#
# NOTE: this job has not been executed yet (it needs a Windows runner) and is
# deliberately reachable through workflow_dispatch only, so it cannot redden a
# normal push until its first successful run promotes it.
windows-smoke:
name: Windows smoke (index-parallel)
if: github.event_name == 'workflow_dispatch'
runs-on: windows-latest
timeout-minutes: 40
steps:
- uses: actions/checkout@v7 # v4.2.2

- name: Setup Rust
uses: dtolnay/rust-toolchain@1.95.0 # pinned to match local dev

- name: Install MinGW (gcc/g++ for the engine) + sqlite3 (merge step)
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: false
install: mingw-w64-x86_64-gcc mingw-w64-x86_64-sqlite3
path-type: inherit

- name: Add Windows GNU target
run: rustup target add x86_64-pc-windows-gnu

- name: Verify the toolchain the build depends on
shell: pwsh
run: |
gcc --version
g++ --version
sqlite3 --version

- name: Build codescope.exe
run: cargo build --release --target x86_64-pc-windows-gnu --bin codescope

- name: index-parallel indexes a real project (module scheduler)
shell: pwsh
run: |
$exe = "target/x86_64-pc-windows-gnu/release/codescope.exe"
$result = & $exe index-parallel engine/src --workers 2 --parallel 2 2>$null | ConvertFrom-Json
$result | ConvertTo-Json -Depth 3 -Compress | Write-Host
if ($result.ok -ne $true) { throw "index-parallel reported ok=$($result.ok)" }
if ($result.total_nodes -le 0) { throw "no nodes indexed (total_nodes=$($result.total_nodes))" }
Write-Host "✅ module scheduler: $($result.total_nodes) nodes / $($result.total_edges) edges"

- name: index-parallel indexes a real project (chunk scheduler)
shell: pwsh
run: |
$env:CODESCOPE_CPU_DYNAMIC = "1"
$exe = "target/x86_64-pc-windows-gnu/release/codescope.exe"
$result = & $exe index-parallel engine/src --workers 2 --parallel 2 2>$null | ConvertFrom-Json
$result | ConvertTo-Json -Depth 3 -Compress | Write-Host
if ($result.sched_mode -ne "chunked") { throw "expected the chunked scheduler, got '$($result.sched_mode)'" }
if ($result.complete -ne $true) { throw "chunked run reported complete=$($result.complete)" }
if ($result.total_nodes -le 0) { throw "no nodes indexed (total_nodes=$($result.total_nodes))" }
Write-Host "✅ chunk scheduler: $($result.total_nodes) nodes, $($result.success) chunk workers"
25 changes: 24 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
.codescope/
.cursh/
.mcp.json
# Agent worktrees. These are full copies of the repository, so indexing them
# doubles every symbol and makes by-name lookup ambiguous (find_callers returns
# candidates instead of callers). They must never be part of the project.
.kilo/


# IDE and Editors
Expand Down Expand Up @@ -186,7 +190,26 @@
*.db-*
*.db

plan/
# Generated by `make test-savings`: the numbers change on every run, so the file
# is an output rather than a source. It stays on disk after the run.
tests/token_savings_report.md

# Local planning scratch. `plan/*` rather than `plan/` so that a single
# subdirectory can be exempted below: git will not re-include anything inside an
# excluded DIRECTORY, so the exemption has to start one level up.
plan/*
# …except the rules, which are cited from a lot of places that a fresh clone
# has to be able to follow — CONTRIBUTING links plan/rules/code_rules.md, and
# ~40 source comments point at it and at relation_contract.md by name.
!plan/rules/
# The scheduler cites this one by section number from five source files
# (chunk_plan.rs "§5", chunk_queue.rs "§4, §6", chunk_queue_ops.rs "§8", …), so
# it has to be in the repo for those references to mean anything. Same two-step
# as above: the directory has to be re-included before a file inside it can be,
# which is why `!plan/next/` comes before `plan/next/*`.
!plan/next/
plan/next/*
!plan/next/DYNAMIC_SCHED_REDESIGN.md

**/build_*/
**/build-*/
Expand Down
Loading
Loading