Skip to content

fix: custom workflow now passes the real task to workers (#87)#88

Merged
Payel-git-ol merged 2 commits into
Payel-git-ol:fix/custom-workflowfrom
konard:issue-87-84fa7bc45fb8
Jun 16, 2026
Merged

fix: custom workflow now passes the real task to workers (#87)#88
Payel-git-ol merged 2 commits into
Payel-git-ol:fix/custom-workflowfrom
konard:issue-87-84fa7bc45fb8

Conversation

@konard

@konard konard commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

🤖 Fix: custom workflow now actually builds the project

Fixes #87

Problem

When a user builds their own workflow on the canvas (Boss → Managers → Workers) and submits a task, Octra ran every agent (the chat showed Coordinator done, Developer done, Designer done…) but produced no code — it "started creating the project and immediately stopped, refusing to write code."

Root cause

decisionFromPredefinedWorkflow (orchestrator/internal/service/rules/boss/plan.go) set the TechnicalDescription to the architecture label sent by the frontend:

"Custom workflow with Architect and 2 managers"

That TechnicalDescription is exactly what becomes each worker's TASK.md (boss → manager → worker, via AssignWorkersRequest.TaskMd). So every worker was asked to implement the meaningless label instead of the user's actual request — and generated nothing. The real task (title + description) was silently discarded on the custom-workflow path, even though the AI-planning path always carries a real technical description.

Fix

  • TechnicalDescription now carries the real task (title + description); the architecture label is kept only in ArchitectureNotes for Boss validation/context.
  • Tech-stack detection on the custom path: when the workflow omits a tech stack (e.g. the Boss node has none configured) it is now detected from the task via detectTechStack, mirroring the AI-planning path — no more silently defaulting every custom workflow to Go.
  • Fixed a pre-existing CI-breaking regression in hasRealCode (introduced in 6f5da02): the >= 3 non-comment lines threshold rejected valid short source such as a minimal main.go (package main + func main() {}) or a one-line Express server. This broke TestContainsSourceCode and left orchestrator CI red on master. It now requires >= 1 real code line while still rejecting empty / comment-only stubs (issue #98 intent preserved).

How to reproduce / verify

  1. Build a custom workflow on the canvas (Boss + ≥1 Manager + ≥1 Worker), submit any coding task.
  2. Before: agents report done, no files are written.
  3. After: workers receive the real task and generate code.

Tests

  • Updated TestDecisionFromPredefinedWorkflow — asserts the technical description holds the real task and the label lives in ArchitectureNotes.
  • Added TestDecisionFromPredefinedWorkflowCarriesRealTask — regression test: the workflow label must not leak into the task, the real request must survive, and the tech stack must be detected (python) when omitted.
  • go build ./..., go vet ./..., and go test ./... are green for the orchestrator (and the other Go modules build/test clean).

konard added 2 commits June 16, 2026 17:58
Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: Payel-git-ol#87
…l#87)

Custom workflows built in the canvas (Boss -> Managers -> Workers) ran
all agents but produced no code. Root cause: decisionFromPredefinedWorkflow
set TechnicalDescription to the architecture label ('Custom workflow with
Boss and N managers') instead of the user's request. Since that string
becomes each worker's TASK.md, workers were told to implement a meaningless
label and generated nothing.

- TechnicalDescription now carries the real task (title + description);
  the architecture label stays in ArchitectureNotes for Boss context.
- Detect the tech stack from the task when the custom workflow omits it,
  mirroring the AI-planning path (no more silent Go default).
- Fix hasRealCode regression (commit 6f5da02): the '>= 3 lines' threshold
  rejected valid short source (e.g. minimal main.go), breaking
  TestContainsSourceCode and orchestrator CI; require >= 1 real code line.

Updates TestDecisionFromPredefinedWorkflow and adds a regression test.
@konard konard changed the title [WIP] FIX_PROBLEMS_IN_CUSTOM_WORKFLOW fix: custom workflow now passes the real task to workers (#87) Jun 16, 2026
@konard konard marked this pull request as ready for review June 16, 2026 18:07
@Payel-git-ol Payel-git-ol merged commit c977f42 into Payel-git-ol:fix/custom-workflow Jun 16, 2026
2 checks passed
@konard

konard commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Working session summary

PR #88 is merged. CI on the PR was green (Go Workspace CI + Orchestrator CI both SUCCESS), and the working tree is clean.

Nothing more to do on this issue — fix is upstream.


This summary was automatically extracted from the AI working session output.

@konard

konard commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $3.594567
  • Calculated by Anthropic: $0.555394
  • Difference: $-3.039173 (-84.55%)

📊 Context and tokens usage:

Claude Opus 4.8: (2 sub-sessions)

  1. 116.0K / 1M (12%) input tokens, 24.1K / 128K (19%) output tokens
  2. 48.8K / 1M (5%) input tokens, 805 / 128K (1%) output tokens

Total: (3.7K new + 103.5K cache writes + 3.9M cache reads) input tokens, 24.1K output tokens, $3.222027 cost

Claude Opus 4.7:

  • 48.8K / 1M (5%) input tokens, 805 / 128K (1%) output tokens

Total: (13 new + 48.8K cache writes + 95.2K cache reads) input tokens, 805 output tokens, $0.372540 cost

🤖 Models used:

  • Tool: Anthropic Claude Code
  • Requested: opus
  • Main model: Claude Opus 4.8 (claude-opus-4-8)
  • Additional models:
    • Claude Opus 4.7 (claude-opus-4-7)

📎 Log file uploaded as Gist (2138KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

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.

2 participants