Skip to content

Verify example catalog against conductor-oss 3.32.0-rc.8; fix broken examples + worker-tool registry lookup#437

Closed
ling-senpeng13 wants to merge 1 commit into
mainfrom
examples/verification-and-fixes
Closed

Verify example catalog against conductor-oss 3.32.0-rc.8; fix broken examples + worker-tool registry lookup#437
ling-senpeng13 wants to merge 1 commit into
mainfrom
examples/verification-and-fixes

Conversation

@ling-senpeng13

Copy link
Copy Markdown
Contributor

Summary

Full verification of the SDK example catalog against a live conductor-oss 3.32.0-rc.8 server, tracked in examples/VERIFICATION_REPORT.md, plus fixes for every reproducible example bug found and one SDK bug.

Documentation only for the server-version issue — no CLI/pipeline version change. The agent examples require conductor-oss ≥ 3.32.0-rc.8 (agent runtime on by default); the CLI's floating latest (3.30.x) has no /api/agent/* endpoints. The READMEs now say so and give conductor server start --version 3.32.0-rc.8. The latest pointer resolves itself at 3.32.0 GA.

Test status (tracked in the report)

Suite Result
agents (examples/agents/, 146 files) 96 PASS / 46 SKIP (interactive/infra) / 2 ERROR / 2 HUNG
before these fixes, same server 91 PASS / 12 ERROR / 3 HUNG / 40 SKIP
on 3.30.2 (CLI latest) 3 PASS / 103 ERROR — hence the doc change
core (curated 18) 13 PASS / 4 worker-daemons run clean by design / 1 interactive
tests/unit/ai 1744 passed

Example fixes (each verified end-to-end)

  • greetings_worker.py — duplicate def greet shadowed the registered worker → spawn-pickling failure on macOS/Windows (broke workers_e2e, helloworld, task_listener_example)
  • worker_example.py — hardcoded /Users/viren/ metrics dir → tempfile.gettempdir()
  • user_workers.pyexamples.* import vs user_example.* module identity crashed spawn children
  • kitchen_sink.py@agent classifiers must take zero args (decorator evaluates them for dynamic instructions)
  • 16i / 16j — tools defined inside factory functions aren't importable by spawn workers (SpawnSafetyError) → hoisted to module level
  • 94_openai_runner_tools.py — apply function_tool() at Agent(...) construction so the module global isn't rebound to an unpicklable FunctionTool
  • llm_chat.py — server requires a non-empty user message (two tasks were system-only), and the example reported success on a FAILED workflow (is_completed() is true for any terminal state); both fixed
  • run_all_examples.py — 6 env-dependent examples classified SKIP with reasons (dg skill repo; workflow messages API absent in rc.8)

SDK fix

_try_worker_task in conductor/ai/agents/tool.py: the registry identity check broke once ToolRegistry.register_tool_workers re-registered a task name with a spawn-safe ToolWorkerEntry wrapper — a second get_tool_def() on the same @worker_task tool raised TypeError (broke 14_existing_workers.py). Lookup now walks __wrapped__/fn_direct/fn_ref carriers. Two regression tests added.

Remaining known failures (documented in the report, not fixed here)

  • kitchen_sink.py — server-side: translation_swarm sub-workflow definition not registered before /agent/start (HTTP 500)
  • 74_cli_error_output.py — flaky LLM-behavior assertion
  • 86_coding_agent.py — hangs >420s even solo
  • 68_context_condensation.py — passes solo (~346s), exceeds suite timeout under contention

Follow-ups suggested (out of scope)

AgentNotFoundError should name the minimum server version; run_all_examples.py could preflight GET /api/version; spawn-safety layer could learn a closure hop for openai-agents FunctionTool.

🤖 Generated with Claude Code

….8; fix 9 broken examples + worker-tool registry lookup

Full verification run of the example catalog (agents suite: 96 PASS / 46
SKIP / 2 ERROR / 2 HUNG; core suite: 13 PASS / 4 daemon-by-design / 1
interactive) — see examples/VERIFICATION_REPORT.md for status tracking,
environment, root causes, and remaining known failures.

Example fixes (all verified end-to-end against a live server):
- greetings_worker.py: duplicate `def greet` shadowed the registered
  worker and broke spawn pickling on macOS/Windows (workers_e2e,
  helloworld, task_listener_example)
- worker_example.py: hardcoded /Users/viren metrics dir -> tempfile
- user_workers.py: import via examples.* package identity crashed spawn
  children that load the module as user_example.*
- kitchen_sink.py: @agent classifier functions must take zero args
- 16i/16j: tools defined inside factory functions are not importable by
  spawn workers (SpawnSafetyError) — hoisted to module level
- 94_openai_runner_tools.py: keep the plain function at module level and
  apply function_tool() at Agent construction so the module global is
  not rebound to an unpicklable FunctionTool
- llm_chat.py: server requires a non-empty user message (two tasks sent
  system-only lists); also exit non-zero when the workflow ends FAILED
  instead of reporting success on any terminal state
- run_all_examples.py: classify 6 env-dependent examples as SKIP with
  reasons (dg skill repo; workflow messages API absent in rc.8)

SDK fix:
- tool.py _try_worker_task: registry identity check failed once
  ToolRegistry.register_tool_workers re-registered the task name with a
  spawn-safe ToolWorkerEntry wrapper; lookup now walks __wrapped__ /
  fn_direct / fn_ref carriers (broke 14_existing_workers.py; 2
  regression tests added, tests/unit/ai: 1744 passed)

Docs:
- examples/agents/README.md + examples/README.md: agent examples require
  conductor-oss >= 3.32.0-rc.8 (`conductor server start --version
  3.32.0-rc.8`); the CLI's `latest` (3.30.x) has no /api/agent/* and
  fails with AgentNotFoundError HTTP 404. Also fixed the provider/model
  table (OpenAI row showed the Anthropic default string).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/conductor/ai/agents/tool.py 87.50% 2 Missing ⚠️
Files with missing lines Coverage Δ
src/conductor/ai/agents/tool.py 91.54% <87.50%> (-0.40%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ling-senpeng13

Copy link
Copy Markdown
Contributor Author

Closing to split this into two draft PRs: (1) verification report + docs only, (2) the example/SDK fixes — so the fixes can be evaluated separately.

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.

1 participant