Skip to content

feat(service): implement compensation for service provider (Phase 2) - #142

Merged
David-Noble-at-work merged 1 commit into
developfrom
feat/service-compensation
Feb 17, 2026
Merged

David-Noble-at-work merged 1 commit into
developfrom
feat/service-compensation

Conversation

@David-Noble-at-work

Copy link
Copy Markdown
Contributor

Summary

  • Add state capture to 5 Forward methods on service.Provider (Start, Stop, Restart, Enable, Disable)
  • Add 5 Compensate* Backward methods for undo logic
  • Add isRunning/isEnabled platform-specific state queries (Linux, macOS, Windows)
  • Wire action Do to capture state as UndoState, Undo to delegate to Compensate*
  • Unexported test hook fields on Provider for mock-based testing
  • 10 tests verify Forward+Backward per Activity pair with mock commands

Test plan

  • All 10 new service provider tests pass (go test ./internal/execution/provider/service/)
  • All existing execution tests pass (go test -count=1 ./internal/execution/...)
  • Full repo builds clean (go build ./...)

Add state capture to 5 Forward methods (Start, Stop, Restart, Enable,
Disable) and 5 Compensate* Backward methods on service.Provider. Wire
action Do/Undo to delegate to Provider methods. Add isRunning/isEnabled
platform-specific state queries.

10 mock-based tests verify Forward+Backward per Activity pair.
@David-Noble-at-work
David-Noble-at-work merged commit a623c60 into develop Feb 17, 2026
2 checks passed
@David-Noble-at-work
David-Noble-at-work deleted the feat/service-compensation branch February 17, 2026 07:34
David-Noble-at-work pushed a commit that referenced this pull request Feb 17, 2026
Update compensation.md to reflect all 6 phases merged:
- Phase 1 (PR #141): File provider compensation
- Phase 2 (PR #142): Service provider compensation
- Phase 3 (PR #143): Package provider compensation
- Phase 4 (PR #144): Net, Archive, Git provider compensation
- Phase 5 (PR #145 + noblefactor-ops PR #80): Generator template update
- Phase 6 (PR #146): Integration tests
David-Noble-at-work added a commit that referenced this pull request Feb 17, 2026
Update compensation.md to reflect all 6 phases merged:
- Phase 1 (PR #141): File provider compensation
- Phase 2 (PR #142): Service provider compensation
- Phase 3 (PR #143): Package provider compensation
- Phase 4 (PR #144): Net, Archive, Git provider compensation
- Phase 5 (PR #145 + noblefactor-ops PR #80): Generator template update
- Phase 6 (PR #146): Integration tests
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