@@ -4,79 +4,58 @@ All notable changes to CKB will be documented in this file.
44
55## [ Unreleased]
66
7+ ## [ 9.1.0] - 2026-04-16
8+
79### Added
810
9- - ** ` explainFile ` surfaces semantically-related symbols** via LIP v2.1's
10- ` stream_context ` RPC (` internal/query/lip_stream_context.go ` ). The daemon
11- ranks symbols across the whole file within a 2048-token budget; CKB
12- returns the top 10 in the new ` facts.related ` field with per-symbol
13- relevance and token cost. Gated on the handshake's ` supported_messages `
14- — older daemons fall through and the field is absent. New streaming
15- transport ` internal/lip/stream_context.go ` reads the daemon's N
16- ` symbol_info ` frames plus the ` end_stream ` terminator; previous LIP
17- client was unary-only.
18- - ** ` searchSymbols ` expands short queries** via LIP's ` query_expansion `
19- RPC (` internal/query/query_expansion.go ` ). Queries of ≤ 2 tokens get up
20- to 5 related terms appended before hitting FTS5, recovering recall on
21- vocabulary-mismatch misses ("auth" → "authenticate authorization
22- principal…"). Gated on the handshake and on the same mixed-models flag
23- that protects the rerank path. Longer queries are passed through
24- unchanged — the expansion is a rescue, not a rewrite.
25- - ** Semantic hits carry evidence chunks** when LIP v2.0+'s ` explain_match `
26- is advertised (` SemanticSearchWithLIPExplained ` in
27- ` internal/query/lip_ranker.go ` ). Each hit returned by the semantic
28- fallback path now includes up to two ranked chunks with line ranges,
29- text, and per-chunk scores — the caller can cite specific lines instead
30- of a bare file URL. Capped at the top-5 hits to bound round-trip cost.
11+ - ** LIP v2.1 utilisation** — three high-ROI LIP RPCs wired into the query
12+ engine, gated on the handshake's ` supported_messages ` :
13+ - ` stream_context ` (v2.1) → ` explainFile ` attaches up to 10
14+ semantically-related symbols (2048-token budget) in ` facts.related ` .
15+ New streaming transport reads N ` symbol_info ` frames + ` end_stream ` .
16+ - ` query_expansion ` (v1.6) → ` searchSymbols ` expands ≤ 2-token queries
17+ with up to 5 related terms before FTS5, recovering vocabulary-mismatch
18+ recall without touching precision on compound queries.
19+ - ` explain_match ` (v2.0) → semantic search hits carry up to two ranked
20+ evidence chunks with line ranges, text, and per-chunk scores (top-5
21+ hits, bounded round-trip cost).
3122- ** ` lip.Handshake ` runs on engine startup** and the daemon's
3223 ` supported_messages ` list is stashed for feature gating
33- (` Engine.lipSupports ` ). The daemon version and supported-count are
34- logged on connect.
35-
24+ (` Engine.lipSupports ` ). Daemon version and supported-count logged.
25+ - ** LIP index status probing** — ` probeHandshake ` now follows up with
26+ ` IndexStatus ` and caches the result. New ` Engine.LIPStatus() ` returns
27+ ` {Reachable, IndexedFiles} ` so consumers can distinguish "daemon down"
28+ from "daemon up, nothing indexed."
29+ - ** ` ckb review ` warns when LIP index is empty** — stderr advisory with
30+ ` lip index <repo> ` command when daemon is reachable but has no content.
31+ Suppressed in ` --ci ` to keep CI logs clean.
32+ - ` NoAutoFetch ` option on ` SummarizePROptions ` and ` SummarizeDiffOptions `
33+ for parity with ` ReviewPROptions ` .
34+ - Troubleshooting section in ` docs/plans/review-cicd.md ` covering shallow
35+ CI clones, auth-failure remediation, air-gapped pipelines, and depth-0
36+ checkout alternatives.
37+ - Auth-error detection on auto-fetch with clear remediation guidance.
38+ - ` ckb review --no-auto-fetch ` flag for air-gapped pipelines.
39+ - Test coverage for ` GitAdapter.EnsureRef ` — happy path, missing-ref
40+ auto-fetch, unreachable origin, and empty-input guard.
3641### Changed
3742
38- - ** ` lipFileURI ` path normalisation** — the helper that builds
39- ` file:// ` -URIs for LIP requests used to naive-` filepath.Join ` whatever
40- ` Location.FileId ` a backend supplied. Now handles absolute paths and
41- already-prefixed ` file:// ` URIs without producing malformed results
42- like ` file:///repo//abs/path ` . Backends today return relative paths, so
43- this is a hardening fix for contracts that are nominally open.
44-
45- ### Changed
43+ - ** LIP health: push-driven, not polled** — Engine opens a long-lived
44+ connection to the daemon at startup (` internal/lip/subscribe.go ` ) with
45+ ` index_changed ` frames and per-ping ` index_status ` snapshots instead of
46+ 60 s TTL polling. Worst-case staleness drops from 60 s to ~ 3 s.
47+ - ** ` lipFileURI ` path normalisation** — handles absolute paths and
48+ already-prefixed ` file:// ` URIs without producing malformed results.
4649
47- - ** LIP health: push-driven, not polled** — the Engine now opens a long-lived
48- connection to the LIP daemon at startup (` internal/lip/subscribe.go ` ) and
49- receives ` index_changed ` frames plus per-ping ` index_status ` snapshots
50- instead of issuing a fresh ` IndexStatus ` RPC on a 60 s TTL. Worst-case
51- staleness for the mixed-models gate drops from 60 s to ~ 3 s, the hot query
52- path is lock-free (no RPC, no dial, no TTL check), and the subscriber
53- reconnects with exponential backoff when the daemon restarts. The old
54- ` lipHealthTTL ` constant is gone; callers read the cached flag directly.
50+ ### Fixed
5551
56- ### Added
52+ - ** Bug-pattern false positive on ` sync.Mutex.Lock() ` ** — removed ` "Lock" `
53+ from ` LikelyReturnsError ` heuristic patterns; ` sync.Mutex.Lock ` returns
54+ nothing and dominated real-world matches with false positives.
55+ - ** ` err ` shadowing in ` subscribe.go ` ** — four shadow sites eliminated by
56+ reusing outer ` err ` or renaming to ` pingErr ` /` readErr ` where scope
57+ isolation requires it.
5758
58- - ` NoAutoFetch ` option on ` SummarizePROptions ` and ` SummarizeDiffOptions `
59- for parity with ` ReviewPROptions ` . Previously the air-gapped opt-out
60- applied only to ` ckb review ` ; MCP/HTTP callers of ` summarizePr ` and
61- ` summarizeDiff ` had no way to disable auto-fetch.
62- - Troubleshooting section in ` docs/plans/review-cicd.md ` covering shallow
63- CI clones, auth-failure remediation (` persistCredentials ` ), air-gapped
64- pipelines, and depth-0 checkout alternatives.
65- - Auth-error detection on auto-fetch: when ` git fetch ` fails with
66- ` Authentication failed ` , ` could not read Username ` , `terminal prompts
67- disabled` , ` 401 Unauthorized` , ` 403 Forbidden` , ` Permission denied
68- (publickey)` , or ` repository ... not found`, the review error now names
69- the root cause (stripped CI credentials) and points at
70- ` persistCredentials ` / ` --no-auto-fetch ` as remediations, instead of
71- dumping raw git stderr.
72- - ` ckb review --no-auto-fetch ` flag disables the automatic fetch of a
73- missing base ref introduced in 9.0.1. Also exposed on ` ReviewPROptions `
74- as ` noAutoFetch ` for MCP / HTTP callers. Useful in air-gapped pipelines
75- where network activity outside the checkout step is forbidden; review
76- fails with a clear "ref not present locally" error instead.
77- - Test coverage for ` GitAdapter.EnsureRef ` — happy path, missing-ref
78- auto-fetch, unreachable origin, and empty-input guard — using isolated
79- bare+clone repo pairs in temp dirs.
8059- ** LIP rerank: coherence gate + position-weighted seeding** (#209 ) — the
8160 Fast-tier semantic rerank (` internal/query/lip_ranker.go ` ) used to average the
8261 top-5 seed embeddings with uniform weight and always apply the result. When
0 commit comments