Skip to content

fix(s12_agent): SubagentTypeOrchestrator accepts zero-arg construction (2.0.1)#203

Merged
CocoRoF merged 1 commit into
mainfrom
fix/subagent-orchestrator-default-registry
May 18, 2026
Merged

fix(s12_agent): SubagentTypeOrchestrator accepts zero-arg construction (2.0.1)#203
CocoRoF merged 1 commit into
mainfrom
fix/subagent-orchestrator-default-registry

Conversation

@CocoRoF
Copy link
Copy Markdown
Owner

@CocoRoF CocoRoF commented May 18, 2026

Bug

```
TypeError: SubagentTypeOrchestrator.init() missing 1 required positional argument: 'registry'
```
fires during `Pipeline.from_manifest_async` when a manifest names `subagent_type` as the Stage 12 orchestrator strategy.

Cause

`PipelineMutator.restore` walks the manifest and calls `set_strategy("orchestrator", "subagent_type", ...)`. The `StrategySlot` machinery instantiates the strategy via `cls()` — zero-arg. 2.0.0's `SubagentTypeOrchestrator.init` requires a positional `registry`, so the call fails. `Pipeline._wire_subagent_orchestrator` would have bound the real registry, but it runs after restore, never reached.

Fix

`init(self, registry=None)` falls back to an empty `SubagentTypeRegistry`. Zero-arg construction works; the post-restore wire step replaces this temporary instance with one bound to the host's real registry. Brief no-registry window is harmless — delegate requests land as structured `"unknown_agent_type"` failures, not crashes.

Tests

  • `tests/unit/test_subagent_orchestrator_zero_arg.py` (NEW) — 3 cases.
  • Full repo: 3238 passed, 8 skipped, 0 failed.

Version

2.0.0 → 2.0.1. CHANGELOG entry added.

…n (2.0.1)

Bug: a manifest that names ``"subagent_type"`` as the Stage 12
orchestrator strategy crashes during ``Pipeline.from_manifest_async``:

    TypeError: SubagentTypeOrchestrator.__init__() missing 1 required
    positional argument: 'registry'

Cause: PipelineMutator.restore walks the manifest and calls
``stage.set_strategy("orchestrator", "subagent_type", ...)``. The
StrategySlot machinery instantiates the strategy via ``cls()`` —
zero-arg. In 2.0.0 the orchestrator's ``__init__`` requires a
``registry`` positional, so the call fails. By the time
``Pipeline._wire_subagent_orchestrator`` runs (post-restore) to bind
the real registry, the crash has already aborted the build.

Fix: ``SubagentTypeOrchestrator.__init__(self, registry=None)``
falls back to an empty :class:`SubagentTypeRegistry`. Zero-arg
construction works; ``_wire_subagent_orchestrator`` then replaces
the strategy with a real instance bound to the host registry. The
brief no-registry window is harmless — delegate requests just land
as structured "unknown_agent_type" failures (no nested crash).

Tests:
- tests/unit/test_subagent_orchestrator_zero_arg.py (NEW) — 3 cases:
  zero-arg construction, explicit registry round-trip, zero-arg
  orchestrate yields structured failure.
- Full suite: 3238 passed, 8 skipped, 0 failed.

Version: 2.0.0 → 2.0.1.
CHANGELOG entry added.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@CocoRoF CocoRoF merged commit daf2e1f into main May 18, 2026
@CocoRoF CocoRoF deleted the fix/subagent-orchestrator-default-registry branch May 18, 2026 00:24
CocoRoF added a commit to CocoRoF/Geny that referenced this pull request May 18, 2026
…ypeOrchestrator zero-arg crash) (#785)

Hotfix for prod ``새 세션 만들기`` failure:

  TypeError: SubagentTypeOrchestrator.__init__() missing 1 required
  positional argument: 'registry'

Root cause is in geny-executor 2.0.0 (Stage 12 strategy restore path
constructs the orchestrator zero-arg before the registry can be
bound). Fixed in geny-executor 2.0.1 (PR CocoRoF/geny-executor#203,
daf2e1f). This PR bumps the Geny pin in both requirements.txt and
pyproject.toml so the buggy 2.0.0 can't be resolved on rebuild.

Deploy procedure (after PyPI release of 2.0.1):

  cd /home/hrjang/docker_web/Geny
  sudo git pull origin main
  sudo docker compose -f docker-compose.prod.yml build --no-cache backend
  sudo docker compose -f docker-compose.prod.yml up -d

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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