autoNAS / AGENTS.md
1 contributor
48 lines | 1.717kb
# Agent Notes

## Media importer lineage

AutoNAS derives its unattended camera import behavior from:

```text
/Users/bogdan/Documents/Workspaces/Bogdan/Media Importer/media-importer.sh
```

Before changing `scripts/autonas-media-importer.sh`, read the upstream note:

```text
/Users/bogdan/Documents/Workspaces/Bogdan/Media Importer/AGENTS.md
```

The Raspberry Pi importer/wrapper direction from the old Media Importer repo is a dead end and must not be used as a reference design unless that direction is explicitly reopened.

## Unattended safety rules

AutoNAS runs from udev/systemd and is therefore unattended by default. Changes must preserve the upstream data-loss protections:

- no overwrite of existing destination files;
- destination conflicts resolved before copy/move;
- planned destination paths reserved during one run;
- move mode implemented as copy, verify, then delete source;
- source deletion only after destination verification succeeds;
- destination temp files cleaned on copy/verify failures;
- `VERIFY_MODE=size` default with `strict` available;
- GoPro timestamp changes require regression testing against real MP4/THM/LRV cases.

If any of these protections are missing, do not recommend AutoNAS unattended import.

## Required validation

For importer changes, compare behavior with upstream `media-importer.sh` and, when possible, run upstream tests:

```bash
cd "/Users/bogdan/Documents/Workspaces/Bogdan/Media Importer"
./test_runner.sh timestamp-collision
./test_runner.sh verify-mode
./test_runner.sh dest-in-source
./test_runner.sh gopro-sidecar-sync
./test_runner.sh gopro-no-sidecar-reimport
```

If these cannot be run, mark the AutoNAS importer as partially validated only.