Repository navigation
refactor(acp): rename hoist_managed_servers to hoist_servers_for_session - #24600
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of 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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing to check. What this change shipsInventory (3 items) — 3 justifiedIntent: 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.
[FIRST-PRINCIPLES-REVIEWED] 96fb817 Description read[DESCRIPTION-READ] 243fddd85d6ec8f25d256a63ea3b4302c6ff05058abd9df330dd753862aa8fa4 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
bolichen97
left a comment
There was a problem hiding this comment.
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_serversbecomeshoist_servers_for_sessionand theresumekeyword becomesinclude_user_servers. The hoist condition(managed or include_user_servers)and the token rule for managed entries are unchanged. git grep hoist_managed_serverson 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_IMPORTSlist intest_runtime_bindings.pykeep 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.pyandtest_acp_runtime.pyat 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.
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
6fb5fcc to
96fb817
Compare
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
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.
Problem / Motivation
Goal: Give the ACP session-server hoist a name that says what it does, so the
session/loadcall site reads correctly.kas_agents.hoist_managed_serversgained aresume=Truepath in #19905 (for #17781) that also hoists user-declared (non-managed) MCP servers onsession/load. The function name and itsresumeflag now describe only half the behaviour, which makes theload_sessioncall site misleading to read.Why it matters
A reader of
load_sessionseeshoist_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
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 inkas_agents.py).resumekeyword →include_user_servers(the issue's suggested name; the flag only ever gated the user-declared hoist).runtime_session_create.py,runtime_session_load.py), theruntime.pyfacade import, the facade inventory JSON and the_BASE_IMPORTSlist intest_runtime_bindings.py.kas_agents.py,session_mcp.py,runtime_session_load.py) and the acp-client system spec.test_kas_agents_mcp_servers.py,test_acp_runtime_load_session.py,test_acp_runtime.py).git grep hoist_managed_serverson the head returns nothing.Backwards compatibility
Breaking: the internal function
kiro_crew.acp.kas_agents.hoist_managed_serversand itsresume=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.pyhoist tests incl. theinclude_user_servers=Truecases,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 intest_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
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license.