Skip to content

refactor: add usecase layer for param operations#4

Closed
mpyw wants to merge 2 commits intorefactor/usecase-layerfrom
refactor/usecase-param
Closed

refactor: add usecase layer for param operations#4
mpyw wants to merge 2 commits intorefactor/usecase-layerfrom
refactor/usecase-param

Conversation

@mpyw
Copy link
Owner

@mpyw mpyw commented Jan 2, 2026

Summary

  • Add internal/usecase/param/ package with structured input/output types
  • Create usecases for: show, list, log, diff, set, delete
  • Foundation for supporting both CLI and future GUI (Wails) interfaces

This is Step 3 of the usecase layer architecture refactoring plan.

Test plan

  • Build passes
  • Lint passes
  • Integration with commands (future PR)

🤖 Generated with Claude Code

@codecov
Copy link

codecov bot commented Jan 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.08%. Comparing base (336918d) to head (ab39f03).

Additional details and impacted files
@@                    Coverage Diff                     @@
##           refactor/usecase-layer       #4      +/-   ##
==========================================================
+ Coverage                   89.66%   90.08%   +0.41%     
==========================================================
  Files                          65       71       +6     
  Lines                        4393     4579     +186     
==========================================================
+ Hits                         3939     4125     +186     
  Misses                        304      304              
  Partials                      150      150              
Flag Coverage Δ
e2e 66.97% <ø> (ø)
unittests 80.60% <100.00%> (+0.82%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mpyw mpyw changed the base branch from main to refactor/usecase-layer January 2, 2026 23:18
mpyw and others added 2 commits January 3, 2026 08:58
Add usecase layer for SSM Parameter Store operations that returns
structured data instead of formatting output.

New usecases:
- ShowUseCase: returns ShowOutput with parameter metadata
- ListUseCase: returns ListOutput with entries (optionally with values)
- LogUseCase: returns LogOutput with version history
- DiffUseCase: returns DiffOutput with comparison data
- SetUseCase: creates/updates parameters with tagging support
- DeleteUseCase: deletes parameters

This is Step 3 of the usecase layer architecture refactoring plan.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add tests for all param usecase operations with 100% coverage:
- delete_test.go: DeleteUseCase tests
- diff_test.go: DiffUseCase tests with version/shift support
- list_test.go: ListUseCase tests with filters and pagination
- log_test.go: LogUseCase tests with date filters
- set_test.go: SetUseCase tests with tagging operations
- show_test.go: ShowUseCase tests with version/shift support

Key mock patterns:
- Use fresh slice copies for GetParameterHistory to avoid
  in-place mutation issues with slices.Reverse
- Support sequential GetParameter calls for multi-spec operations
- Proper AWS SDK v2 variadic options signatures

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mpyw
Copy link
Owner Author

mpyw commented Jan 3, 2026

Superseded by #8

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.

1 participant