🤖 claude-finalizer: file_coverage_in_manifest (biotope/metadata.py) compares a FileObject's contentUrl with the file's path relative to the project root. Baker writes contentUrl relative to the directory it scanned, while the FileObjects biotope add appends are project-relative. A file Baker describes is therefore not tracked unless a FileSet also covers it. is_file_tracked, find_owning_manifest, mv and rm all go through this function. Raised in the review of #46 (#46 (comment)).
Repro on main (2227394, 0.9.1), synthetic files:
mkdir -p repro/data/tables && cd repro && git init -q
printf 'id,value\n1,x\n2,y\n' > data/tables/measurements.csv
printf 'free text\n' > data/notes.txt
biotope init . --no-prompt
biotope add data
biotope mv data/tables/measurements.csv data/tables/renamed.csv
The manifest mixes both conventions:
cr:FileObject file_0 tables/measurements.csv (Baker, relative to data/)
cr:FileObject file_b65c1c0d data/notes.txt (biotope, relative to the project)
is_file_tracked(<root>/data/tables/measurements.csv, <root>) is False and is_file_tracked(<root>/data/notes.txt, <root>) is True. biotope mv refuses the described CSV:
❌ File '…/data/tables/measurements.csv' is not tracked. Use 'biotope add' first.
The 0.10 branch (#46, e2b5e82) gives the same result.
Fix. Resolve contentUrl with resolve_content_url(content_url, manifest_dataset_dir, biotope_root), as biotope add does, and compare the resolved paths.
🤖 claude-finalizer:
file_coverage_in_manifest(biotope/metadata.py) compares a FileObject'scontentUrlwith the file's path relative to the project root. Baker writescontentUrlrelative to the directory it scanned, while the FileObjectsbiotope addappends are project-relative. A file Baker describes is therefore not tracked unless a FileSet also covers it.is_file_tracked,find_owning_manifest,mvandrmall go through this function. Raised in the review of #46 (#46 (comment)).Repro on
main(2227394, 0.9.1), synthetic files:The manifest mixes both conventions:
is_file_tracked(<root>/data/tables/measurements.csv, <root>)is False andis_file_tracked(<root>/data/notes.txt, <root>)is True.biotope mvrefuses the described CSV:The 0.10 branch (#46, e2b5e82) gives the same result.
Fix. Resolve
contentUrlwithresolve_content_url(content_url, manifest_dataset_dir, biotope_root), asbiotope adddoes, and compare the resolved paths.