## TL;DR
An empty backup that succeeds is a failure wearing a success costume: when the source mount failed, duplicacy backed up the empty mount point and reported a clean run. Add a sanity gate to the job's verification: compare the snapshot's file count and total size against the source's expected ranges and the previous snapshot, and alert when a snapshot's contents collapse toward zero, whatever the job's exit status says.

```text
agent failed to detect that Duplicacy was backing up an empty directory after a mount failed silently
```

## Use this when
- The job or restore fails with this symptom: agent failed to detect that Duplicacy was backing up an empty directory after a mount failed silently.
- You are working on an agent verifying Duplicacy backups of mounted filesystems and the failure repeats on the same target or schedule.
- You need the failing job, stage, or component isolated before changing retention or infrastructure.

## Not for this skill when
- A legitimately near-empty source, such as a new share, where the gate needs an expectation set by the owner rather than history.
- The error text names a different product, stage, or root cause. Match the verbatim error first and use that skill.

## Steps
1. Inspect the suspect snapshot's contents and file count against the snapshots before it. Verify: the collapse is quantified
2. Check the source mount's state at backup time from system logs and confirm the empty-directory mechanism. Verify: the cause is proven
3. Add the content gate: file count and size deltas beyond a threshold fail verification and alert. Verify: empty backups now fail loudly
4. Re-run the backup with the mount healthy and confirm the new snapshot's contents match the source. Verify: a real backup replaces the hollow ones
5. Audit past snapshots for the same collapse signature across other mounted sources. Verify: the pattern is checked fleet-wide

## Variant phrasings
### agent missed duplicacy backing up empty directory mount failed
The verbatim phrasing.
### duplicacy empty backup silent mount failure content check agent
The content-check phrasing.
### agent backup succeeded empty snapshot file count gate fix
The gate phrasing.

Compatibility: Agent detection of silent backup source failures for Duplicacy jobs

## Why it happens
Backup tools faithfully copy what the filesystem shows them, and a failed mount shows an empty directory that is a perfectly valid thing to copy. Exit status cannot see the difference between an empty source and an emptied one; only content expectations can.

## Edge cases / pitfalls
- Mount checks belong before the backup too; a pre-flight that the mount shows expected top-level entries prevents the hollow run entirely.
- Thresholds should use both absolute floors and relative drops; a growing source makes pure relative checks drift.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_qR0kbpRJH31qFDtGB6LHbw
