Skip to content

Align integration unapply drift test with drift-protection behavior#21

Merged
danieljhkim merged 1 commit into
mainfrom
orbit/T20260510-26-6a00efca
May 10, 2026
Merged

Align integration unapply drift test with drift-protection behavior#21
danieljhkim merged 1 commit into
mainfrom
orbit/T20260510-26-6a00efca

Conversation

@danieljhkim
Copy link
Copy Markdown
Owner

Task

T20260510-26 — Align integration unapply drift test with drift-protection behavior

Description

Problem

go test ./... currently fails in test/integration at TestUnapply_DriftDetection. The integration test still expects non-force unapply to remove a copy-mode file whose checksum drifted, but the current engine behavior returns validation failed: drift detected: local modifications detected and protects the file.

Why It Matters

The unit-level unapply behavior and integration test contract need to agree so CI stays green. This should be handled before or alongside broad refactors so cleanup tasks are not working from a red baseline.

Constraints / Notes

  • Determine whether the intended contract is the newer drift-protection behavior or the older remove-anyway behavior.
  • If drift protection is intended, update the integration test to assert the non-force error, preserved file/state, and force-mode removal path.
  • If remove-anyway is intended, adjust engine/unit coverage consistently instead of only changing the integration test.
  • Keep the fix focused on unapply drift behavior; do not fold this into modularization tasks.

Acceptance Criteria

  • TestUnapply_DriftDetection asserts the intended non-force drift behavior explicitly, including the returned error or removal result, the filesystem outcome, and workspace-state outcome.
  • Force-mode integration coverage verifies that drifted copy-mode files can still be removed when Force is true if that remains the intended escape hatch.
  • go test -v ./test/integration -run TestUnapply_DriftDetection passes.
  • go test ./... passes.

Execution Summary

Click to expand

Outcome: success

Changes:

  • Updated test/integration/unapply_test.go so TestUnapply_DriftDetection now asserts the intended drift-protection contract for non-force unapply: nil result, validation/drift error wrapping, preserved modified file content, and preserved workspace state.
  • Added a force-mode subtest under TestUnapply_DriftDetection proving a drifted copy-mode file is removed and workspace state is deleted when Force is true.

Assessment: Focused integration-test alignment with existing engine/unit behavior. Validation passed with go test -v ./test/integration -run TestUnapply_DriftDetection and go test ./....

Validation

  • Not reported

Branch Freshness

  • Base ref: origin/main
  • Head ref: orbit/T20260510-26-6a00efca
  • Behind base: 0
  • Ahead of base: 1

authored by: gpt-5

Tasks:
- T20260510-26: Align integration unapply drift test with drift-protection behavior
@danieljhkim danieljhkim merged commit e0087f0 into main May 10, 2026
3 of 4 checks passed
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