diff --git a/internal/cmd/rag/cmd_ingest.go b/internal/cmd/rag/cmd_ingest.go index b1c7e9f4..e956b22f 100644 --- a/internal/cmd/rag/cmd_ingest.go +++ b/internal/cmd/rag/cmd_ingest.go @@ -169,5 +169,3 @@ func IngestFile(ctx context.Context, filePath, collectionName string) (int, erro return rag.IngestFile(ctx, qdrantClient, ollamaClient, collectionName, filePath, rag.DefaultChunkConfig()) } - - diff --git a/internal/cmd/security/cmd_jobs.go b/internal/cmd/security/cmd_jobs.go index df655e8a..8e0a9e0b 100644 --- a/internal/cmd/security/cmd_jobs.go +++ b/internal/cmd/security/cmd_jobs.go @@ -12,10 +12,10 @@ import ( ) var ( - jobsTargets []string + jobsTargets []string jobsIssueRepo string - jobsDryRun bool - jobsCopies int + jobsDryRun bool + jobsCopies int ) func addJobsCommand(parent *cli.Command) { diff --git a/internal/cmd/security/cmd_security.go b/internal/cmd/security/cmd_security.go index 68f1b4e8..12358b86 100644 --- a/internal/cmd/security/cmd_security.go +++ b/internal/cmd/security/cmd_security.go @@ -203,7 +203,6 @@ func buildTargetRepo(target string) (*repos.Repo, string) { return &repos.Repo{Name: parts[1]}, target } - // AlertSummary holds aggregated alert counts. type AlertSummary struct { Critical int diff --git a/internal/core-ide/claude_bridge.go b/internal/core-ide/claude_bridge.go index 279c745f..a5532e79 100644 --- a/internal/core-ide/claude_bridge.go +++ b/internal/core-ide/claude_bridge.go @@ -78,7 +78,7 @@ func (cb *ClaudeBridge) connectToMCP() { log.Printf("Claude bridge MCP read error: %v", err) break } - select { + select { case cb.broadcast <- message: default: log.Printf("Claude bridge: broadcast channel full, dropping message") diff --git a/internal/variants/core_ide.go b/internal/variants/core_ide.go index 089f38dc..2edb6417 100644 --- a/internal/variants/core_ide.go +++ b/internal/variants/core_ide.go @@ -18,8 +18,8 @@ import ( // CLI commands available via IPC _ "github.com/host-uk/core/internal/cmd/ai" - _ "github.com/host-uk/core/internal/cmd/dev" _ "github.com/host-uk/core/internal/cmd/deploy" + _ "github.com/host-uk/core/internal/cmd/dev" _ "github.com/host-uk/core/internal/cmd/php" _ "github.com/host-uk/core/internal/cmd/rag" ) diff --git a/pkg/ansible/modules.go b/pkg/ansible/modules.go index 200aaa1d..25585af8 100644 --- a/pkg/ansible/modules.go +++ b/pkg/ansible/modules.go @@ -22,7 +22,7 @@ func (e *Executor) executeModule(ctx context.Context, host string, client *SSHCl oldPass := client.becomePass client.SetBecome(true, task.BecomeUser, "") - + defer client.SetBecome(oldBecome, oldUser, oldPass) } diff --git a/pkg/ansible/ssh.go b/pkg/ansible/ssh.go index 9678ba63..6cf3d05e 100644 --- a/pkg/ansible/ssh.go +++ b/pkg/ansible/ssh.go @@ -175,7 +175,6 @@ func (c *SSHClient) Connect(ctx context.Context) error { return log.E("ssh.Connect", fmt.Sprintf("ssh connect %s", addr), err) } - c.client = ssh.NewClient(sshConn, chans, reqs) return nil } @@ -300,11 +299,11 @@ func (c *SSHClient) Upload(ctx context.Context, local io.Reader, remote string, // Use cat to write the file (simpler than SCP) writeCmd := fmt.Sprintf("cat > %q && chmod %o %q", remote, mode, remote) - + // If become is needed, we construct a command that reads password then content from stdin // But we need to be careful with handling stdin for sudo + cat. // We'll use a session with piped stdin. - + session2, err := c.client.NewSession() if err != nil { return log.E("ssh.Upload", "new session for write", err) diff --git a/pkg/build/buildcmd/cmd_release.go b/pkg/build/buildcmd/cmd_release.go index 8c40a984..330c96b3 100644 --- a/pkg/build/buildcmd/cmd_release.go +++ b/pkg/build/buildcmd/cmd_release.go @@ -14,10 +14,10 @@ import ( // Flag variables for release command var ( - releaseVersion string - releaseDraft bool - releasePrerelease bool - releaseGoForLaunch bool + releaseVersion string + releaseDraft bool + releasePrerelease bool + releaseGoForLaunch bool ) var releaseCmd = &cli.Command{ diff --git a/pkg/rag/ingest.go b/pkg/rag/ingest.go index 33b10b11..7418fe36 100644 --- a/pkg/rag/ingest.go +++ b/pkg/rag/ingest.go @@ -213,4 +213,4 @@ func IngestFile(ctx context.Context, qdrant *QdrantClient, ollama *OllamaClient, } return len(points), nil -} \ No newline at end of file +} diff --git a/pkg/rag/ollama.go b/pkg/rag/ollama.go index c68ca14e..fde20d3d 100644 --- a/pkg/rag/ollama.go +++ b/pkg/rag/ollama.go @@ -117,4 +117,4 @@ func (o *OllamaClient) VerifyModel(ctx context.Context) error { // Model returns the configured embedding model name. func (o *OllamaClient) Model() string { return o.config.Model -} \ No newline at end of file +} diff --git a/pkg/rag/qdrant.go b/pkg/rag/qdrant.go index 885def47..7acff859 100644 --- a/pkg/rag/qdrant.go +++ b/pkg/rag/qdrant.go @@ -222,4 +222,4 @@ func valueToGo(v *qdrant.Value) any { default: return nil } -} \ No newline at end of file +} diff --git a/pkg/rag/query.go b/pkg/rag/query.go index ae85af6d..22df5eee 100644 --- a/pkg/rag/query.go +++ b/pkg/rag/query.go @@ -160,4 +160,4 @@ func FormatResultsJSON(results []QueryResult) string { } sb.WriteString("]") return sb.String() -} \ No newline at end of file +}