Skip to content

test(execution): compensation integration tests (Phase 6) - #146

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

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

Conversation

@David-Noble-at-work

Copy link
Copy Markdown
Contributor

Summary

  • Add 6 integration tests verifying the full compensation cycle in internal/execution/compensation_test.go
  • Add Phase 6 plan document

Tests

Test Description
TestCompensationFileOps 3 file ops (write, copy, link) + fail; all 3 files removed after unwind
TestCompensationOrdering LIFO compensation order (C, B, A)
TestCompensationDryRun Dry-run produces nil UndoState; unwind is clean; no FS changes
TestCompensationNilState Non-compensable (nil UndoState) mixed with compensable; unwind handles both
TestCompensationPartialFailure Only completed nodes compensated; nodes after failure never execute
TestCompensationGather Gather 3 items; item 2 fails; items 0-1 compensated via undoCompleted

Test plan

  • All 6 new tests pass
  • Full ./internal/execution/... test suite passes
  • No legacy/compat/deprecated patterns

End-to-end tests verifying the full compensation cycle: file ops
removal after unwind, LIFO ordering, dry-run nil state handling,
partial failure (only completed nodes compensated), and gather
internal compensation across iterations.
@David-Noble-at-work
David-Noble-at-work merged commit 90ad167 into develop Feb 17, 2026
2 checks passed
@David-Noble-at-work
David-Noble-at-work deleted the feat/compensation-tests branch February 17, 2026 19:15
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