Repository navigation
refactor(tasks): add executor facade - #57474
Conversation
Greptile SummaryThis PR introduces a thin
Confidence Score: 5/5Safe to merge — pure additive refactor with no behavioral changes, correct type delegation, and adequate test coverage for the migrated surface. All three changed files are straightforward and correct. The facade introduces no new logic: every wrapper is a transparent one-liner over an existing, tested registry function. The one migrated consumer (acp-spawn-parent-stream.ts) makes an equivalent call through the new seam. No P0 or P1 findings; remaining observations are P2 scope notes already acknowledged by the PR description. No files require special attention.
|
| Filename | Overview |
|---|---|
| src/tasks/task-executor.ts | New facade module that re-exports thin wrappers around existing task-registry lifecycle helpers, correctly delegates all operations and preserves all parameter types. |
| src/tasks/task-executor.test.ts | New focused tests covering the queued→running→succeeded and running→progress→failed→delivery-status paths through the executor seam. |
| src/agents/acp-spawn-parent-stream.ts | Migrated three recordTaskProgressByRunId call sites from the registry directly to the equivalent executor facade function recordTaskRunProgressByRunId; import updated accordingly. |
Reviews (1): Last reviewed commit: "Merge branch 'main' into pr1/task-execut..." | Re-trigger Greptile
Summary
src/tasks/task-executor.tsfacade over the existing task lifecycle helpers, switched ACP parent-stream progress reporting to use it, and added focused executor tests.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause / Regression History (if applicable)
git blame, prior PR, issue, or refactor if known): N/ARegression Test Plan (if applicable)
src/tasks/task-executor.test.tssrc/tasks/task-registry.test.tsstill covers the downstream task behavior.User-visible / Behavior Changes
None.
Diagram (if applicable)
Security Impact (required)
Yes, explain risk + mitigation:Repro + Verification
Environment
Steps
Expected
Actual
Evidence
Human Verification (required)
pnpm test -- src/tasks/task-executor.test.ts src/tasks/task-registry.test.tspnpm buildcodex review --base origin/maincould not complete locally because the tool hit the known local127.0.0.1transport failureReview Conversations
Compatibility / Migration
Risks and Mitigations
AI-assisted: yes. Fully tested on the touched surface.