Add Ava integration: trigger pipeline from task creation, report completion.
This is the key integration that closes the loop: Ava files a ticket → pipeline runs → Ava reports back.
Implement:
1. In Ava's work_on_task tool (or a new tool), instead of spawning pi-code.sh directly, optionally delegate to the dev-review-release pipeline by setting the task to Open with the right parent/namespace so the pipeline picks it up.
2. Add a mechanism for Ava to monitor pipeline progress on a task. Options:
a. Poll task status + comments periodically.
b. Add a webhook/callback mechanism where the pipeline notifies Ava on state transitions.
c. Simplest: Ava polls task show <id> --json and checks for Done status.
3. When Ava sees a task reach Done, compose a summary from task comments and report to the user via Telegram.
4. When a task gets stuck (blocked/max-retries), Ava reports that too.
This task may need to be broken into sub-tasks depending on complexity. Start with the simplest version: Ava creates a task with correct metadata, the existing pipeline picks it up, and Ava polls for completion.
Files: Omni/Ava.hs (work_on_task or new tool), Omni/Ide/dev-review-release.sh
REVIEW (patchset 1): Rejecting - module will not compile due to 5 critical errors:
1. Task.updateTaskNamespace (line 150) does not exist in Omni.Task.Core. Use Task.editTask with a lambda to modify the namespace field instead: editTask tid (\t -> t { taskNamespace = Just ns })
2. Task.updateTaskPriority (line 160) does not exist in Omni.Task.Core. Same fix: use Task.editTask with a lambda to modify taskPriority.
3. Task.Blocked (lines 236, 246) is not a constructor of Status. The Status type is: Draft | Open | InProgress | Review | Approved | Done | NeedsHelp. Remove Blocked references or use an existing status.
4. Task.commentTimestamp (line 268) does not exist. The Comment record field is commentCreatedAt, not commentTimestamp.
5. .!= operator (line 51) is not imported. Either add it to the explicit import list: import Data.Aeson ((.:), (.:?), (.=), (.!=)) or qualify it as Aeson..!=
Additionally (non-blocking):
Fixed critical compilation errors from reviewer feedback (patchset 1):
1. Removed Task.updateTaskNamespace and Task.updateTaskPriority - these functions don't exist. Replaced with Task.editTask using lambda to modify record fields. 2. Removed all references to Task.Blocked status - this is not a valid Status constructor. Only checking for NeedsHelp now. 3. Fixed Task.commentTimestamp -> Task.commentCreatedAt throughout. 4. Fixed .!= import - qualified as Aeson..!= to avoid import errors. 5. Removed unused imports: Data.Aeson.KeyMap and 'process' dependency. 6. Fixed applicative syntax: </ -> <$> for consistency.
The module now:
Commit: 11d35ecf Ready for re-review.
Line 26 imports Data.Aeson ((.:), (.:?), (.=)) but line 49 uses Aeson..!= True which requires the (.!=) operator. This will fail to compile.
Fix: Change the import to:
import Data.Aeson ((.!=), (.:), (.:?), (.=))
1. P4 not settable: Priority type includes P4 but the tool schema and parser only handle P0-P3. Consider adding P4 for completeness.
2. Commit message too verbose: The commit message is a multi-page essay. Keep it to a brief summary + Task-Id trailer.
<|> for Maybe namespace merge is correct (available via Alpha/Protolude)Correction to my previous review: The Aeson..!= usage on line 49 is actually valid. The explicit import on line 26 only controls unqualified names; the qualified import on line 27 (import qualified Data.Aeson as Aeson) imports everything under the Aeson namespace. So Aeson..!= correctly resolves to Data.Aeson.(.!=). This is NOT a build-breaking issue.
Remaining concerns are minor: 1. P4 not settable via tool (P0-P3 only, but Priority type has P4) 2. Commit message excessively verbose (should be brief summary + trailer)
Neither is blocking. Proceeding to approve.
Integrated commit 57a353e5bf01c3a028611e9ed189eafb9090822e into live branch.
Build verification skipped (build tools unavailable in integration environment). Code was approved by reviewer in patchset 2 with confirmation that Aeson..!= qualified import is valid and module follows existing patterns from Omni/Ava/Tools/Tasks.hs.
Post-run verification found integrator had cherry-picked to fallback branch t587r5-live instead of base live (see t-591). To keep repo state consistent with Done status, commit 57a353e5 was manually cherry-picked onto live as c0b9284c.
Implemented pipeline delegation tools in Omni/Ava/Tools/PipelineDelegate.hs
Created two new tools: 1. delegate_to_pipeline - Prepares tasks for the dev-review-release pipeline 2. monitor_pipeline_task - Polls task status and detects completion/stuck state
Integration is passive: Ava sets task metadata (namespace, status=Open) and the existing pipeline loop picks it up automatically via 'task ready --json'.
Commit: fa042f2f Status: Ready for review
Note: Tool registration in Ava's main bot (processEngagedMessage) deferred to follow-up task since current Ava uses run_bash + task CLI for task management.