Skip to content

fix(orchestrate): env.agent_profile → env.orc_profile (v0.26.11)#1149

Merged
ohdearquant merged 1 commit into
mainfrom
fix/play-agent-profile-attribute-error
May 25, 2026
Merged

fix(orchestrate): env.agent_profile → env.orc_profile (v0.26.11)#1149
ohdearquant merged 1 commit into
mainfrom
fix/play-agent-profile-attribute-error

Conversation

@ohdearquant
Copy link
Copy Markdown
Owner

Summary

Fixes AttributeError: 'OrchestrationEnv' object has no attribute 'agent_profile' at lionagi/cli/orchestrate/flow.py:643 when li play is called with an explicit agent name.

Root cause

OrchestrationEnv dataclass field is named orc_profile (_orchestration.py:190), but flow.py:643 and flow.py:648 reference env.agent_profile. Bug introduced by #1083 (ADR-0029 artifact contract).

Triggers when agent_name is not None — i.e., li play <playbook> with an orchestrator agent specified. Default invocation paths short-circuit on agent_name is None and never hit the bug, which is why it survived release.

Fix

  • flow.py:643,648env.agent_profileenv.orc_profile (2 occurrences)
  • tests/cli/orchestrate/test_orchestration_env_attrs.py (new) — structural regression test parses flow.py for every public env.<attr> access and asserts each matches a real OrchestrationEnv field or method. Catches future typos of this exact shape.

Also bumps to v0.26.11 with CHANGELOG entry.

Test plan

  • New regression test passes (uv run pytest tests/cli/orchestrate/test_orchestration_env_attrs.py)
  • Pre-commit hooks pass (ruff, pyupgrade, markdownlint)
  • li play <playbook> --agent <name> no longer raises AttributeError (verified by Ocean post-merge)

🤖 Generated with Claude Code

The OrchestrationEnv dataclass field is `orc_profile`, not `agent_profile`.
Two references at flow.py:643,648 (added by #1083 ADR-0029 artifact contract)
raised AttributeError when `li play` was invoked with an explicit agent name.

Added structural regression test: parses flow.py for every public env.<attr>
access and asserts each matches a real OrchestrationEnv field/method.

Bumps to v0.26.11.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@ohdearquant ohdearquant merged commit 51afeb6 into main May 25, 2026
7 checks passed
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