feat: implement animal lifecycle events (Step 6.3)
Add 5 animal lifecycle event handlers with TDD: - HatchRecorded: Creates hatchling animals at brood/event location - AnimalOutcome: Records death/harvest/sold with yields, status updates - AnimalPromoted: Sets identified flag, nickname, optionally updates sex/repro_status - AnimalMerged: Merges animal records, creates aliases, removes merged from live roster - AnimalStatusCorrected: Admin-only status correction with required reason All events include: - Projection handlers in animal_registry.py and intervals.py - Event-animal linking in event_animals.py - Service methods with validation in animal.py - 51 unit tests covering event creation, projections, and validation - E2E test #7 (harvest with yields) per spec §21.7 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
14
PLAN.md
14
PLAN.md
@@ -235,13 +235,13 @@ Check off items as completed. Each phase builds on the previous.
|
||||
- [x] **Commit checkpoint** (282d3d0)
|
||||
|
||||
### Step 6.3: Animal Lifecycle Events
|
||||
- [ ] Implement HatchRecorded (creates hatchlings)
|
||||
- [ ] Implement AnimalOutcome (death/harvest/sold with yields)
|
||||
- [ ] Implement AnimalPromoted (identified=true, nickname)
|
||||
- [ ] Implement AnimalMerged (status=merged_into, aliases)
|
||||
- [ ] Implement AnimalStatusCorrected (admin-only with reason)
|
||||
- [ ] Write tests for each event type
|
||||
- [ ] Write test: E2E test #7 (harvest with yields)
|
||||
- [x] Implement HatchRecorded (creates hatchlings)
|
||||
- [x] Implement AnimalOutcome (death/harvest/sold with yields)
|
||||
- [x] Implement AnimalPromoted (identified=true, nickname)
|
||||
- [x] Implement AnimalMerged (status=merged_into, aliases)
|
||||
- [x] Implement AnimalStatusCorrected (admin-only with reason)
|
||||
- [x] Write tests for each event type
|
||||
- [x] Write test: E2E test #7 (harvest with yields)
|
||||
- [ ] **Commit checkpoint**
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user