Skip to content

Commit bb9ee83

Browse files
Release v1.4.3
Stop synchronous update checks before MCP stdio initialization and add regression coverage for the startup path. Closes #17 Closes #18 Closes #19
1 parent 18d8d8d commit bb9ee83

4 files changed

Lines changed: 93 additions & 13 deletions

File tree

CHANGELOG.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
### Planned Features
11+
- Additional language model support
12+
- Batch indexing improvements
13+
- Enhanced error messages
14+
- Configuration validation tool
15+
- Performance monitoring and metrics
16+
17+
## [1.4.3] - 2026-04-05
18+
19+
### Fixed
20+
- **MCP startup handshake regression** - MCP mode no longer performs the synchronous GitHub update check before stdio initialization
21+
- Prevents startup-time network requests from delaying or interfering with MCP `initialize`
22+
- `update_check: false` is now respected before any update check is considered
23+
24+
### Notes
25+
- Addresses the macOS Apple Silicon MCP startup report tracked in issue #19
26+
827
## [1.3.1] - 2026-03-12
928

1029
### Added
@@ -199,15 +218,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
199218
- GPU support currently limited to macOS Apple Silicon (Metal)
200219
- First run requires internet connection to download model files (~450MB)
201220

202-
## [Unreleased]
203-
204-
### Planned Features
205-
- Additional language model support
206-
- Batch indexing improvements
207-
- Enhanced error messages
208-
- Configuration validation tool
209-
- Performance monitoring and metrics
210-
211221
---
212222

213223
For more information, see the [README](README.md).

cmd/main.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ import (
1515
"github.com/tomohiro-owada/devrag/internal/version"
1616
)
1717

18+
func shouldCheckForUpdates(isMCP bool, cfg *config.Config) bool {
19+
return !isMCP && cfg != nil && cfg.IsUpdateCheckEnabled()
20+
}
21+
1822
func main() {
1923
// Extract global flags before subcommand
2024
configPath := "config.json"
@@ -58,9 +62,6 @@ func main() {
5862
fmt.Fprintf(os.Stderr, "[INFO] DevRag v%s\n", version.Version)
5963
}
6064

61-
// Check for updates (synchronous, shown immediately after startup message)
62-
updater.CheckForUpdate(version.Version, "")
63-
6465
// 1. Load configuration
6566
cfg, err := config.Load(configPath)
6667
if err != nil {
@@ -72,6 +73,12 @@ func main() {
7273
os.Exit(1)
7374
}
7475

76+
// Avoid blocking MCP stdio initialization on a network request.
77+
// CLI mode can still perform the synchronous update notice.
78+
if shouldCheckForUpdates(isMCP, cfg) {
79+
updater.CheckForUpdate(version.Version, "")
80+
}
81+
7582
if isMCP {
7683
fmt.Fprintf(os.Stderr, "[INFO] Configuration loaded successfully\n")
7784
fmt.Fprintf(os.Stderr, "[INFO] Document patterns: %v\n", cfg.DocumentPatterns)

cmd/main_test.go

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
package main
2+
3+
import (
4+
"testing"
5+
6+
"github.com/tomohiro-owada/devrag/internal/config"
7+
)
8+
9+
func TestShouldCheckForUpdates(t *testing.T) {
10+
disabled := config.DefaultConfig()
11+
updateCheckDisabled := false
12+
disabled.UpdateCheck = &updateCheckDisabled
13+
14+
enabled := config.DefaultConfig()
15+
updateCheckEnabled := true
16+
enabled.UpdateCheck = &updateCheckEnabled
17+
18+
tests := []struct {
19+
name string
20+
isMCP bool
21+
cfg *config.Config
22+
want bool
23+
}{
24+
{
25+
name: "cli mode with default config",
26+
isMCP: false,
27+
cfg: config.DefaultConfig(),
28+
want: true,
29+
},
30+
{
31+
name: "cli mode with update check disabled",
32+
isMCP: false,
33+
cfg: disabled,
34+
want: false,
35+
},
36+
{
37+
name: "cli mode with update check enabled",
38+
isMCP: false,
39+
cfg: enabled,
40+
want: true,
41+
},
42+
{
43+
name: "mcp mode never checks",
44+
isMCP: true,
45+
cfg: enabled,
46+
want: false,
47+
},
48+
{
49+
name: "nil config does not check",
50+
isMCP: false,
51+
cfg: nil,
52+
want: false,
53+
},
54+
}
55+
56+
for _, tt := range tests {
57+
t.Run(tt.name, func(t *testing.T) {
58+
if got := shouldCheckForUpdates(tt.isMCP, tt.cfg); got != tt.want {
59+
t.Fatalf("shouldCheckForUpdates(%v, %v) = %v, want %v", tt.isMCP, tt.cfg, got, tt.want)
60+
}
61+
})
62+
}
63+
}

internal/version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ package version
22

33
// Version is the current version of DevRag
44
// This is set at build time via -ldflags
5-
var Version = "1.4.2"
5+
var Version = "1.4.3"

0 commit comments

Comments
 (0)