Skip to content

release: v9.1.0#213

Merged
SimplyLiz merged 9 commits intomainfrom
develop
Apr 16, 2026
Merged

release: v9.1.0#213
SimplyLiz merged 9 commits intomainfrom
develop

Conversation

@SimplyLiz
Copy link
Copy Markdown
Owner

Summary

  • LIP v2.1 utilisation: wire up stream_context, query_expansion, explain_match RPCs with handshake-based feature gating
  • LIP index status UX: probe IndexStatus on engine startup; ckb review warns when daemon is reachable but has no index, with lip index <repo> hint
  • Push-driven LIP health: long-lived subscribe replaces 60s TTL polling (~3s staleness)
  • Bug-pattern false positive fix: remove Lock from LikelyReturnsError heuristic — sync.Mutex.Lock returns nothing
  • Err shadowing cleanup: eliminate 4 shadow sites in subscribe.go
  • CI improvements: --no-auto-fetch flag, auth-error detection, shallow-clone auto-fetch, NoAutoFetch parity on summarize endpoints
  • Version bump to 9.1.0 (Go, npm, SARIF golden)

Test plan

  • go test ./... — all packages pass
  • ckb review --base=main --head=develop — clean run, no false positives
  • LIP 2.1.1 daemon handshake confirmed (50 supported messages)
  • LIP index empty → warning banner fires; index populated → banner suppressed
  • SARIF golden updated for version bump

🤖 Generated with Claude Code

SimplyLiz and others added 9 commits April 15, 2026 13:52
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>
@SimplyLiz SimplyLiz merged commit 32dc5c2 into main Apr 16, 2026
16 of 18 checks passed
@github-actions
Copy link
Copy Markdown

🟢 Change Impact Analysis

Metric Value
Risk Level LOW 🟢
Files Changed 0
Symbols Changed 0
Directly Affected 0
Transitively Affected 0

Blast Radius: 0 modules, 0 files, 0 unique callers


Generated by CKB

@github-actions
Copy link
Copy Markdown

NFR Tests ✅ 39 unchanged

Comparing PR against main branch (dynamic baseline).

Regressions: 0 ✅

Thresholds: WARN ≥ +5% • FAIL ≥ +10%

All scenarios
Scenario Change Actual (B) Base (B) Time
analyzeChange / large +0.0% 193,169 193,169 980µs
analyzeChange / medium +0.0% 38,575 38,575 248µs
analyzeChange / small +0.0% 4,046 4,046 37µs
analyzeChange / xlarge +0.0% 387,417 387,417 1.865395ms
analyzeImpact / large +0.0% 17,966 17,966 94µs
analyzeImpact / small +0.0% 1,924 1,924 20µs
batchGet / large +0.0% 11,789 11,789 62µs
batchGet / small +0.0% 4,733 4,733 35µs
batchSearch / large +0.0% 90,816 90,816 373µs
batchSearch / medium +0.0% 18,036 18,036 113µs
batchSearch / small +0.0% 3,379 3,379 23µs
explore / large +0.0% 94,262 94,262 448µs
explore / small +0.0% 4,253 4,253 39µs
findReferences / large +0.0% 445,943 445,943 2.435141ms
findReferences / medium +0.0% 44,123 44,123 317µs
findReferences / small +0.0% 4,395 4,395 50µs
getAffectedTests / large +0.0% 7,521 7,521 71µs
getAffectedTests / medium +0.0% 3,110 3,110 30µs
getAffectedTests / small +0.0% 903 903 14µs
getAffectedTests / xlarge +0.0% 14,870 14,870 130µs
getArchitecture / large +0.0% 6,690 6,690 69µs
getArchitecture / small +0.0% 960 960 14µs
getCallGraph / deep +0.0% 15,238 15,238 82µs
getCallGraph / shallow +0.0% 887 887 34µs
getHotspots / large +0.0% 16,748 16,748 120µs
getHotspots / small +0.0% 886 886 14µs
listEntrypoints / large +0.0% 23,798 23,798 132µs
listEntrypoints / small +0.0% 4,795 4,795 56µs
prepareChange / large +0.0% 16,194 16,194 122µs
prepareChange / small +0.0% 2,483 2,483 23µs
searchSymbols / large +0.0% 90,246 90,246 457µs
searchSymbols / medium +0.0% 17,766 17,766 122µs
searchSymbols / small +0.0% 3,588 3,588 46µs
summarizeDiff / large +0.0% 19,939 19,939 165µs
summarizeDiff / small +0.0% 2,133 2,133 36µs
traceUsage / large +0.0% 7,728 7,728 74µs
traceUsage / small +0.0% 725 725 14µs
understand / large +0.0% 460,608 460,608 2.200958ms
understand / small +0.0% 5,555 5,555 45µs

* = new scenario, compared against static baseline

@github-actions
Copy link
Copy Markdown

CKB Analysis

Risk Files +0 -0 Modules

📚 197 stale

Risk factors: Small, focused change

Metric Value
Impact Analysis 0 symbols → 0 affected 🟢
Doc Coverage 6.598984771573605% ⚠️
Complexity 0 violations
Coupling 0 gaps
Blast Radius 0 modules, 0 files
Index indexed (0s) 🆕
💡 Quick wins · 10 suggestions
📚 Stale docs · 197 broken references

Generated by CKB · Run details

@github-actions
Copy link
Copy Markdown

CKB Review: ✅ PASS — 100/100

0 files (+0 changes) · 0 modules

Check Status Detail

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 16, 2026

Codecov Report

❌ Patch coverage is 48.59335% with 201 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/lip/subscribe.go 62.2% 30 Missing and 13 partials ⚠️
internal/query/lip_health.go 48.0% 24 Missing and 2 partials ⚠️
internal/query/lip_ranker.go 7.4% 23 Missing and 2 partials ⚠️
internal/query/lip_stream_context.go 12.0% 22 Missing ⚠️
internal/query/query_expansion.go 26.0% 16 Missing and 1 partial ⚠️
cmd/ckb/review.go 6.6% 14 Missing ⚠️
internal/lip/stream_context.go 78.1% 9 Missing and 5 partials ⚠️
internal/query/pr.go 0.0% 11 Missing ⚠️
internal/backends/git/adapter.go 64.2% 9 Missing and 1 partial ⚠️
internal/query/navigation.go 16.6% 9 Missing and 1 partial ⚠️
... and 2 more
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     
Flag Coverage Δ
unit 43.1% <48.5%> (+<0.1%) ⬆️

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant