Skip to content

refactor(acp): rename hoist_managed_servers to hoist_servers_for_session - #24600

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
refactor/20266-rename-hoist-servers
Oct 27, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
refactor/20266-rename-hoist-servers

Conversation

@cruisercohen

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Give the ACP session-server hoist a name that says what it does, so the session/load call site reads correctly.

kas_agents.hoist_managed_servers gained a resume=True path in #19905 (for #17781) that also hoists user-declared (non-managed) MCP servers on session/load. The function name and its resume flag now describe only half the behaviour, which makes the load_session call site misleading to read.

Why it matters

A reader of load_session sees hoist_managed_servers(..., resume=True) and has to open the function to learn that user-declared servers move too. Readability only; nothing is broken today.

Not a goal

  • No behaviour change: what is hoisted, when, and with which token is byte-for-byte the same.
  • No compatibility alias for the old name (the issue allows dropping it outright; it has no caller outside this package).

What changed (motivation → approach → change)

Name covers half the behaviour → rename to what the issue proposes → mechanical rename everywhere the symbol appears:

  • hoist_managed_servers → hoist_servers_for_session (definition in kas_agents.py).
  • Its resume keyword → include_user_servers (the issue's suggested name; the flag only ever gated the user-declared hoist).
  • Both call sites (runtime_session_create.py, runtime_session_load.py), the runtime.py facade import, the facade inventory JSON and the _BASE_IMPORTS list in test_runtime_bindings.py.
  • Docstrings/comments that named the old symbol or flag (kas_agents.py, session_mcp.py, runtime_session_load.py) and the acp-client system spec.
  • Tests that call or patch the function (test_kas_agents_mcp_servers.py, test_acp_runtime_load_session.py, test_acp_runtime.py).

git grep hoist_managed_servers on the head returns nothing.

Backwards compatibility

Breaking: the internal function kiro_crew.acp.kas_agents.hoist_managed_servers and its resume= keyword are renamed with no alias. Writer sweep on origin/main @ a3ee04f (git grep -n hoist_managed_servers): every caller, re-export, patch target and doc reference is in this repo and is changed here; the four open PRs touching the same files (#24043, #24002, #23618, #22985) add no reference to the old name or flag.

Reader: src/kiro_crew/acp/runtime_session_create.py:create_session -- chat -- calls hoist_servers_for_session with the same arguments; test_acp_runtime.py kas readiness wire tests
Reader: src/kiro_crew/acp/runtime_session_load.py:load_session -- chat -- calls hoist_servers_for_session(include_user_servers=True, reserved_names=...); test_acp_runtime_load_session.py::TestAcpRuntimeLoadSession
Reader: src/kiro_crew/acp/runtime.py:hoist_servers_for_session -- chat -- facade re-export renamed, inventory updated; test_runtime_bindings.py, test_campaign_facades_base_public_names.py

Tests

No new tests: existing coverage exercises every renamed path (test_kas_agents_mcp_servers.py hoist tests incl. the include_user_servers=True cases, test_acp_runtime_load_session.py, the runtime facade/binding inventories).

Proof: not provable -- other: pure rename refactor, no behaviour change to prove

Local run (Python 3.12): the six directly affected files, 1224 passed. Broader test_acp* / test_kas* / test_session_mcp* plus spec-referencing tests: 10035 passed, 17 failed — all 17 in test_acp_spawn_offload.py::TestRuntimeProjectedLaunchDocuments, which fail identically on a clean origin/main checkout in the same environment (not touched by this change).

Manual verification

N/A — unit coverage sufficient: identifier-only change, black/isort/flake8 clean on the touched files.

Related Issues

Closes #20266

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

Contributed under the project's Apache-2.0 license.

@cruisercohen
cruisercohen requested review from a team and KiroCrewCaptain as code owners October 26, 2026 21:55
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 26, 2026
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision 96fb817887ded82daf9e62d4f68c1d528cbbc5c0 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 96fb817887ded82daf9e62d4f68c1d528cbbc5c0 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: this is an identifier-only rename of an internal function and its keyword. No references to the old name are left in the tree, and every caller, re-export and patch target is updated and listed.

[DESIGN-REVIEWED] 96fb817

Description read

[DESCRIPTION-READ] 2951407b4a25d4a7f17e06a4b092f0c1b808d97e6cba3df0dd212ae3296f3b37

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 96fb817887ded82daf9e62d4f68c1d528cbbc5c0 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing to check.

What this change ships

Inventory (3 items) — 3 justified

Intent: make the code that loads a session read correctly by naming the server-hoist function after what it does. This is a refactor, neither a fix nor an addition.

  1. hoist_managed_servers is renamed hoist_servers_for_session at its definition, its 2 call sites, the runtime facade and the facade inventory — justified
  2. The hoist's resume keyword is renamed include_user_servers, and only runtime_session_load.py passes it — justified
  3. Docstrings, comments, the acp-client spec and tests now use the new names, and a repo grep finds 0 uses of the old name — justified

[FIRST-PRINCIPLES-REVIEWED] 96fb817

Description read

[DESCRIPTION-READ] 243fddd85d6ec8f25d256a63ea3b4302c6ff05058abd9df330dd753862aa8fa4

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 96fb817887ded82daf9e62d4f68c1d528cbbc5c0 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 96fb817

Verdict parsed from the review's SHA-scoped output markers for commit 96fb817887ded82daf9e62d4f68c1d528cbbc5c0.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 96fb817887ded82daf9e62d4f68c1d528cbbc5c0 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 96fb817887ded82daf9e62d4f68c1d528cbbc5c0 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 96fb817

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 96fb817887ded82daf9e62d4f68c1d528cbbc5c0 false-positive: <reason, 20 to 500 characters>

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to ship. The remaining maintainer check is a readiness: passed signal on this head: the backend test shards and E2E are still queued.

Head reviewed: 6fb5fcc. No must-fix or should-fix findings.

What I checked:

  • The diff is a pure rename. hoist_managed_servers becomes hoist_servers_for_session and the resume keyword becomes include_user_servers. The hoist condition (managed or include_user_servers) and the token rule for managed entries are unchanged.
  • git grep hoist_managed_servers on the head returns nothing. On current main the old name appears in the same 11 files and at the same counts as on the merge base, so main added no new caller since the branch point.
  • The facade inventory JSON and the _BASE_IMPORTS list in test_runtime_bindings.py keep their sorted order.
  • The owning spec (docs/system-specs/modules/acp-client.md) is updated in the same commit.
  • Single commit with a Conventional Commits title. The linked issue is tier T1. No security path, approval-gate path or manifest is touched. 11 files changed.
  • I ran test_kas_agents_mcp_servers.py, test_acp_runtime_load_session.py, test_runtime_bindings.py and test_acp_runtime.py at this head: 637 passed.
  • Design, First Principles, Opus and GPT lanes report PASS or no blocking findings for this SHA. UX was skipped (no user-facing surface).

Merge order note: the open PR #24043 has from kiro_crew.acp.kas_agents import hoist_managed_servers as a context line in runtime_session_load.py. Whichever PR lands second needs a small rebase there.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 26, 2026
The session/load path (#19905) made the hoist also move user-declared
servers, so the old name described only half its behaviour. Rename the
function to hoist_servers_for_session and its resume flag to
include_user_servers, and update both call sites, the runtime facade
re-export and its inventory, the docstrings, the acp-client spec and the
tests. Pure rename: no behaviour change.

Closes #20266
@cruisercohen
cruisercohen force-pushed the refactor/20266-rename-hoist-servers branch from 6fb5fcc to 96fb817 Compare October 27, 2026 01:11
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 27, 2026
@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) October 27, 2026 03:05

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Tier 1 auto-approve: refactor (11 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: rename of hoist_managed_servers and its resume keyword; every call site and test follows, no behaviour change. Spec files changed as a ride-along (a minority of the diff on both file count and changed lines), not reviewed as a design decision: docs/system-specs/modules/acp-client.md.

@KiroCrewCaptain
KiroCrewCaptain merged commit 814c4f7 into main Oct 27, 2026
108 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the refactor/20266-rename-hoist-servers branch October 27, 2026 03:05
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 27, 2026
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.

refactor(acp): rename hoist_managed_servers to reflect that it also hoists user-declared servers on resume

3 participants