Conversation
Adds isolated tests using a bare origin + clone pair in t.TempDir: - empty input → error - ref already local → no-op, returns input - ref missing, origin reachable → fetches, returns origin/<branch> - origin unreachable → error names the ref Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds an opt-out for the 9.0.1 auto-fetch behavior. When set, review calls VerifyRef (local-only) instead of EnsureRef, so no network I/O happens outside the pipeline's own checkout step. Also exposed on ReviewPROptions.NoAutoFetch for MCP / HTTP callers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When EnsureRef's fetch fails due to missing credentials (stripped CI token, disabled prompts, 401/403, SSH key rejected, repo-not-found), isAuthError recognises the stderr signature and returns an actionable message pointing at persistCredentials and --no-auto-fetch, instead of a raw git stderr dump. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Explains the auto-fetch behavior introduced in 9.0.1, maps common fetch failure modes (missing credentials, SSH key issues, deleted branches) to concrete remediations, and documents --no-auto-fetch for air-gapped pipelines. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(lip): push-driven health via long-lived subscribe CKB used to re-probe IndexStatus on a 60 s TTL every time the rerank path checked whether the LIP index was mixed-models. The LIP daemon has pushed IndexChanged frames to all active sessions since v1.5.0, so the polling was pure debt. New internal/lip/subscribe.go opens a long-lived connection, pings IndexStatus every 3 s to flush the daemon's broadcast channel (the session loop drains queued pushes only after writing a response), reads every frame in a loop, and routes index_changed and index_status by type tag. Reconnects with exponential backoff to 30 s on daemon drop. Engine owns one subscriber, started in NewEngine and cancelled in Close. The cached availability/mixed flags are now written by the subscriber, not the query path — lipSemanticAvailable is lock-free RLock+read, no RPC. Worst-case staleness for the rerank gate drops from 60 s to ~3 s. Tests rewritten: the fake daemon now serves multiple requests per connection and tests wait for the first health frame before asserting, plus a new TestLipSubscriber_ReusesSingleConnection verifies the hot path issues zero requests. Also: CHANGELOG entries for #208 and #209 which landed on develop without one. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: drop stray cmd/ckb-bench/version_test.go Had a package-level init() that printed cartographer version on import under the cartographer build tag — not a test, and leaked output into unrelated test runs when the tag was enabled. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…eanup (#211) * feat(query): NoAutoFetch parity for summarizePr and summarizeDiff The 9.1.0 --no-auto-fetch opt-out was only wired through ReviewPROptions. summarizePr (pr.go) and summarizeDiff (navigation.go) still auto-fetched unconditionally, giving air-gapped callers inconsistent behavior across the three review-adjacent MCP tools. Add NoAutoFetch to both options structs; route through VerifyRef (local-only) instead of EnsureRef when set. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: gitignore ckb_fresh and *.test binaries in repo root ckb_fresh is a dev-build binary that kept showing up as untracked; *.test catches Go test binaries like scip.test. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Closes the correctness and utilisation gaps found in the CKB 9.1.0 review. Correctness: - lipFileURI now handles absolute paths and already-prefixed file:// URIs instead of naively joining them with repoRoot. - Handshake runs once on engine startup; its supported_messages list drives Engine.lipSupports(), the gate for v2.0+ RPCs against older daemons. Daemon version + supported_messages length are logged. Utilisation (three high-ROI LIP RPCs we were not using): - stream_context (v2.1) → explainFile now attaches a ranked list of semantically-related symbols (top 10 within a 2048-token budget) to the response's facts.related field. New streaming transport in internal/lip/stream_context.go reads N symbol_info frames + the end_stream terminator — the previous LIP client was unary-only. - query_expansion (v1.6) → SearchSymbols expands ≤ 2-token queries with up to 5 related terms before FTS5. Recovers recall on vocabulary-mismatch misses without touching precision on compound queries. - explain_match (v2.0) → SemanticSearchWithLIPExplained attaches up to two ranked chunks per semantic hit (top 5 hits, line ranges + text + score), letting the caller cite specific lines instead of a bare file URL. All three are gated on the handshake's supported_messages so clients talking to older daemons fall through to the legacy paths cleanly. Tests: unit coverage for StreamContext happy path, daemon-down, and error-frame abort. Existing lip_health, lip_ranker, and query tests still pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wire up three LIP v2.1 RPCs (stream_context, query_expansion, explain_match), probe LIP index status on handshake and surface a clear warning in `ckb review` when the daemon has no content. Fix Lock() false positive in bug-patterns checker and eliminate err shadowing in subscribe.go. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🟢 Change Impact Analysis
Blast Radius: 0 modules, 0 files, 0 unique callers Generated by CKB |
NFR Tests ✅ 39 unchangedComparing PR against main branch (dynamic baseline). Regressions: 0 ✅ Thresholds: WARN ≥ +5% • FAIL ≥ +10% All scenarios
* = new scenario, compared against static baseline |
CKB Review: ✅ PASS — 100/1000 files (+0 changes) · 0 modules
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #213 +/- ##
======================================
Coverage 43.1% 43.1%
======================================
Files 526 530 +4
Lines 81166 81525 +359
======================================
+ Hits 35022 35200 +178
- Misses 43667 43825 +158
- Partials 2477 2500 +23
Flags with carried forward coverage won't be shown. Click here to find out more. 📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
stream_context,query_expansion,explain_matchRPCs with handshake-based feature gatingIndexStatuson engine startup;ckb reviewwarns when daemon is reachable but has no index, withlip index <repo>hintLockfromLikelyReturnsErrorheuristic —sync.Mutex.Lockreturns nothingsubscribe.go--no-auto-fetchflag, auth-error detection, shallow-clone auto-fetch,NoAutoFetchparity on summarize endpointsTest plan
go test ./...— all packages passckb review --base=main --head=develop— clean run, no false positives🤖 Generated with Claude Code