Skip to content

Add ICD tests for the save image and export region path validation - #86

Draft
markccchiang wants to merge 5 commits into
devfrom
mark/save_image_tests
Draft

Add ICD tests for the save image and export region path validation#86
markccchiang wants to merge 5 commits into
devfrom
mark/save_image_tests

Conversation

@markccchiang

@markccchiang markccchiang commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Description

Closes #55. The carta-backend PR #1378 added path validation to Frame::SaveFile and RegionExporter::CanExportToFile, so that a save or an export can not destroy something that is already at the requested path.

This adds two test files, one per message pair, which drive every refusal the backend can produce and assert the whole ack: success, message, and overwrite_confirmation_required.

Known failure: SAVE_IMAGE_OVERWRITE case 2 on macOS

This case currently fails on the macOS runners, and the failure is real — it is a backend defect, not a test problem.

Frame::SaveFile compares the requested output path against the name of the open file, but the open file's name has its symbolic links resolved, and the output path does not. Where /images is a symbolic link, the comparison never matches, the guard is skipped, and the backend overwrites the source image while reporting success = true. The Linux runners are unaffected because apptainer bind mounts /images:/images, giving a real directory.

Checklist

For the pull request:

  • Documentation has been updated (or no documentation changes are needed)

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.

Adding overwrite ICD message into SaveFile request

1 participant