refactor: standardize --agent option usage, improve YAML registry fallback, and fix layout falsy-zero trap (J-1)
- In stop_session.sh and update_yaml_resumed.sh: standardize explicit --agent option and use resolve_agent_type_from_registry to read agent type from YAML/DB state rather than brittle suffix-only regex inference. - Update multi-agent-mux-stop/SKILL.md, multi-agent-mux-resume/SKILL.md, multi-agent-mux-create/SKILL.md, and deploy/INSTALL.md to standardize passing --agent explicitly. - Fix J-1 in layout.py: refactor _env_int(*names, default=None) to take an explicit default parameter, eliminating the falsy-zero trap so MAM_MIN_PANE_COLS=0 is respected. - Add regression and contract tests: test_j1_env_zero_min_cols_matches_flag_zero, test_j1_env_zero_min_rows_matches_flag_zero, test_comp_stop_agent_fallback_*, test_comp_docs_stop_examples_pass_agent. - Verified 100% UNANIMOUS PASS from Planner claude and Reviewers claude and cline.
This commit is contained in:
@@ -46,6 +46,15 @@ def test_agent_of_row_priority():
|
||||
row3 = {'pane': {'cmd': 'cline'}}
|
||||
assert agent_of_row(row3) == 'cline'
|
||||
|
||||
def test_agent_of_row_pane_cmd_binary_path_and_failure():
|
||||
# pane.cmd 가 절대 경로 형태여도 해석된다
|
||||
assert agent_of_row({'pane': {'cmd': '/usr/local/bin/agy'}}) == 'agy'
|
||||
# 세 경로 모두 실패하면 None — 호출자가 오류를 소유한다
|
||||
assert agent_of_row({}, session_name='bad-session-name') is None
|
||||
# 입양 조회용 match_cmd=False 에서는 pane.cmd 를 보지 않는다
|
||||
assert agent_of_row({'name': 'agy-creator-01', 'pane': {'cmd': 'agy'}},
|
||||
match_cmd=False) is None
|
||||
|
||||
def test_adapter_required_properties():
|
||||
from lib_py.agents.base import BaseAgentAdapter
|
||||
base = BaseAgentAdapter()
|
||||
|
||||
Reference in New Issue
Block a user