From 1d2a76f5f476d338735f4257f8b0e26238dc3170 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Wed, 15 Jul 2026 01:38:06 +0000 Subject: fix(agent): restore doot-native task support in Agent API, remove stale test Two independent pre-existing failures, both from incomplete refactors: - agent.go's four task write/create switches (complete/uncomplete, update due date, update details, create) never got a "doot" case added when the Todoist integration was removed (945c345) in favor of native tasks -- the test file was updated to use source=doot, but the handlers themselves still only recognized "trello"/"gtasks", so every native-task Agent API call 400'd with "Unknown source". getAtomDetails already had a "doot" case, confirming this was an incomplete migration, not an intentional gap. - TestMealToAtom in atom_test.go tested MealToAtom, a function removed from atom.go months earlier (b2d8fc4) when meals were dropped from the unified Atom/timeline system; the Meal struct itself is still used elsewhere (shopping/meals feature) but no longer produces atoms, and the test was never cleaned up to match. go test ./internal/... ./cmd/... is now fully green with no failures. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01VTUSAEKfsPc6WGDq45yPHD --- internal/models/atom_test.go | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'internal/models/atom_test.go') diff --git a/internal/models/atom_test.go b/internal/models/atom_test.go index 6f86949..bedb09c 100644 --- a/internal/models/atom_test.go +++ b/internal/models/atom_test.go @@ -37,38 +37,6 @@ func TestCardToAtom(t *testing.T) { } } -func TestMealToAtom(t *testing.T) { - date := time.Now() - meal := Meal{ - ID: "meal-789", - RecipeName: "Pasta", - MealType: "dinner", - Date: date, - RecipeURL: "https://plantoeat.com/recipe/789", - } - - atom := MealToAtom(meal) - - if atom.ID != "meal-789" { - t.Errorf("Expected ID 'meal-789', got '%s'", atom.ID) - } - if atom.Title != "Pasta" { - t.Errorf("Expected title 'Pasta', got '%s'", atom.Title) - } - if atom.Description != "dinner" { - t.Errorf("Expected description 'dinner', got '%s'", atom.Description) - } - if atom.Source != SourceMeal { - t.Errorf("Expected source Meal, got '%s'", atom.Source) - } - if atom.Type != TypeMeal { - t.Errorf("Expected type Meal, got '%s'", atom.Type) - } - if atom.Priority != 1 { - t.Errorf("Expected priority 1, got %d", atom.Priority) - } -} - func TestAtom_ComputeUIFields(t *testing.T) { // Test nil due date t.Run("nil due date", func(t *testing.T) { -- cgit v1.2.3