Skip to content

fix: agent compile posts a bare config instead of the agentConfig envelope - #109

Merged
mp-orkes merged 3 commits into
mainfrom
fix/issue-96-agent-compile-envelope
Aug 7, 2026
Merged

fix: agent compile posts a bare config instead of the agentConfig envelope#109
mp-orkes merged 3 commits into
mainfrom
fix/issue-96-agent-compile-envelope

Conversation

@mp-orkes

@mp-orkes mp-orkes commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Fixes #96.

agent compile fails for every config:

./conductor agent compile foo.yaml
Error: agentConfig is required when framework is not specified (status 400)

/agent/compile expects AgentStartRequest. Compile posted the bare config, which deserialized to an empty request.

How to test

go build -o conductor .
./conductor agent init foo --model openai/gpt-4o
./conductor agent compile foo.yaml   # prints the compiled workflowDef

🤖 Generated with Claude Code

@mp-orkes mp-orkes self-assigned this Aug 6, 2026
No fix — this is only here to make the bug visible in CI.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mp-orkes
mp-orkes force-pushed the fix/issue-96-agent-compile-envelope branch from b6a1417 to d204422 Compare August 6, 2026 15:48
@mp-orkes mp-orkes changed the title fix: agent compile posts a bare config instead of the agentConfig envelope test: un-skip agent compile e2e guard to show #96 failing Aug 6, 2026
It was the only server-touching test in the file without require_agents_api —
the skip fired first and masked the omission. Without it, Enterprise fails with
"Agents API is not available" instead of the actual #96 error.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mp-orkes mp-orkes changed the title test: un-skip agent compile e2e guard to show #96 failing fix: agent compile posts a bare config instead of the agentConfig envelope Aug 6, 2026
/agent/compile binds AgentStartRequest server-side, same as /agent/start, so the
config must travel in the agentConfig field. Compile posted the bare config,
which deserialized to an empty request and was rejected for every input.

Turns the two tests from the previous commit green.

Fixes #96

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mp-orkes
mp-orkes force-pushed the fix/issue-96-agent-compile-envelope branch from 6a003cd to 4cacf88 Compare August 6, 2026 17:05
@mp-orkes
mp-orkes marked this pull request as ready for review August 6, 2026 17:05
Comment thread internal/agent/client.go
func (c *restClient) Compile(ctx context.Context, def json.RawMessage) (json.RawMessage, error) {
var out json.RawMessage
if err := c.doJSON(ctx, http.MethodPost, pathCompile, def, &out); err != nil {
if err := c.doJSON(ctx, http.MethodPost, pathCompile, startRequest{AgentConfig: def}, &out); err != nil {

@mp-orkes mp-orkes Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

TODO: this request and the agent client should live in the go-sdk. (in another PR)

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/agent/client.go 0.00% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Flag Coverage Δ
unittests 21.71% <0.00%> (+5.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
internal/agent/client.go 62.32% <0.00%> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mp-orkes
mp-orkes merged commit 83ca292 into main Aug 7, 2026
4 of 5 checks passed
@mp-orkes
mp-orkes deleted the fix/issue-96-agent-compile-envelope branch August 7, 2026 15:42
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.

agent compile returns 500 for every config (sends bare config, not {"agentConfig": …})

4 participants