Migrate from Gin to Echo framework and add comprehensive integration tests

Major changes:
- Migrate all handlers from Gin to Echo framework
- Add new apperrors, echohelpers, and validator packages
- Update middleware for Echo compatibility
- Add ArchivedHandler to task categorization chain (archived tasks go to cancelled_tasks column)
- Add 6 new integration tests:
  - RecurringTaskLifecycle: NextDueDate advancement for weekly/monthly tasks
  - MultiUserSharing: Complex sharing with user removal
  - TaskStateTransitions: All state transitions and kanban column changes
  - DateBoundaryEdgeCases: Threshold boundary testing
  - CascadeOperations: Residence deletion cascade effects
  - MultiUserOperations: Shared residence collaboration
- Add single-purpose repository functions for kanban columns (GetOverdueTasks, GetDueSoonTasks, etc.)
- Fix RemoveUser route param mismatch (userId -> user_id)
- Fix determineExpectedColumn helper to correctly prioritize in_progress over overdue

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-12-16 13:52:08 -06:00
parent c51f1ce34a
commit 6dac34e373
98 changed files with 8209 additions and 4425 deletions

View File

@@ -570,8 +570,9 @@ func TestAllThreeLayersMatch(t *testing.T) {
})
}
// TestSameDayOverdueConsistency is a regression test for the DATE vs TIMESTAMP bug.
// It verifies all three layers handle same-day tasks consistently.
// TestSameDayOverdueConsistency is a regression test for day-based overdue logic.
// With day-based comparisons, a task due TODAY (at any time) is NOT overdue during that day.
// It only becomes overdue the NEXT day. This test verifies all three layers agree.
func TestSameDayOverdueConsistency(t *testing.T) {
if testDB == nil {
t.Skip("Database not available")
@@ -606,17 +607,16 @@ func TestSameDayOverdueConsistency(t *testing.T) {
categorizationResult := categorization.CategorizeTask(&loadedTask, 30) == categorization.ColumnOverdue
// If current time is after midnight, all should say overdue
if now.After(todayMidnight) {
if !predicateResult {
t.Error("Predicate says NOT overdue, but time is after midnight")
}
if !scopeResult {
t.Error("Scope says NOT overdue, but time is after midnight")
}
if !categorizationResult {
t.Error("Categorization says NOT overdue, but time is after midnight")
}
// With day-based comparison: task due TODAY is NOT overdue during that day.
// All three layers should say NOT overdue.
if predicateResult {
t.Error("Predicate incorrectly says overdue for same-day task")
}
if scopeResult {
t.Error("Scope incorrectly says overdue for same-day task")
}
if categorizationResult {
t.Error("Categorization incorrectly says overdue for same-day task")
}
// Most importantly: all three must agree