unit and integration tests for filesystem pause/resume integrity#2252
unit and integration tests for filesystem pause/resume integrity#2252matthewlouisbrockman wants to merge 9 commits intozero-copy-fsfrom
Conversation
PR SummaryLow Risk Overview Written by Cursor Bugbot for commit 1836ec5. This will update automatically on new commits. Configure here. |
tests/integration/internal/tests/orchestrator/filesystem_pause_resume_integrity_test.go
Show resolved
Hide resolved
tests/integration/internal/tests/orchestrator/filesystem_pause_resume_integrity_test.go
Show resolved
Hide resolved
tests/integration/internal/tests/orchestrator/filesystem_pause_resume_integrity_test.go
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
LGTM — test-only PR with three minor nits already flagged inline.
Extended reasoning...
Overview
This PR adds unit tests to cache_test.go covering Cache.ExportToDiff semantics (zero dirty blocks, mixed dirty blocks, non-contiguous ranges) and a new integration test file for filesystem pause/resume integrity across contiguous, scattered, and zeroed/truncate write patterns.
Security risks
None. The changes are entirely test code with no modifications to production logic.
Level of scrutiny
Low. Test-only additions that exercise already-merged production code. The unit tests follow established patterns; the integration tests are gated behind the existing test infrastructure and an opt-in env var for the stress variant.
Other factors
Three nits were flagged inline — a missing resp.JSON201 nil check, a hardcoded path string that diverges from a Go constant, and a no-op for i := 0; i < 1 loop. All are in test code and none affect correctness of the tests under normal conditions. The overall coverage added is valuable and the structure is sound.
tests/integration/internal/tests/orchestrator/filesystem_pause_resume_integrity_test.go
Outdated
Show resolved
Hide resolved
tests/integration/internal/tests/orchestrator/filesystem_pause_resume_integrity_test.go
Show resolved
Hide resolved
tests/integration/internal/tests/orchestrator/filesystem_pause_resume_integrity_test.go
Show resolved
Hide resolved
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Add unit and integration coverage for zero-copy-fs, covering Cache.ExportToDiff semantics and filesystem integrity across pause/resume for contiguous, scattered, and zeroed/truncate write patterns.
includes an opt-in stress test via env TESTS_FS_INTEGRITY_STRESS=1 for several gigabyte pause/resume validation (not automatically run on ci to avoid taking forever)