Skip to content

[BUG] Recording transfer must reject unreadable folders and unsafe destination paths #191

Open

Description

@tabedzki

🤖 AI text below 🤖

Reported error
Agent-discovered pre-PR reproductions using synthetic data (no user-pasted error):

Unreadable nested recording folder: run_pending returned 0 errors, status Complete, and a completion manifest omitting that folder.
Existing .transfer-partial hardlink: opening the destination partial with wb truncated the original source data to zero bytes before verification failed.
Destination junction: transfer failed after overwriting an unrelated file outside the approved destination.

Regression test
apps/recording-transfer/tests/test_transfer_integrity.py:

  • test_unreadable_nested_directory_never_publishes_completion
  • test_existing_partial_hardlink_never_truncates_source
  • test_existing_destination_link_rejected_before_outside_write

All three failed against the initial uncommitted implementation before the fixes and pass in PR #190. The app did not exist on master base 372a626, so the failing pre-fix version was not a historical committed release. The test output/review findings were recorded locally first because the environment token rejected issue creation; the user authorized that fallback. This issue backfills that record using the existing Git credential.

Root cause
The old apps/recording-transfer/src/u19_recording_transfer/app.py implementation used Path.rglob in inventory, suppressing scan errors; copy_job opened a predictable .transfer-partial path with wb; and destination-tree link checks ran after writes. The fix propagates scan errors, rejects linked destinations before writes, and exclusively creates unpredictable temporary files for copying and JSON publication.

Linked PR
#190

Pull request coverage

Open

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions