Skip to content

fix(session-control): backport worker template selection - #21085

Closed
luisgabriel wants to merge 1 commit into
kirodotdev:release/0.9.0from
luisgabriel:backport/0.9.0-session-agent-kind
Closed

luisgabriel wants to merge 1 commit into
kirodotdev:release/0.9.0from
luisgabriel:backport/0.9.0-session-agent-kind

Conversation

@luisgabriel

Copy link
Copy Markdown

Problem / Motivation

Goal: Enable maintained 0.9 installations to dispatch nested conductor workers without weakening private-memory isolation.

A conductor that explicitly intends to start the shared kirocrew-worker template is currently blocked when a private crewmate has the same name, because bare agent-name resolution remains member-first.

Why it matters

Nested conductors on the 0.9 release line cannot create leaf workers in this valid same-name configuration, so delegated goal execution stops before work begins.

Not a goal

  • Do not change bare-name member-first resolution.
  • Do not grant access to a same-named private crewmate or its private memory store.
  • Do not change member rebinding, deletion, or release automation.

What changed (motivation → approach → change)

The failure comes from an ambiguous bare agent name, so this backports the explicit template namespace from #18454 instead of relaxing the memory fence. src/kiro_crew/dashboard/handlers/session_control.py and src/kiro_crew/dashboard/session_control.py validate and carry agent_kind; src/kiro_crew/mcp_dashboard.py exposes and forwards it; and src/kiro_crew/validation.py applies the closed-set schema. src/kiro_crew/agent.py persists the resolved namespace in slot birth metadata, while src/kiro_crew/builtin_skills/goal-conductor/SKILL.md makes conductor dispatch explicit. src/kiro_crew/docs/session-control.md and the system specification document the contract. Bare names remain member-first and delegation refusals remain fail-closed. Release-specific generated conductor digests were regenerated from the 0.9 materializer.

Backwards compatibility

Compatible: agent_kind is optional, so existing session-create callers keep their current behavior; the new value only disambiguates an explicit template selection.

Removes nothing: the backport adds a namespace selector and preserves all existing bare-name behavior.

Tests

  • 421 directly affected backend tests pass, covering bare-name denial, explicit template selection on caller memory, HTTP/MCP forwarding, fail-closed validation, metadata persistence, and same-name resolver behavior.
  • 24 focused tests passed 20 serial repetitions and 10 four-worker loadgroup repetitions.
  • Full frontend Vitest, Electron, TypeScript, build, i18n, bundle-size, and chunk-cycle gates pass under supported Node runtimes.
  • mypy, flake8, changed-file isort, documentation, repository policy, and Semgrep 1.78 checks pass.

Manual verification

N/A — the behavior is exercised through the real resolver plus HTTP and MCP boundaries, with deterministic repeat coverage.

Screenshots / video

N/A — this is a backend session-control and agent-prompt backport with no rendered UI change.

Related Issues

Part of #18204

Backport of PR #18454 (870140d712b1360b5a4ff1580418013cc1d739ae).

Pattern harvest

Rule candidate: review-prompt
Pattern: When private members and shared templates can share a name, privileged dispatch must select the intended namespace explicitly rather than weakening isolation or relying on fallback order.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

@luisgabriel
luisgabriel requested review from a team and KiroCrewCaptain as code owners October 16, 2026 05:17
@luisgabriel
luisgabriel requested review from mbriones98 and removed request for a team October 16, 2026 05:17
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention labels Oct 16, 2026
Backport the explicit template namespace used by conductor worker dispatch to
the maintained 0.9 release line. Preserve member-first bare-name resolution
and private-memory delegation refusal.

(cherry picked from commit 870140d)
@luisgabriel
luisgabriel force-pushed the backport/0.9.0-session-agent-kind branch from 9a6fb42 to a8cd99d Compare October 16, 2026 17:37
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 16, 2026
@luisgabriel

Copy link
Copy Markdown
Author

Closing this release-branch backport because the fix is already merged on main and we can wait for the next regular release. We also validated the change end to end with a temporary hot patch on 0.9.0.4; the previously blocked nested conductor dispatch succeeded while preserving the intended template selection path. Thanks for taking a look.

@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants