CADET-RDM has an awkward recovery path when an output repository remote is intentionally deleted and recreated, for example to purge GitHub-hosted Git LFS objects.
Current behavior:
- The project repository metadata still points to the output remote.
ProjectRepo(...) notices that the local output directory is missing and clones the configured remote.
- If the recreated remote is empty,
OutputRepo(...) then fails with FileNotFoundError because output/.cadet-rdm-data.json is missing.
- The useful initialization code exists internally as
initialize_output_repo(...), but there is no obvious output-only CLI workflow for this case.
Expected workflow:
CADET-RDM should expose a command such as:
cadetrdm output reseed --remote git@github.com:owner/project_output.git
or:
cadetrdm output init --force
The command should:
- read
project_uuid, output_uuid, the output directory name, and configured output remote from the project repository metadata;
- create a fresh local output repository with valid CADET-RDM output metadata;
- add or preserve the configured output remote;
- optionally push only the fresh
main branch;
- avoid restoring old result branches or old LFS objects.
For this recovery case, the existing project_uuid and output_uuid should be preserved, because the output repository is still the same logical RDM output store.
The remote has only been recreated to clear storage.
A new UUID would make sense only for a deliberately new, unrelated output store.
It would also help if CADET-RDM detected this failure mode and printed a targeted message such as:
The output remote exists but is not a CADET-RDM output repository.
Run `cadetrdm output reseed` to initialize a fresh output main branch.
instead of surfacing only the missing .cadet-rdm-data.json exception.
Related documentation gap:
For GitHub-hosted LFS objects, rewriting history does not remove already uploaded LFS objects from storage.
Deleting and recreating the output repository is the documented cleanup path.
CADET-RDM documentation could mention that only a fresh metadata main should be pushed back in that workflow, not git push --all, because pushing all branches may restore the old LFS objects.
CADET-RDM has an awkward recovery path when an output repository remote is intentionally deleted and recreated, for example to purge GitHub-hosted Git LFS objects.
Current behavior:
ProjectRepo(...)notices that the local output directory is missing and clones the configured remote.OutputRepo(...)then fails withFileNotFoundErrorbecauseoutput/.cadet-rdm-data.jsonis missing.initialize_output_repo(...), but there is no obvious output-only CLI workflow for this case.Expected workflow:
CADET-RDM should expose a command such as:
or:
The command should:
project_uuid,output_uuid, the output directory name, and configured output remote from the project repository metadata;mainbranch;For this recovery case, the existing
project_uuidandoutput_uuidshould be preserved, because the output repository is still the same logical RDM output store.The remote has only been recreated to clear storage.
A new UUID would make sense only for a deliberately new, unrelated output store.
It would also help if CADET-RDM detected this failure mode and printed a targeted message such as:
instead of surfacing only the missing
.cadet-rdm-data.jsonexception.Related documentation gap:
For GitHub-hosted LFS objects, rewriting history does not remove already uploaded LFS objects from storage.
Deleting and recreating the output repository is the documented cleanup path.
CADET-RDM documentation could mention that only a fresh metadata
mainshould be pushed back in that workflow, notgit push --all, because pushing all branches may restore the old LFS objects.