Skip to content

docs(notes): ranked ledger of 15 verified data-safety defects in the transfer engines - #65

Closed
vdavid wants to merge 2 commits into
mainfrom
claude/adversarial-data-safety-hunt-upmg8f
Closed

docs(notes): ranked ledger of 15 verified data-safety defects in the transfer engines#65
vdavid wants to merge 2 commits into
mainfrom
claude/adversarial-data-safety-hunt-upmg8f

Conversation

@vdavid

@vdavid vdavid commented Sep 1, 2026

Copy link
Copy Markdown
Owner

What this is

A report, not a fix. docs/notes/adversarial-data-safety-hunt-2026-09-01.md is a ranked triage list of data-safety defects in write_operations/transfer/ (both engines) and the write_operations/ umbrella, from an adversarial hunt: one reading agent per subsystem, instructed to read every non-test file in full and to look for the guard before reporting anything. Every finding was then verified by following the cited file:line paths in the code, so "confirmed" means the mechanism holds at 5fdc323.

Scope, honestly

The plan was 18 subsystems. The run was stopped for budget after four hunters returned (transfer core, the copy and move halves of the cross-volume engine, and the write-ops umbrella). 19 raw findings collapsed to 15 distinct ones; three were reported independently by two hunters. The note lists the 14 subsystems never reached (archive edits, delete/trash/clipboard, cmdr-fs, SMB, SFTP, MTP, operation log, secrets and settings persistence, file viewer, four slices of cmdr-index, git/downloads/listing), in the order a second run should take them.

The seven highs, all silent

# Finding Where
1 Cross-FS move Phase 4 remove_dir_alls the live source tree, destroying anything written into it after the scan move_op/cross_fs.rs delete_sources_after_move
2 Deep merge keys the destination by exact byte name, so a case- or NFC/NFD-differing dest file is replaced under Skip/Stop (land deletes on AlreadyExists) volume/merge.rs + staged_write.rs::land
3 Same-FS merge follows a directory symlink (Path::is_dir) and renames the link target's contents out of a folder the user never selected move_op/mod.rs::merge_move_directory
4 Same-volume rename-merge does the same on a dir-vs-dir hit because the listing reports a dir symlink as is_directory volume/rename_merge.rs
5 Upfront "Overwrite all smaller/older" compares a file against a directory's own inode size/mtime, yields Overwrite, and deletes the whole folder conflict.rs::reduce_conditional_resolution
6 Local copy auto-rollback on a mid-batch error removes destination files that already replaced the user's originals: neither copy is left copy/mod.rs PostLoopIntent::Failed
7 reap_stale_transfer_temps deletes by name and age, so it destroys the .cmdr-tmp-* that is the only copy of new data after a finalize_safe_replace failure volume/cleanup.rs

Plus one high rated plausible (a Skip while staging two same-named sources is never recorded, so Phase 4 deletes an unlanded original), one high with a transient-failure precondition (any get_metadata error on the destination is read as "no conflict"), five mediums, and one low. Each entry carries the mechanism in call order, a user-level trigger, the guard that was ruled out, and a suggested fix.

Review notes

  • The README bullet goes under "Load-bearing as the input to a job that hasn't been done yet".
  • Checks run: docs-reachable, docs-dead-links, docs-link-text, resident-doc-budget, claude-md-details-sibling, oxfmt. All green.
  • The commit carries the harness's Co-Authored-By trailer, which AGENTS.md says not to use; the session-level attribution rule overrode it. Strip it on landing if you prefer.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YGbM7hYU8m9Wc37a4Xv6Yi


Generated by Claude Code

claude and others added 2 commits September 1, 2026 19:29
…transfer engines, from an adversarial hunt

Adds `docs/notes/adversarial-data-safety-hunt-2026-09-01.md`: one reading agent per subsystem hunted for real correctness and data-loss defects in `write_operations/transfer/` (both engines) and the `write_operations/` umbrella, and every finding was then verified against the cited code before landing here. Seven findings are rated high and all seven are silent: the cross-FS move deletes the live source tree rather than the set it staged, the deep merge misses a case-differing destination name and replaces the file under Skip, two merge paths follow a directory symlink and empty its target, "Overwrite all smaller/older" compares a file against a folder's inode and deletes the folder, a failed batch auto-rolls back files that already replaced originals, and the stale-temp reaper deletes the only copy of new data after a finalize failure. Nothing is fixed; each entry carries the mechanism, the trigger, the guard that was ruled out, and a suggested fix.

The run was stopped for budget after four of eighteen planned hunters returned, so the note also names the fourteen subsystems it never reached, in the order a second run should take them, plus method notes on what made verification cheap.

Linked from `docs/notes/README.md` under "input to a job that hasn't been done yet".

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YGbM7hYU8m9Wc37a4Xv6Yi
@vdavid

vdavid commented Sep 4, 2026

Copy link
Copy Markdown
Owner Author

Merged into local main as e8406f4af (rebased, so the hash differs). One change on the way in: the ranked list was a four-column table whose prose column ran to 134 chars and tripped table-hygiene, so it's a numbered list now. Content is unchanged. Closing and deleting the branch.

@vdavid vdavid closed this Sep 4, 2026
@vdavid
vdavid deleted the claude/adversarial-data-safety-hunt-upmg8f branch September 4, 2026 08:52
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.

2 participants