-
-
Notifications
You must be signed in to change notification settings - Fork 6
Release v8.1.0 #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release v8.1.0 #129
Conversation
Patch coverage should only run on PRs, not on direct pushes to main or develop. This was causing false failures on release merges. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- SCIP "not found" message now shows which indexer to use (e.g., "uses scip-go") - Add 'ckb index' as primary suggested fix for missing SCIP index - Filter LSP checks to only show servers relevant to detected project languages - Map JavaScript projects to typescript LSP server (they share typescript-language-server) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Addresses GO-2026-4339 (net/url) and GO-2026-4340 (crypto/tls) standard library vulnerabilities. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
fix: improve doctor command error messages
* fix: lazy engine loading for fast MCP startup MCP server was taking 43+ seconds to respond to initialize handshake because it loaded the entire SCIP index synchronously before starting. Changes: - Add NewMCPServerLazy() that accepts an engine loader function - Engine is now loaded on first tool call, not during startup - MCP handshake completes in ~0.6s instead of 43s - Temporarily disable multi-repo mode to use lazy path everywhere Also improves `ckb setup` for Claude Code: - Detect if CKB is already configured correctly (no action needed) - Warn when configured path differs from current binary - Show note when switching between npx and local binary - Automatically update config instead of failing with "already exists" Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: enrich not-found errors with repo context for clients without roots support When an MCP client (e.g. Cursor) doesn't support roots/list, tool errors like SYMBOL_NOT_FOUND give no indication that the index might be for a different project. This adds repo path context to those errors so the AI agent can understand the mismatch. Also switches compound tools to GetEngine() to prevent nil panics with lazy loading. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: prevent redundant entries in Grok and VS Code global setup configureGrokGlobal and configureVSCodeGlobal now check for existing config before calling their respective CLIs, matching the pattern already used by configureClaudeCodeGlobal via claudeMcpAdd. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: add switchProject tool for dynamic repo switching Cursor (and other MCP clients without roots/list support) doesn't pass the workspace directory to MCP servers, so CKB falls back to the wrong project. The new switchProject tool lets AI agents self-correct by switching to the correct repo path at runtime. Changes: - Add switchProject() method and toolSwitchProject handler - Register tool in core preset (available in all presets) - Update enrichNotFoundError() to suggest switchProject instead of restart - Bump DefaultPageSize from 15 to 40 so all core tools appear on page 1 (Cursor doesn't request subsequent pages) - Update tests for new tool count (core: 20, full: 88) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: resolve govet shadow warnings in switchProject Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Five features based on Cursor agent feedback from live refactoring trial: 1. Function-level complexity in auditRisk — wire tree-sitter complexity analyzer into audit, returning per-function cyclomatic+cognitive scores sorted by complexity (top 10 per file). Falls back to heuristic. 2. Graceful degradation messaging — new DegradationWarning type with capability percentages and fix commands. Wired into explore, understand, prepareChange, auditRisk, and findDeadCode MCP handlers. 3. Test gap analysis — new testgap package + analyzeTestGaps MCP tool. Cross-references complexity analysis with SCIP references or heuristic name matching to identify untested functions, sorted by risk. 4. Richer prepareChange for rename/extract — RenameDetail (call sites, type refs, imports with context snippets) and ExtractDetail (boundary analysis) added as parallel goroutines in PrepareChange. 5. Unified planRefactor compound tool — aggregates prepareChange + auditRisk + analyzeTestGaps in parallel, generates ordered refactoring steps by change type (rename/extract/delete/modify). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Four new features extending the refactoring toolset: 1. Dependency cycle detection (findCycles) - Tarjan's SCC algorithm to detect circular dependencies at module/directory/file granularity, with break-cost analysis suggesting which edge to remove. 2. Move/relocate change type - adds "move" to prepareChange and planRefactor, scanning for affected imports (SCIP-precise or heuristic fallback) and target path conflicts. 3. Extract variable flow analysis - tree-sitter-based parameter/return detection for extract refactorings, with CGO/non-CGO build tags for graceful degradation. 4. Suggested refactoring detection (suggestRefactorings) - proactive detection combining complexity, coupling, dead code, and audit analyzers in parallel to surface prioritized opportunities. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- cycles/detector_test.go: Tarjan SCC algorithm, break cost, severity - query/cycles_test.go: graph extraction, cycle summary - query/prepare_move_test.go: target conflicts, heuristic import scanning - query/prepare_extract_test.go: signature generation, language inference - suggest/analyzer_test.go: severity helpers, dedup, file listing Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add CHANGELOG entries for cycle detection, move/relocate, extract flow analysis, and suggested refactoring detection. Add 23 MCP integration tests for all batch 2 features. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Cover the previously untested extract/analyzer.go with CGO-tagged tests: - Full Analyze() pipeline for Go, JavaScript, and Python source - classifyVariables() logic: parameter/return/local classification, modified tracking, empty input, unused-in-region exclusion - AST walking: findContainingFunction, collectDeclarations, collectReferences, keyword filtering - Helper functions: isKeyword, langToExtension, node type helpers Documents known limitation: Go assignment_statement wraps LHS in expression_list, so `x = expr` doesn't trigger isModified detection. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- extract/analyzer.go: return parse error instead of nil (nilerr), remove unused strings import and lines variable - suggest/analyzer.go: propagate filepath.Walk errors instead of swallowing them (nilerr) - prepare_move_test.go: use context.TODO() instead of nil context (staticcheck SA1012) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The extract flow analyzer always operated on the entire file because startLine/endLine were never passed from MCP through to the analyzer. This made parameter/return detection useless since all variables are both defined and used within the same (whole-file) range. Adds startLine/endLine to prepareChange MCP tool definition, parses them in the handler, and threads them through PrepareChangeOptions and PlanRefactorOptions to getPrepareExtractDetail. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
feat: v8.1 refactoring tools batch 2
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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 |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #129 +/- ##
=======================================
+ Coverage 45.1% 45.5% +0.4%
=======================================
Files 350 365 +15
Lines 59747 61829 +2082
=======================================
+ Hits 26961 28169 +1208
- Misses 30960 31758 +798
- Partials 1826 1902 +76
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:
|
🔐 Security Audit Results
📦 Dependency VulnerabilitiesFound 7 vulnerability(ies) across 2 scanner(s) DetailsTrivy (4 findings)
OSV-Scanner (3 findings)
📜 License IssuesFound 25 non-permissive license(s) Details
Generated by CKB Security Audit | View Details | Security Tab |
🟡 Change Impact Analysis
Blast Radius: 0 modules, 1 files, 405 unique callers 📝 Changed Symbols (884)
🎯 Affected Downstream (20)
Recommendations
Generated by CKB |
CKB Analysis
Risk factors: Large PR with 46 files • High churn: 6569 lines changed • Touches 18 hotspot(s)
🎯 Change Impact Analysis · 🟡 MEDIUM · 884 changed → 20 affected
Symbols changed in this PR:
Downstream symbols affected:
Recommendations:
💣 Blast radius · 0 symbols · 10 tests · 0 consumersTests that may break:
🔥 Hotspots · 18 volatile files
📦 Modules · 2 at risk
📊 Complexity · 11 violations
💡 Quick wins · 10 suggestions
📚 Stale docs · 143 broken references
Generated by CKB · Run details |
Summary
Release CKB v8.1.0 with refactoring intelligence features.
New Tools
findCycles— Dependency cycle detection using Tarjan's SCC algorithm (module/directory/file granularity)suggestRefactorings— Proactive refactoring suggestions (complexity, coupling, dead code, extract candidates)prepareChange(move) — Move/relocate analysis with import tracking and conflict detectionprepareChange(extract) — Tree-sitter flow analysis for extract variable/function with parameter and return detectionplanRefactor— Unified refactoring planner combining risk, impact, test gaps, and ordered stepsImprovements
switchProjecttool for multi-repo workflows.ckb/config.jsonckb doctorckb affected-testsBug Fixes
Stats
Test plan
-race(57 packages, 0 failures)go vet ./...clean🤖 Generated with Claude Code