Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmd/doctor.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@ type doctorScope struct {
// Agents merge user-level configuration into every project, so a hook or MCP
// server defined in the user scope genuinely applies to this project. Reporting
// it MISS because the project file does not repeat it describes the file layout
// rather than the effective configuration. When every scope fails, the first
// scope's failure is reported, since that is the one the user is expected to fix.
// rather than the effective configuration. When every scope fails, the failure
// reported is chosen by the rule described below rather than by scope order.
func checkScopedFile(label string, scopes []doctorScope, validate func(string) error, failures *int) {
// When every scope fails, prefer reporting one that exists but is wired up
// wrong over one whose file is simply absent: the former is the user's
Expand Down Expand Up @@ -327,7 +327,7 @@ func checkScopedFile(label string, scopes []doctorScope, validate func(string) e
return
}

*failures++
(*failures)++
switch {
case misconfigured != nil:
fmt.Printf("MISS %s: %s (%v)\n", label, misconfigured.path, misconfiguredErr)
Expand Down
6 changes: 4 additions & 2 deletions watch/control_events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ func TestControlEventBurstTriggersOneRefresh(t *testing.T) {
}

waitForWatchCondition(t, 5*time.Second, func() bool { return refreshes.Load() >= 1 })
// Let any further coalesced refreshes land before counting.
time.Sleep(500 * time.Millisecond)
// Let any further refresh land before counting. Derived from the coalescing
// window so this stays correct if the window changes; several multiples so a
// slow CI machine does not read a late second refresh as a pass.
time.Sleep(5 * controlRefreshWindow)

if got := refreshes.Load(); got != 1 {
t.Fatalf("control event burst caused %d refreshes, want 1", got)
Expand Down
Loading