Add bulk data generation controls for folder count, files per folder, file size range, and bulk dataset size limits. Also update the cdssync docs to describe the new options and how update mode applies to generated bulk files.
3.2 KiB
3.2 KiB
AI Agent Instructions for cdssync
These instructions apply anywhere under /home/aw/code/cds/cdssync.
Migration Test Dataset Workflow
For migration test datasets in this workspace, follow this process by default:
- Generate the dataset locally from this workspace.
- Preserve the local generated dataset as the canonical original copy.
- Copy the dataset to the test machine using metadata-preserving tooling.
- Verify the copied dataset on the test machine before using it for migration testing.
Generation Rules
- Use
/home/aw/code/cds/cdssync/generate_migration_test_dataset.shto create the dataset unless the user explicitly asks for a different method. - Prefer
/home/aw/code/cds/cdssync/migration-test-datasetas the local canonical dataset location unless the user specifies another target. - The generator script accepts an optional
UPDATE_INTERVAL_SECONDSargument:- omit it to create the dataset once and exit
- use
0for continuous random content updates - use any integer greater than
0to rewrite mutable files everyNseconds
- The generator script also accepts
--update-only:- use it to update an existing dataset in place without recreating files, links, or directories
- combine it with
UPDATE_INTERVAL_SECONDSto keep mutating an existing dataset on a fixed interval
- The generator script can also create additional bulk test data under
bulk/:--folder-count Ncontrols how many bulk folders are created--files-per-folder Ncontrols how many bulk files are created in each folder--min-file-size-mib Nand--max-file-size-mib Ncontrol the random size range for bulk files--max-dataset-size-mib Ncaps the total size of generated bulk files only- once bulk files exist, update mode rewrites them too as part of the mutable-content set
- If ACL/xattr coverage matters, ensure the generation host has:
aclinstalled forsetfaclandgetfaclattrinstalled forsetfattrandgetfattr
Copy Rules
- Use
rsync -aHAXby default when copying the dataset to another machine. - Preserve permissions, timestamps, symlinks, hard links, ACLs, and xattrs.
- Do not use GUI copy/paste or non-preserving copy methods for this dataset unless the user explicitly asks for that.
Verification Rules
After copying to a test machine, verify at least:
- file and directory structure
- permissions
- symlinks
- hard links
- timestamps
- ACLs
- xattrs
Preferred verification commands include:
find DEST_DIR | sortstat DEST_DIR/regular/script_3mb_700.shstat DEST_DIR/readonly-dir/locked_text_1mb_444.txtreadlink DEST_DIR/links/symlink_to_text_1mb_644.txtstat DEST_DIR/regular/random_3mb_644.bin DEST_DIR/links/hardlink_to_random_3mb_644.bingetfacl -p DEST_DIR/metadata/acl_text_1mb_644.txtgetfattr -d DEST_DIR/metadata/xattr_text_1mb_644.txt
Destination Host Requirements
- If the destination host lacks
aclorattr, ACL/xattr verification will be incomplete. - If the destination filesystem does not support ACLs or xattrs, those attributes may not survive transfer even when the copy method is correct.
- The generator now logs and continues when ACL/xattr assignment is unsupported on the target filesystem instead of exiting.