Skip to content

refactor(tasks): extract headless task runner - #596

Merged
ewen-poch merged 4 commits into
mainfrom
refactor/task-automation-module
Aug 1, 2026
Merged

refactor(tasks): extract headless task runner#596
ewen-poch merged 4 commits into
mainfrom
refactor/task-automation-module

Conversation

@ewen-poch

Copy link
Copy Markdown
Member

Problem

Task automation orchestration lived in the public Web transport adapter. That coupled HTTP compatibility, ACP/session lifecycle, artifacts, previews, and runtime-event handling in one module, making ownership unclear and the adapter difficult to change safely.

Proposed change

Extract a headless TaskRunner that owns task run and artifact orchestration behind narrow project, session, agent, artifact, preview, and event ports. Keep task-api.ts as a compatibility adapter for the existing public HTTP surface.

flowchart LR
  HTTP["HTTP routes"] --> Adapter["Task HTTP compatibility adapter"]
  Adapter --> Runner["TaskRunner"]
  Events["F3 runtime events"] --> Runner
  Runner --> Ports["Narrow capability ports"]
  Ports --> Facade["Temporary IPC / WebRPC facade"]
  Runner --> PublicEvents["Existing public task-event projection"]
Loading

The temporary facade remains an explicit A6/T2 removal target; the new task module does not depend on IPC registries, routers, channel names, or generic invoke contracts.

Scope and compatibility

  • Preserve existing routes, request/response bodies, status codes, task events, CLI behavior, SDK behavior, and persisted schemas.
  • Preserve controller-scoped lifecycle and the current SDK/CLI wait timeout; do not add a task-internal timeout.
  • Preserve Electron/Web/CLI IPC compatibility and the existing Specialist, Permission, and Compute capability asymmetry.
  • Keep Issue [Feature]: Provider-neutral multi-agent research orchestration #458 forward-compatible without adding orchestration state or public APIs.
  • No data-model, data-relation, or user-interaction changes.

Acceptance and verification

  • TaskRunner and adapter tests: 20 passed.
  • SDK/CLI compatibility tests: 16 passed.
  • HTTP compatibility tests: 15 passed.
  • F3/controller lifecycle tests: 12 passed.
  • Architecture search: no IPC router/registry imports, channel strings, or generic invoke dependencies in the task module.
  • npm run typecheck: passed.
  • npm run lint: 0 errors; 23 pre-existing warnings.
  • npm test: 642 files passed, 15 skipped; 9,456 tests passed, 184 skipped.

Review

Independent Standards and Spec reviews found no remaining actionable issues after adding adapter-mapping certification and the explicit A6/T2 removal note. CI and platform E2E remain the final merge gate. Merge by squash after all required checks pass.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codex Review

Verdict: mergeable

No actionable findings.

Summary: Static inspection found no concrete merge-blocking defects in the requested changes.

@github-actions github-actions Bot added the ready-to-merge All completed AI reviewers found this pull request mergeable. label Aug 1, 2026
@ewen-poch
ewen-poch merged commit ec40c24 into main Aug 1, 2026
25 checks passed
@ewen-poch
ewen-poch deleted the refactor/task-automation-module branch August 1, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge All completed AI reviewers found this pull request mergeable.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant