Description
Project template initialization is not idempotent. Running initialization twice causes errors or data corruption. Users cannot safely re-run setup to fix issues or update templates.
Steps to Reproduce
- Run:
devshell init template-name
- Project initialized successfully
- Run:
devshell init template-name again
- Initialization fails with "file already exists" errors
- User cannot re-run to fix issues
Environment Information
- Template system: File-based templates
- Initialization: Copying/creating files
- Idempotency: Not implemented
- Error handling: Fails on existing files
Expected Behavior
- Second run detects existing setup
- Updates/validates without errors
- No data loss
- Clear indication of already-initialized project
Actual Behavior
- Second run fails with file conflict errors
- Cannot safely re-run
- User must manually fix setup
Code Reference
- File:
src/devshell/template.py
- Method:
init_template() - not idempotent
- Missing: Existence checks
- Missing: Update logic
Additional Context
Level 2 reliability issue. Fix requires:
- Adding idempotency to init logic
- Checking for existing files
- Implementing update operations
- Clear feedback to user
Suggested Labels
bug, initialization, idempotency, reliability, template-system
Description
Project template initialization is not idempotent. Running initialization twice causes errors or data corruption. Users cannot safely re-run setup to fix issues or update templates.
Steps to Reproduce
devshell init template-namedevshell init template-nameagainEnvironment Information
Expected Behavior
Actual Behavior
Code Reference
src/devshell/template.pyinit_template()- not idempotentAdditional Context
Level 2 reliability issue. Fix requires:
Suggested Labels
bug,initialization,idempotency,reliability,template-system