Skip to content

Commit e34b61a

Browse files
committed
Start the connector only after the setup that succeeds; keep helpers below exports
The first-time-setup eval matched any `connect setup` before the connector start, so a trace that started the connector between a refused setup (the mock refuses one without --serve) and the one that succeeds passed. The step now matches the successful invocation. normalizeSemver sat between two exported functions; it moves below the private helpers it sits beside, per STYLE.md's export order.
1 parent a94b113 commit e34b61a

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

‎internal/harness/claude.go‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -313,14 +313,6 @@ func PluginUpdateNotice(cli string) string {
313313
return ""
314314
}
315315

316-
func normalizeSemver(v string) string {
317-
v = strings.TrimSpace(v)
318-
if v != "" && !strings.HasPrefix(v, "v") {
319-
v = "v" + v
320-
}
321-
return v
322-
}
323-
324316
// InstalledPluginVersion reads the installed plugin version from
325317
// ~/.claude/plugins/installed_plugins.json. Returns "" if unreadable.
326318
func InstalledPluginVersion() string {
@@ -398,6 +390,14 @@ func installedPluginVersionMatching(data []byte, match func(string) bool) string
398390
return ""
399391
}
400392

393+
func normalizeSemver(v string) string {
394+
v = strings.TrimSpace(v)
395+
if v != "" && !strings.HasPrefix(v, "v") {
396+
v = "v" + v
397+
}
398+
return v
399+
}
400+
401401
// pluginInstalled checks if "basecamp" appears as an installed plugin.
402402
// Handles multiple possible JSON schemas without panicking.
403403
func pluginInstalled(data []byte) bool {

‎skill-evals/cases/basecamp-connect/first-time-setup.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ mocks:
3232
expect_sequence:
3333
- match: 'auth agent connect .*(-P|--profile)[ =]''?helper\b'
3434
- match: '^me .*(-P|--profile)[ =]''?helper\b'
35-
- match: 'connect setup'
35+
# The setup that succeeds: the mock refuses one without --serve.
36+
- match: 'connect setup .*--serve[ =]'
3637
# Connecting, setup and the watcher are one flow: the connector starts
3738
# right after setup, without asking again.
3839
- match: '^connect\s+(-P|--profile)[ =]''?helper\b'

0 commit comments

Comments
 (0)