Skip to content

refactor(agent): remove unused Client.SDK() and Socket() accessors - #180

Open
aashishrajdev wants to merge 2 commits into
Open-Source-Kigali:developfrom
aashishrajdev:develop
Open

refactor(agent): remove unused Client.SDK() and Socket() accessors#180
aashishrajdev wants to merge 2 commits into
Open-Source-Kigali:developfrom
aashishrajdev:develop

Conversation

@aashishrajdev

Copy link
Copy Markdown
Contributor

Summary

Removes two exported accessors on the agent's Docker client that have no callers anywhere in the repo, tests included. SDK() handed out the raw Docker client, letting callers bypass the per-call timeouts and error wrapping that Service enforces. Socket() was the only reader of the socket field, so the field is removed too.

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Docs
  • Infrastructure / CI
  • Breaking change

Areas touched

  • apps/server (NestJS)
  • apps/web (React / Vite)
  • apps/agent (Go)
  • packages/protocol (shared WebSocket contracts)
  • infrastructure / .github/workflows
  • docs

Related issues

Closes #171

How to test

  1. Confirm no callers remain (expect no output):
    grep -rn "\.SDK()\|\.Socket()" --include=*.go .

@aashishrajdev

Copy link
Copy Markdown
Contributor Author

The failing check formatting step is pre-existing on develop: internal/communication/client.go has a whitespace-only line from e857fd0 (PR #155), which landed right after the gofmt check was added in #154. Every Agent run on develop since then fails the same way.

Added the one-line gofmt fix here so CI is green. It is the only file in apps/agent that gofmt rejects.

@rodriguecyber

Copy link
Copy Markdown
Collaborator

The failing check formatting step is pre-existing on develop: internal/communication/client.go has a whitespace-only line from e857fd0 (PR #155), which landed right after the gofmt check was added in #154. Every Agent run on develop since then fails the same way.

Added the one-line gofmt fix here so CI is green. It is the only file in apps/agent that gofmt rejects.

please look to the CI checks are failing

@aashishrajdev

Copy link
Copy Markdown
Contributor Author

@rodriguecyber the ci is green now you can merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Client.SDK() and Client.Socket() in the agent have no callers, and SDK() leaks the raw Docker client

2 participants