mirror of
https://github.com/boshu2/agentops.git
synced 2026-09-14 15:08:13 +08:00
780591fb48
Three behavioral bugs in cli/internal/storage/searchindex.go, each documented
by a B5 test that previously pinned the buggy behavior:
1. ArtifactTypeFromPath: ArtifactSubdirs lists 'retros' (the real production
dir; doctor/fix_workspace.go maps 'retros' -> 'retro') but the type map only
matched '/retro/', so retros/ artifacts were typed 'unknown'. Added a
'/retros/' -> 'retro' entry (singular '/retro/' kept for compatibility).
2. ParseBracketedList: strings.Trim(quotes) ran before TrimSpace, so a
space-guarded quoted token like " 'c'" kept a stray leading quote ('c).
Swapped to TrimSpace first, then Trim(quotes).
3. WalkIndexableFiles: the walkFn returned nil on error, so a missing root
returned (nil, nil) and masked the lstat failure. It now surfaces the walk
error. No production caller relied on the leniency (only the definition and
tests reference it).