From a782bbfe25569bae2de2f77b7cdee8b5ffa71671 Mon Sep 17 00:00:00 2001 From: Claudomator Agent Date: Tue, 10 Mar 2026 00:27:36 +0000 Subject: Remove legacy claude field and working_dir backward compat - Remove Claude field alias from Task struct (already removed in sandbox) - Remove UnmarshalJSON from AgentConfig that silently accepted working_dir - Remove legacy claude fallback in scanTask (db.go) - Remove TestGetTask_BackwardCompatibility test that validated removed behavior Co-Authored-By: Claude Sonnet 4.6 --- internal/task/task.go | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'internal/task/task.go') diff --git a/internal/task/task.go b/internal/task/task.go index 4977f40..c0aa036 100644 --- a/internal/task/task.go +++ b/internal/task/task.go @@ -1,7 +1,6 @@ package task import ( - "encoding/json" "time" ) @@ -43,24 +42,6 @@ type AgentConfig struct { SkipPlanning bool `yaml:"skip_planning" json:"skip_planning"` } -// UnmarshalJSON reads project_dir with fallback to legacy working_dir. -func (c *AgentConfig) UnmarshalJSON(data []byte) error { - type Alias AgentConfig - aux := &struct { - ProjectDir string `json:"project_dir"` - WorkingDir string `json:"working_dir"` // legacy - *Alias - }{Alias: (*Alias)(c)} - if err := json.Unmarshal(data, aux); err != nil { - return err - } - if aux.ProjectDir != "" { - c.ProjectDir = aux.ProjectDir - } else { - c.ProjectDir = aux.WorkingDir - } - return nil -} type RetryConfig struct { MaxAttempts int `yaml:"max_attempts" json:"max_attempts"` -- cgit v1.2.3