From b6aede575f7e0076b4ebbb7301228c462e22da08 Mon Sep 17 00:00:00 2001 From: "devsy-app[bot]" <277138668+devsy-app[bot]@users.noreply.github.com> Date: Sun, 16 Aug 2026 09:42:41 +0000 Subject: [PATCH] fix(cmd): lowercase credentials server logs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## cmd/ subdirectory reviewed `cmd/internal` — specifically `cmd/internal/agentcontainer/credentials_server.go`. ## Issue found The repository convention (documented in AGENTS.md) is that **log messages must be lowercase**. This file in the dev container credentials server contained five non-lowercase log strings: - `log.Errorf("Failed to decode git SSH signing key, ...")` - `log.Errorf("Failed to configure git SSH signature helper, ...")` - `log.Debugf("Could not read result for port attributes: %v", err)` - `log.Debugf("Could not parse result for port attributes: %v", err)` - `log.Debugf("Forwarding port %s (%s, protocol=%s)", ...)` These are consistent lowercase-log violations. The rest of the `cmd/` tree (e.g. `cmd/snapshot`, `cmd/secrets`, `cmd/root.go`) already follows the lowercase convention (`"restoring snapshot..."`, `"secret %q deleted..."`, `"panic: ..."`), so these five were the outliers. ## Minimal change Lowercased the five log message strings in `cmd/internal/agentcontainer/credentials_server.go`. No behavior change, no logic touched — only the leading capitalization of each log string. ## Verification performed - `task cli:format` — clean (gofmt/gci/gofumpt via golangci-lint fmt). - `task cli:lint:ci` — **0 issues** (run against the `--new-from-patch` diff vs `origin/main`). - `task cli:test` — passes for the touched package (`go test ./cmd/internal/agentcontainer/...` → `ok`). The only failures are the **known pre-existing** `pkg/git` `TestRepoClone*` tests, which fail on `origin/main` already (stale assertion) and are unrelated to this change (the change does not touch `pkg/git`). - Confirmed no tests assert on these log strings. This PR was created by an AI agent as part of an automated daily CLI review job. --- cmd/internal/agentcontainer/credentials_server.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/internal/agentcontainer/credentials_server.go b/cmd/internal/agentcontainer/credentials_server.go index d2ce30be7..35ae78ac5 100644 --- a/cmd/internal/agentcontainer/credentials_server.go +++ b/cmd/internal/agentcontainer/credentials_server.go @@ -200,13 +200,13 @@ func (cmd *CredentialsServerCmd) configureGitSigningKey() func() { decodedKey, err := base64.StdEncoding.DecodeString(cmd.GitUserSigningKey) if err != nil { - log.Errorf("Failed to decode git SSH signing key, signing will be unavailable: %v", err) + log.Errorf("failed to decode git SSH signing key, signing will be unavailable: %v", err) return noop } if err := gitsshsigning.ConfigureHelper(cmd.User, string(decodedKey)); err != nil { log.Errorf( - "Failed to configure git SSH signature helper, signing will be unavailable: %v", + "failed to configure git SSH signature helper, signing will be unavailable: %v", err, ) return noop @@ -279,12 +279,12 @@ func forwardPorts(ctx context.Context, client tunnel.TunnelClient) error { func portOptionsFromResult() []netstat.WatcherOption { raw, err := os.ReadFile(config.DevContainerResultPath) if err != nil { - log.Debugf("Could not read result for port attributes: %v", err) + log.Debugf("could not read result for port attributes: %v", err) return nil } result := &devconfig.Result{} if err := json.Unmarshal(raw, result); err != nil { - log.Debugf("Could not parse result for port attributes: %v", err) + log.Debugf("could not parse result for port attributes: %v", err) return nil } mc := result.MergedConfig @@ -320,7 +320,7 @@ type forwarder struct { // Forward relays the auto-discovered port to the client over gRPC. func (f *forwarder) Forward(port string, attr netstat.PortForwardAttribute) error { if attr.Label != "" { - log.Debugf("Forwarding port %s (%s, protocol=%s)", port, attr.Label, attr.Protocol) + log.Debugf("forwarding port %s (%s, protocol=%s)", port, attr.Label, attr.Protocol) } _, err := f.client.ForwardPort(f.ctx, &tunnel.ForwardPortRequest{Port: port}) return err