Align integration unapply drift test with drift-protection behavior#21
Merged
Conversation
Tasks: - T20260510-26: Align integration unapply drift test with drift-protection behavior
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task
T20260510-26 — Align integration unapply drift test with drift-protection behavior
Description
Problem
go test ./...currently fails intest/integrationatTestUnapply_DriftDetection. The integration test still expects non-force unapply to remove a copy-mode file whose checksum drifted, but the current engine behavior returnsvalidation failed: drift detected: local modifications detectedand 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
Acceptance Criteria
TestUnapply_DriftDetectionasserts the intended non-force drift behavior explicitly, including the returned error or removal result, the filesystem outcome, and workspace-state outcome.Forceis true if that remains the intended escape hatch.go test -v ./test/integration -run TestUnapply_DriftDetectionpasses.go test ./...passes.Execution Summary
Click to expand
Outcome: success
Changes:
test/integration/unapply_test.gosoTestUnapply_DriftDetectionnow asserts the intended drift-protection contract for non-force unapply: nil result, validation/drift error wrapping, preserved modified file content, and preserved workspace state.TestUnapply_DriftDetectionproving a drifted copy-mode file is removed and workspace state is deleted whenForceis true.Assessment: Focused integration-test alignment with existing engine/unit behavior. Validation passed with
go test -v ./test/integration -run TestUnapply_DriftDetectionandgo test ./....Validation
Branch Freshness
origin/mainorbit/T20260510-26-6a00efcaauthored by: gpt-5