Skip to content

refactor: remove unused wrappers and isolate test helpers - #4823

Merged
dgageot merged 14 commits into
mainfrom
worktree-board-4952e8fce1f1d586
Nov 7, 2026
Merged

dgageot merged 14 commits into
mainfrom
worktree-board-4952e8fce1f1d586

Conversation

@dgageot

@dgageot dgageot commented Nov 7, 2026

Copy link
Copy Markdown
Member

Summary

  • Remove unused wrappers and the unused concurrent ForEach helper; exercise production entry points in tests.
  • Move test-only helpers into test files and cover configured backup limits.

Validation

  • task build, task test, task lint
  • Targeted race and shuffle tests; Linux, Windows, and WASM builds

@dgageot
dgageot requested a review from a team as a code owner November 7, 2026 19:12
Copilot AI balanced review requested due to automatic review settings November 7, 2026 19:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for this API-surface cleanup.

No open issues 🎉

What changed in this PR

This refactor reduces docker-agent’s production API surface by removing unused wrappers and moving test-only helpers into test files. Tests now call the underlying production entry points directly.

Changes:

  • Remove redundant wrappers and the unused concurrent ForEach helper.
  • Isolate clock, ID, logging, and telemetry test helpers.
  • Preserve image-chunking coverage and add tests for configured log-backup limits.
File Description
pkg/​tui/​image/​image_test.go Relocate Kitty payload-chunking coverage here.
pkg/​tui/​components/​messages/​selection_test.go Test selection using NewFastRenderer directly.
pkg/​tui/​components/​message/​styled_lines_test.go Use NewFastRenderer in tests and benchmarks.
pkg/​tui/​components/​markdown/​renderer.go Remove the redundant renderer constructor.
pkg/​telemetry/​genai/​stability.go Remove the production-exposed test reset helper.
pkg/​telemetry/​genai/​stability_test.go Define and use a local stability-reset helper.
pkg/​teamloader/​teamloader_test.go Call RequiredEvaluatorEnvVars directly.
pkg/​skills/​expand.go Remove the error-discarding expansion wrapper.
pkg/​skills/​expand_test.go Test error-returning expansion directly.
pkg/​session/​session.go Remove test-only clock and ID options.
pkg/​session/​clock_test.go Define clock and ID options locally.
pkg/​promptfiles/​lookup.go Remove the unused exported lookup wrapper.
pkg/​promptfiles/​lookup_test.go Check internal lookup results and errors.
pkg/​logging/​rotate.go Remove test-only rotation option constructors.
pkg/​logging/​rotate_test.go Localize options and test backup limits.
pkg/​leantui/​ui/​image.go Remove the Kitty sequence wrapper.
pkg/​leantui/​ui/​image_test.go Remove coverage relocated to the image package.
pkg/​httpclient/​safeclient.go Remove the private-IP client convenience wrapper.
pkg/​httpclient/​safeclient_test.go Test the configurable client factory directly.
pkg/​creator/​agent.go Remove the redundant Agent loader wrapper.
pkg/​creator/​agent_test.go Test Load and its returned team directly.
pkg/​config/​gather.go Remove the evaluator-environment wrapper.
pkg/​config/​evaluators_test.go Use direct credential gathering with gateway options.
pkg/​concurrent/​mapslice.go Remove unused concurrent ForEach.
pkg/​concurrent/​mapslice_test.go Remove the deleted helper’s test.
pkg/​cli/​runner.go Update comments to name the metadata-aware attachment function.
pkg/​chat/​image.go Remove the unused base64 resize wrapper.
pkg/​chat/​image_test.go Remove the deleted resize wrapper’s test.
pkg/​chat/​attach.go Remove the attachment wrapper and consolidate documentation.
pkg/​chat/​attach_test.go Exercise ProcessAttachmentWithMetadata directly.

Review effort: Balanced

@dgageot
dgageot added this pull request to the merge queue Nov 7, 2026
Merged via the queue into main with commit bbe70f5 Nov 7, 2026
18 checks passed
@dgageot
dgageot deleted the worktree-board-4952e8fce1f1d586 branch November 7, 2026 21:20
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.

3 participants