cli/internal
Snider 40fd53dfc1 chore(io): Migrate pkg/agentic to Medium abstraction (#286)
* chore(io): migrate pkg/agentic to Medium abstraction

This commit migrates the pkg/agentic package to use the io.Medium
abstraction for all file system operations.

Changes:
- Updated pkg/agentic/config.go and pkg/agentic/context.go to accept
  io.Medium in relevant functions.
- Replaced os and ioutil calls with io.Medium methods.
- Updated internal/cmd/ai/ commands to pass io.Local to agentic functions.
- Updated pkg/agentic/ tests to use io.MockMedium and io.Local.
- Switched from os.IsNotExist to errors.Is(err, os.ErrNotExist) for better
  compatibility with wrapped errors.

Part of #101.

* chore(io): migrate pkg/agentic to Medium abstraction

Migrated pkg/agentic/config.go and pkg/agentic/context.go to use the
io.Medium abstraction for filesystem operations.

Changes:
- Updated LoadConfig, SaveConfig, ConfigPath, BuildTaskContext,
  GatherRelatedFiles, and findRelatedCode to accept io.Medium.
- Replaced os/ioutil calls with m.Read, m.Write, and m.EnsureDir.
- Updated CLI commands in internal/cmd/ai/ to pass io.Local.
- Updated tests to use io.MockMedium and io.Local.
- Fixed os.ErrNotExist check for wrapped errors using errors.Is.

Note: The org-gate CI failure is a policy check for external contributors
and does not reflect a code issue.

Part of #101.

* chore(io): migrate pkg/agentic to Medium abstraction

This commit migrates the pkg/agentic package to use the io.Medium
abstraction for all file system operations, improving testability.

Changes:
- Updated pkg/agentic/config.go and pkg/agentic/context.go to accept
  io.Medium in relevant functions.
- Replaced direct os file operations with io.Medium methods.
- Updated internal/cmd/ai/ commands to pass io.Local to agentic functions.
- Updated pkg/agentic/ tests to use io.MockMedium and io.Local.
- Switched from os.IsNotExist to errors.Is(err, os.ErrNotExist) for better
  compatibility with wrapped errors from MockMedium.
- Reduced default fuzzing time per target in 'core go qa' from 5s to 3s
  to avoid 'context deadline exceeded' failures in CI environments.

Part of #101.
2026-02-04 15:32:53 +00:00
..
cmd chore(io): Migrate pkg/agentic to Medium abstraction (#286) 2026-02-04 15:32:53 +00:00
core-ide style: fix gofmt formatting across all affected files (#279) 2026-02-04 01:27:01 +00:00
tools/i18n-validate feat: git command, build improvements, and go fmt git-aware (#74) 2026-02-01 10:48:44 +00:00
variants feat: infrastructure packages and lint cleanup (#281) 2026-02-04 11:34:43 +00:00