Skip to content

Subtask 133.7: Architecture Quick Wins #140

@teemow

Description

@teemow

Parent Issue

#133 - Epic: Architecture Improvements for Muster

Objective

Address small, low-risk improvements that can be completed quickly.

Tasks

1. Add Missing doc.go Files

Some packages lack doc.go files. Add documentation for:

  • internal/template/doc.go
  • internal/dependency/doc.go (verify exists)
  • Any other missing packages

2. Split Files Exceeding 400 Lines

Per workspace rules, files should be under 400 lines. Current violations:

File Lines Action
internal/aggregator/server.go 1146 Covered by #133.2
internal/client/filesystem_client.go 1150 Split by domain
internal/client/kubernetes_client.go 500 Split by domain
internal/workflow/executor.go 931 Extract helpers

3. Remove Deprecated Functions

Remove backward-compatibility aliases:

  • api.RegisterConfig() → use RegisterConfigHandler()
  • api.GetConfig() → use GetConfigHandler()

4. Consolidate Test Utilities

Move scattered test helpers to internal/testing/:

  • Review test files for duplicated mock implementations
  • Consolidate into internal/testing/mock/

5. Update Import Organization

Ensure consistent import grouping:

  1. Standard library
  2. External dependencies
  3. Internal packages

Run goimports -w . across codebase.

Files to Create

  • internal/template/doc.go
  • Any other missing doc.go files

Files to Modify

  • internal/client/filesystem_client.go (split)
  • internal/client/kubernetes_client.go (split)
  • internal/workflow/executor.go (split)
  • internal/api/config.go (remove aliases)
  • Various test files (consolidate mocks)

Acceptance Criteria

  • All packages have doc.go files
  • No file exceeds 400 lines (except those covered by other issues)
  • Deprecated aliases removed
  • Test utilities consolidated
  • Import organization consistent

Dependencies

Should be done early - low risk and sets foundation.

Risks

Low - these are mechanical changes.

Estimated Effort

Small (1-2 days)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions