This file provides guidelines for agents working with this codebase.
This is a Rust binary with a CLI interface which runs on DNA sequencer machines, and which is responsible for copying files from sequencing runs. It copies a subset of files from the "source" directory, where files from complete sequencing runs are found, to a "landing zone", a separate directory on the same computer. A separate program then copies from the landing zone onto a remote server.
Subcommands:
sequencer-sync setup:- Validates config file (paths must exist, no duplicates after canonicalization)
- Check all directories have the right permissions
- Check that sequencer can SSH into remote server (can be skipped with
--skip-ssh-check) - Generates a cron file for scheduling
run. User must schedule the cron job to runrunthemselves. Setup should be idempotent. Purpose is to set up new sequencer. Need only be run once every time software is updated, if successful.
sequencer-sync run:- Loads and validates config file
- Loads the transfer log (JSONL) with previous transfers
- Checks for directories in source dir not in transfer log
- Transfers those to landing zone using rsync
- Records transfer in JSONL log (authoritative), then best-effort writes to
the human-readable run log and transfer marker file
Invoked by cron job generated by
setup
- Do not put yourself as git co-author
- Run
cargo clippyafter each round of changes and address lints, then runcargo fmt. - This program runs on a sequencer and in the background so runtime crashes are inconvenient. Make an extra effort to avoid possible but unlikely sources of errors, and lean on the type system to statically avoid bugs.