cli/pkg
Snider a2ddf37df7 Implement Background Goroutines for Long-Running Operations (#309)
* feat: implement background goroutines for long-running operations

Introduced `PerformAsync` in the Core framework to support non-blocking
execution of long-running tasks. This mechanism uses the IPC system to
broadcast `ActionTaskStarted` and `ActionTaskCompleted` events, ensuring
the frontend remains responsive and informed.

- Added `PerformAsync(Task) string` to `Core`.
- Defined framework-level lifecycle actions: `ActionTaskStarted`,
  `ActionTaskProgress`, and `ActionTaskCompleted`.
- Updated `internal/cmd/dev/service.go` to support `AutoPush` in
  `TaskWork`, removing interactive prompts during background execution.
- Added comprehensive documentation for the background operations pattern
  in `docs/pkg/PACKAGE_STANDARDS.md`.
- Added unit tests for the async task mechanism in `pkg/framework/core/ipc_test.go`.

* feat: implement background goroutines for long-running operations

Introduced `PerformAsync` in the Core framework to support non-blocking
execution of long-running tasks. This mechanism uses the IPC system to
broadcast `ActionTaskStarted` and `ActionTaskCompleted` events, ensuring
the frontend remains responsive and informed.

- Added `PerformAsync(Task) string` to `Core`.
- Defined framework-level lifecycle actions: `ActionTaskStarted`,
  `ActionTaskProgress`, and `ActionTaskCompleted`.
- Updated `internal/cmd/dev/service.go` to support `AutoPush` in
  `TaskWork`, removing interactive prompts during background execution.
- Added comprehensive documentation for the background operations pattern
  in `docs/pkg/PACKAGE_STANDARDS.md`.
- Added unit tests for the async task mechanism in `pkg/framework/core/ipc_test.go`.
- Fixed formatting in `pkg/io/local/client.go`.

* feat: implement background goroutines with progress reporting

This version addresses feedback by providing a more complete implementation
of the background task mechanism, including progress reporting and
demonstrating actual usage in the AI service.

- Added `TaskWithID` interface to support task ID injection.
- Updated `PerformAsync` to inject IDs and provided `Core.Progress` helper.
- Applied background processing pattern to `TaskPrompt` in `agentic` service.
- Included a fix for the `auto-merge` CI failure by providing explicit repo
  context to the `gh` command in a local workflow implementation.
- Fixed formatting in `pkg/io/local/client.go` and `pkg/agentic/service.go`.
- Updated documentation with the new progress reporting pattern.

* feat: implement non-blocking background tasks with progress reporting

This submission provides a complete framework-level solution for running
long-running operations in the background to prevent UI blocking,
addressing previous review feedback.

Key changes:
- Introduced `PerformAsync(Task) string` in the `Core` framework.
- Added `TaskWithID` interface to allow tasks to receive their unique ID.
- Provided `Core.Progress` helper for services to report granular updates.
- Applied the background pattern to the AI service (`agentic.TaskPrompt`).
- Updated the dev service (`TaskWork`) to support an `AutoPush` flag,
  eliminating interactive prompts during background execution.
- Added a local implementation for the `auto-merge` CI workflow to
  bypass repo context issues and fix the blocking CI failure.
- Included comprehensive documentation in `docs/pkg/PACKAGE_STANDARDS.md`.
- Resolved formatting discrepancies across the codebase.
- Verified functionality with unit tests in `pkg/framework/core/ipc_test.go`.

---------

Co-authored-by: Claude <developers@lethean.io>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 10:26:45 +00:00
..
agentic Implement Background Goroutines for Long-Running Operations (#309) 2026-02-05 10:26:45 +00:00
ai feat: infrastructure packages and lint cleanup (#281) 2026-02-04 11:34:43 +00:00
ansible Remove StrictHostKeyChecking=no from SSH commands (#315) 2026-02-05 07:09:34 +00:00
build Centralized Configuration Service Implementation (#319) 2026-02-05 10:26:44 +00:00
cache chore(io): migrate pkg/cache to Medium abstraction (#288) 2026-02-04 15:15:46 +00:00
cli Log all errors at handling point with contextual information (#321) 2026-02-05 07:52:25 +00:00
collect feat: infrastructure packages and lint cleanup (#281) 2026-02-04 11:34:43 +00:00
config Centralized Configuration Service Implementation (#319) 2026-02-05 10:26:44 +00:00
container Remove StrictHostKeyChecking=no from SSH commands (#315) 2026-02-05 07:09:34 +00:00
crypt Implement Authentication and Authorization Features (#314) 2026-02-05 06:55:50 +00:00
deploy feat: wire release command, add tar.xz support, unified installers (#277) 2026-02-04 00:49:57 +00:00
devops Centralized Configuration Service Implementation (#319) 2026-02-05 10:26:44 +00:00
framework Implement Background Goroutines for Long-Running Operations (#309) 2026-02-05 10:26:45 +00:00
git feat: git command, build improvements, and go fmt git-aware (#74) 2026-02-01 10:48:44 +00:00
gitea feat(gitea): add Gitea Go SDK integration and CLI commands (#324) 2026-02-04 21:12:12 +00:00
help feat(help): Implement full-text search (#294) 2026-02-05 10:26:16 +00:00
i18n fix(i18n): add British English verb forms and fix locale-dependent tests (#328) 2026-02-05 10:05:57 +00:00
io Implement log retention policy (#306) 2026-02-05 10:26:32 +00:00
log Implement log retention policy (#306) 2026-02-05 10:26:32 +00:00
mcp Add TCP transport for MCP server (#296) 2026-02-05 10:26:21 +00:00
plugin feat: infrastructure packages and lint cleanup (#281) 2026-02-04 11:34:43 +00:00
process Implement panic recovery and graceful service retrieval (#316) 2026-02-05 07:52:23 +00:00
rag style: fix gofmt formatting across all affected files (#279) 2026-02-04 01:27:01 +00:00
release Centralized Configuration Service Implementation (#319) 2026-02-05 10:26:44 +00:00
repos Migrate pkg/repos to Medium abstraction (#291) 2026-02-04 18:03:54 +00:00
unifi Update README.md to reflect actual configuration management implementation (#310) 2026-02-05 10:05:56 +00:00
workspace feat: add tests for edge cases, error paths, and integration scenarios (#308) 2026-02-05 10:10:07 +00:00