Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
cc67986
Merge pull request #56 from flupkede/fix/tui-indexing-status
flupkede May 20, 2026
2015859
fix: CI test resilience + protect-master workflow (#58)
flupkede May 21, 2026
4c1182c
Sync master → develop (tree-sitter) (#60)
flupkede May 21, 2026
78ef160
docs: update CHANGELOG — v1.0.132 consolidated release notes (#61)
flupkede May 22, 2026
71b8ed3
sync: align develop with master — AGENTS.md, Cargo.toml, Cargo.lock (…
flupkede May 22, 2026
4296b1c
fix: MCP local mode project/group fallback + QC script fix (#66)
flupkede May 27, 2026
d0f3929
chore: simplify release workflow — feature-only version bump (#74)
flupkede May 27, 2026
b9b5645
fix: serve-aware indexing — create DB dir before lock + no silent loc…
flupkede Jun 1, 2026
d947d71
sync: align develop with master (post-v1.0.137 release) (#78)
flupkede Jun 1, 2026
b09a930
fix: strip UNC prefix in repos.json + auto-add on missing DB (v1.0.13…
flupkede Jun 1, 2026
70877ef
sync: align develop with master (post-v1.0.138) (#81)
flupkede Jun 1, 2026
e989ee2
refactor: central safe_canonicalize() — eliminate raw .canonicalize()…
flupkede Jun 1, 2026
acc788d
fix: replace last raw .canonicalize() with safe_canonicalize in get_d…
flupkede Jun 1, 2026
0bc928f
fix: wait for serve warmup instead of refusing; fix 409 on DB-recreat…
flupkede Jun 1, 2026
708cf27
fix: keep serve responsive during warmup — offload heavy work to spaw…
flupkede Jun 1, 2026
3c740c0
sync: backfill CHANGELOG 1.0.139-1.0.142 from master (post-release) (…
flupkede Jun 1, 2026
54782bd
feat: semantic Markdown chunking (tree-sitter-md) + /merge & /release…
flupkede Jun 1, 2026
bc88eba
Stale-path relocation, index prune, derived alias (v1.0.152) (#92)
flupkede Jun 1, 2026
e0e3580
Auto-prune stale repos during Phase 1 warmup (v1.0.153) (#94)
flupkede Jun 2, 2026
fb7858c
docs: AGENTS.md plan for fixes-strict-scoping-and-reaper (#95)
flupkede Jun 2, 2026
d7d71b7
docs: AGENTS.md plan for serve single-instance guard (#96)
flupkede Jun 2, 2026
b748977
fix: Windows 8.3 short-name path mismatch in relocation tests + CHANG…
flupkede Jun 2, 2026
caf43f8
sync: align develop with master after v1.0.154 release (#100)
flupkede Jun 2, 2026
8748657
fix: reconcile_all_paths spawn_blocking + persist_config in prune pat…
flupkede Jun 2, 2026
404cb0e
fix: full review remarks — concurrency, tests, metadata consistency, …
flupkede Jun 2, 2026
bf6c90e
Release v1.0.160 — merge develop into release/v1.0.160
flupkede Jun 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,57 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0



## [1.0.160] - 2026-06-02

### Fixed

- **`evaluate_csharp_rebuild` no longer holds `config.write()` during git/fs I/O** —
the bootstrap timestamp computation (git subprocess + ≤10 000-entry filesystem
walk) previously ran while holding the `config` write-lock, blocking every
concurrent `config.read()` caller for the full scan duration. The lock is now
acquired only for the brief config update; the slow work runs with no lock held.
- **`evaluate_csharp_rebuild` offloaded to `spawn_blocking` in phase 2** — even
after the lock fix, the function ran synchronously on a Tokio worker thread.
Wrapped in `spawn_blocking` at the call site in `run_phase_2_csharp_scip` so
the async runtime stays responsive while processing all C# candidates.
- **`build_index()` in warmup and add-repo background task now use `spawn_blocking`** —
two sites called the CPU-heavy HNSW `build_index()` directly on async threads.
Both now follow the established pattern (`spawn_blocking` + `blocking_write()`).
- **`reload_if_changed` uses `safe_canonicalize`** — replaces the raw
`std::fs::canonicalize` that could leave Windows `\\?\` UNC prefixes on the
config path, causing path comparisons to silently fail.
- **Accurate doc-comments on `relocate_missing` / `prune_stale`** — both
methods perform disk I/O (filesystem traversal, git subprocess) and should
be called via `spawn_blocking` in async contexts; the comments now say so.
- **`ensure_hnsw_index_if_needed` extracted and tested** — the safety-net HNSW
rebuild logic (detects and repairs a DB with chunks but no index, e.g. after
cancellation) is now a named `pub(crate)` function with 3 unit tests
(unindexed-with-chunks rebuilds, already-indexed is idempotent, empty DB skips).
- **`metadata.json` schema consistency** — the normal index path now writes
`"partial": false` so readers always find the field regardless of whether
indexing completed or was cancelled.
- **Cancellation finalisation is best-effort** — metadata write, FileMetaStore
save, and stats read in the cancel path now log-and-continue on failure
instead of propagating `Err`, so the partial chunks remain searchable even
if any recovery step fails.

## [1.0.156] - 2026-06-02

### Fixed

- **`reconcile_all_paths` no longer blocks the Tokio async runtime** — the
function spawns git subprocesses and holds the config `RwLock` write-guard
while scanning the filesystem. It is now offloaded via
`tokio::task::spawn_blocking` so Tokio worker threads stay responsive during
startup reconciliation.
- **Phase 1 auto-prune now honours `config_path_override`** — the prune path
wrote `repos.json` via `config.save()`, bypassing `ServeState::persist_config`.
All save sites in `ServeState` must route through `persist_config` so the
override (used in integration tests) is respected. Fixed to use
`self.persist_config(&config)`.



## [1.0.154] - 2026-06-02

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "codesearch"
version = "1.0.154"
version = "1.0.160"
edition = "2021"
authors = ["codesearch contributors"]
license = "Apache-2.0"
Expand Down
21 changes: 16 additions & 5 deletions src/db_discovery/repos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,10 +401,16 @@ impl ReposConfig {
///
/// For each missing path a best-effort git-identity relocation is attempted
/// ([`Self::try_relocate`]); successful matches rewrite the in-memory
/// `repos` map. This is pure (no disk I/O, no logging) so callers can decide
/// how to report and persist. Returns `(relocated, unresolved)` where
/// `relocated` is the list of `(alias, new_path)` rewrites and `unresolved`
/// is the list of aliases whose path is still missing.
/// `repos` map.
///
/// **Note:** this method performs disk I/O (filesystem traversal, git
/// subprocess) and should not be called while holding an async lock or from
/// an async task without `spawn_blocking`. No logging is emitted — callers
/// are responsible for reporting results.
///
/// Returns `(relocated, unresolved)` where `relocated` is the list of
/// `(alias, new_path)` rewrites and `unresolved` is the list of aliases
/// whose path is still missing.
#[must_use]
pub fn relocate_missing(&mut self) -> (Vec<(String, PathBuf)>, Vec<String>) {
let aliases: Vec<String> = self.repos.keys().cloned().collect();
Expand All @@ -431,7 +437,12 @@ impl ReposConfig {
}

/// Prune stale entries: relocate what can be relocated, then unregister the
/// rest. Pure (no disk I/O, no logging). Returns `(relocated, removed)`.
/// rest.
///
/// **Note:** this method performs disk I/O (filesystem traversal, git
/// subprocess) via [`Self::relocate_missing`]. No logging is emitted.
///
/// Returns `(relocated, removed)`.
#[must_use]
pub fn prune_stale(&mut self) -> (Vec<(String, PathBuf)>, Vec<String>) {
let (relocated, unresolved) = self.relocate_missing();
Expand Down
Loading