Fix P0 bug: JSONL lookup now returns LAST match (bd-58c0)
Addresses code review feedback: ✅ P0 (Must Fix): - Fix JSONL lookup to return LAST match, not FIRST (resurrection.go:160-162) - Changed from early return to scan all matches and keep last - Respects JSONL append-only semantics ✅ P1 (Should Fix): - Add test for multiple JSONL versions - TestTryResurrectParent_MultipleVersionsInJSONL verifies correct behavior - Document error message change in CHANGELOG.md - Old: "parent issue X does not exist" - New: "parent issue X does not exist and could not be resurrected from JSONL history" - Marked as breaking change for script parsers ✅ P2/P3 (Nice to Have): - Add documentation to AGENTS.md explaining auto-resurrection behavior - Document best-effort dependency resurrection ⏸️ Deferred (P1 - Optimize batch resurrection): - Caching optimization deferred (no batch use cases currently) All tests pass: - Unit tests: internal/storage/sqlite/ - Integration test: TestImportWithDeletedParent
This commit is contained in:
18
CHANGELOG.md
18
CHANGELOG.md
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
- **Parent Resurrection** (bd-58c0): Automatic resurrection of deleted parent issues from JSONL history
|
||||
- Prevents import failures when parent issues have been deleted
|
||||
- Creates tombstone placeholders for missing hierarchical parents
|
||||
- Best-effort dependency resurrection from JSONL
|
||||
|
||||
### Changed
|
||||
|
||||
- **Error Messages**: Improved error messages for missing parent issues
|
||||
- Old: `"parent issue X does not exist"`
|
||||
- New: `"parent issue X does not exist and could not be resurrected from JSONL history"`
|
||||
- **Breaking**: Scripts parsing exact error messages may need updates
|
||||
|
||||
### Fixed
|
||||
|
||||
- **JSONL Resurrection Logic**: Fixed to use LAST occurrence instead of FIRST (append-only semantics)
|
||||
|
||||
## [0.21.7] - 2025-11-04
|
||||
|
||||
### Fixed
|
||||
|
||||
Reference in New Issue
Block a user