Skip to content

fix: honor selected orchestrated implementer - #502

Merged
pedronauck merged 3 commits into
compozy:mainfrom
richardfogaca:fix/499-orchestrated-implementer
Aug 31, 2026
Merged

pedronauck merged 3 commits into
compozy:mainfrom
richardfogaca:fix/499-orchestrated-implementer

Conversation

@richardfogaca

@richardfogaca richardfogaca commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

What & why

Fixes #499.

implement-tasks now carries its typed implementer Agent input through the orchestrated path instead of replacing it with code_implementer:

implementer input
  -> orchestrated Goal objective
  -> cy-orchestrate-tasks
  -> compozy spawn --agent "$IMPLEMENTER"
  -> spawned session agent_name verification
  • Keeps code_implementer as the input default, so omitted input behavior is unchanged.
  • Uses the exact selected Agent for every orchestrated worker, preserving its identity, Agent-local skills, permissions, provider defaults, and category runtime overrides.
  • Fails closed on a mismatched recovered session instead of adopting it or silently falling back.
  • Keeps settlement tied to completed task frontmatter and zero live conductor-created workers.
  • Updates the bundled Loop copies, orchestrator instructions, conductor skill, official Compozy skill, docs, QA scenario, and web mock together.

An AI coding agent co-authored this fix. Richard Fogaça verified the final diff and exact-head validation before publication. Independent review of 5f30bafd5c243740a5b44e402d6299bd8722a1b8 found no blocking issues.

How you verified it

  • make gate passed for the final tree, with current exact-tree evidence for Go lint, race-enabled Go tests across the affected packages, and web lint/typecheck/tests.
  • Embedded contract tests verify that implementer remains an Agent-typed input, defaults to code_implementer, and renders either the default or a non-default selected Agent into the orchestrated objective without a hardcoded spawn override.
  • The daemon E2E harness selects custom_implementer and verifies all three workers report that exact agent_name, receive the Agent-local CUSTOM_IMPLEMENTER_SENTINEL_V1, retain backend/frontend/default runtime selections, finish with the Loop settled, and leave no worker in starting, active, or stopping.
  • The conductor contract requires explicit worker stop after success, prompt failure, corrective repair, or blocked completion; a failed stop remains blocked.
  • Provider-backed isolated QA was blocked because no authorized provider credentials were available. It was not run and is not claimed as passed.

Impact

  • Loop behavior: orchestrated mode now honors the same selected implementer as per-task mode; the omitted-input default remains code_implementer.
  • Runtime/API/config: no production Go runtime, HTTP/UDS API, CLI verb, or config.toml key changed. The behavior change is contained in bundled Loop/Agent/skill contracts plus aligned docs and fixtures.
  • Web: no user-facing web behavior changed; the Loop mock now reflects the selected implementer.
  • Extensibility: the bundled spec-cycle extension and official Compozy skill document the selected-Agent propagation and cleanup contract. Hooks, registries, native tool IDs, and workspace data isolation are unchanged.
  • Risk and rollback: the main risk is an orchestration prompt-contract regression. Contract and daemon E2E coverage pin the selected identity, sentinel, runtime propagation, settlement, and cleanup behavior. Reverting these two commits restores the prior contract.

  • make gate passes locally; this PR is delivered only after its required CI checks are green
  • New or changed behavior is covered by tests, or I explained above why not
  • If an agent wrote or co-wrote this, I named it above and verified the result myself

Summary by CodeRabbit

  • New Features
    • Orchestrated implementation workflows now support selecting a custom implementer agent.
    • Runtime prompts dynamically display the selected implementer and its configured inputs.
    • Custom agents can provide specialized skills during implementation.
  • Bug Fixes
    • Removed hard-coded implementer selection from orchestration and delegation prompts.
    • Improved workflow validation to ensure workers use the selected implementer and shut down cleanly.

Copilot AI lite review requested due to automatic review settings August 28, 2026 14:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

@richardfogaca is attempting to deploy a commit to the Compozy Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1fc41624-b2f9-4a66-8a1a-1961b651974a

📥 Commits

Reviewing files that changed from the base of the PR and between 459100d and 5f30baf.

⛔ Files ignored due to path filters (9)
  • .compozy/loops/implement-tasks/loop.yaml is excluded by !**/*.yaml, !.compozy/**
  • docs/qa/charters/CH-implement-tasks-orchestrated-mode.md is excluded by !**/*.md
  • docs/qa/scenarios/LP-implement-tasks-orchestrated-mode.md is excluded by !**/*.md
  • extensions/spec-cycle/agents/orchestrator/AGENT.md is excluded by !**/*.md
  • extensions/spec-cycle/loops/implement-tasks/loop.yaml is excluded by !**/*.yaml
  • extensions/spec-cycle/skills/cy-orchestrate-tasks/SKILL.md is excluded by !**/*.md
  • internal/testutil/acpmock/testdata/implement_tasks_fixture.json is excluded by !**/*.json
  • packages/site/content/docs/examples/implement-tasks-loop.mdx is excluded by !**/*.mdx
  • skills/compozy/references/loops.md is excluded by !**/*.md
📒 Files selected for processing (3)
  • extensions/spec-cycle/embed_test.go
  • internal/daemon/daemon_implement_tasks_e2e_integration_test.go
  • web/src/systems/loops/mocks/fixture-implement-tasks.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


Important

Approval pending

CodeRabbit has no unresolved comments, but it skipped the latest review.

Use the checkbox below to review the latest commit. CodeRabbit will approve the changes if it finds no blocking issues.

  • 🔍 Trigger review

Walkthrough

The change updates the implement-tasks fixture to use the configured implementer input. Embedded and E2E tests now cover default and custom Agents, runtime propagation, local skills, prompt content, worker identity, and worker termination states.

Changes

Dynamic implementer selection

Layer / File(s) Summary
Configurable implementer contract and prompts
web/src/systems/loops/mocks/fixture-implement-tasks.ts, extensions/spec-cycle/embed_test.go
The orchestrated objective uses the loop’s implementer input. Tests cover the code_implementer default, custom Agent and runtime rendering, dynamic delegation, and rejection of static code_implementer instructions.
Custom Agent E2E validation
internal/daemon/daemon_implement_tasks_e2e_integration_test.go
The E2E harness seeds custom_implementer, renders the selected Agent, and verifies conductor prompts, worker identity, runtime values, local skill prompts, and stopped worker states.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 5f30b

The PR updates orchestrated implementer selection while preserving the default behavior and adds contract and end-to-end coverage; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: pedronauck

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Linked Issues check ❓ Inconclusive The reviewable tests and web fixture cover dynamic implementer selection, default behavior, runtime rendering, Agent-local skills, and worker cleanup. However, the production loop, orchestrator Agent,… Review the excluded production files, especially extensions/spec-cycle/loops/implement-tasks/loop.yaml, extensions/spec-cycle/agents/orchestrator/AGENT.md, extensions/spec-cycle/skills/cy-orchestrate-tasks/SKILL.md, and .compozy/loops/imple…
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: honoring the selected implementer in orchestrated execution.
Out of Scope Changes check ✅ Passed The reviewed changes support the linked issue. They update implementer propagation, add contract and E2E coverage, validate runtime and skill behavior, and improve worker cleanup assertions. No unrela…
Full details: Linked Issues check

Explanation

The reviewable tests and web fixture cover dynamic implementer selection, default behavior, runtime rendering, Agent-local skills, and worker cleanup. However, the production loop, orchestrator Agent, and orchestration skill files that implement the linked issue requirements were excluded by path filters, so full compliance cannot be verified.

Resolution

Review the excluded production files, especially extensions/spec-cycle/loops/implement-tasks/loop.yaml, extensions/spec-cycle/agents/orchestrator/AGENT.md, extensions/spec-cycle/skills/cy-orchestrate-tasks/SKILL.md, and .compozy/loops/implement-tasks/loop.yaml. These files were excluded by the !/*.yaml and !/*.md rules. Confirm that the selected Agent propagates through orchestrated mode, unavailable explicit Agents fail closed, runtime inheritance is preserved, and settlement waits for task proof and worker cleanup.

Full details: Out of Scope Changes check

Explanation

The reviewed changes support the linked issue. They update implementer propagation, add contract and E2E coverage, validate runtime and skill behavior, and improve worker cleanup assertions. No unrelated changes are evident.

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Greptile Summary

The PR propagates the selected implementer Agent through orchestrated task delivery while retaining code_implementer as the default.

  • Updates bundled Loop objectives, orchestration instructions, skills, documentation, and the web fixture to use the selected Agent.
  • Adds contract and daemon integration coverage for Agent identity, Agent-local skills, runtime selection, settlement, and worker cleanup.
  • Records the unavailable provider-backed walk as a permitted blocked verification rather than claiming it passed.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
.compozy/loops/implement-tasks/loop.yaml Propagates the selected implementer into the orchestrated Goal objective while preserving the existing default.
extensions/spec-cycle/skills/cy-orchestrate-tasks/SKILL.md Updates worker spawning and recovery instructions to use and verify the selected Agent.
internal/daemon/daemon_implement_tasks_e2e_integration_test.go Adds deterministic coverage for custom Agent identity, local skills, category runtimes, settlement, and cleanup.
docs/qa/scenarios/LP-implement-tasks-orchestrated-mode.md Records the provider-backed journey as blocked pending authorized credentials and links the supporting report.

Sequence Diagram

sequenceDiagram
    participant U as Loop input
    participant G as Orchestrated Goal
    participant C as Conductor
    participant W as Worker session
    U->>G: implementer Agent
    G->>C: Selected implementer in objective
    C->>W: spawn --agent selected implementer
    W-->>C: matching agent_name and task result
    C->>W: stop worker
    C-->>G: completed frontmatter and no live workers
Loading

Reviews (2): Last reviewed commit: "docs: record blocked orchestrated implem..." | Re-trigger Greptile

Comment thread docs/qa/scenarios/LP-implement-tasks-orchestrated-mode.md
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 28, 2026
@richardfogaca

Copy link
Copy Markdown
Contributor Author

Follow-up on the remaining automated feedback:

  • No source change for the preview-deployment authorization message: a Compozy team member must authorize the fork deployment, so this is an external gate rather than a code defect.
  • No source change for the docstring warning: it targets unexported test helpers, and adding comments would conflict with the repository's existing Go test style without improving the contract.
  • No review-configuration change for the inconclusive linked-issue check: its path filters excluded the YAML/Markdown contract files, but those files were reviewed directly and are covered by the embedded-contract and daemon E2E tests.
  • No action for the quota-limited review because it produced no technical finding.

The accepted QA-status correction is in 88096731, and make gate passed on that head.

@pedronauck
pedronauck merged commit 1881a9f into compozy:main Aug 31, 2026
3 of 4 checks passed
This was referenced Aug 30, 2026
This was referenced Sep 15, 2026
This was referenced Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

implement-tasks orchestrated mode ignores the selected implementer Agent

3 participants