Repository navigation
Fix Turn identity in generated Todo selection commands - #8964
huangruiteng wants to merge 2 commits into
Conversation
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · Gemini · Google (self_reported)
已针对 PR #8964 exact head cf8ea72a111a5b9085e250518eaa43337040d3fd 完成完整代码审查、全配置对照反事实实验与本地控制面套件验证(审查结论:APPROVE,无 P0/P1/P2 阻断问题;远端共有 kernel-static-checks 因基线未触及测试文件的既有 F401 失败并连带跳过下游 CI,需主干清理或 rebase 后复测方可合并)。
动机 / Motivation
受影响用户与调用方:通过未指定 --runtime-profile 的手动 CLI、通用代理循环(generic_cli)或其它非 codex_app_ssh_goal 宿主配置调用 loopx quota should-run 触发显式 Todo 选择并执行返回命令模板的调用方与代理(Agent)。
修改前(6a007683b7dd):host_goal_turn_start_args 对不在 VISIBLE_GOAL_SETTLEMENT_RUNTIME_PROFILES 中的配置(例如 --runtime-profile generic_cli、codex_app_heartbeat 或省略 --runtime-profile 的默认调用)返回空字符串 ""。当 selection_required=True 且尚未绑定 turn_instance_id 时,selection_command 生成的后续命令不含 --turn-instance-id 也不含 --begin-turn;调用方替入 {todo_id} 后直接执行,立刻被 quota should-run --todo-id 校验拒绝(exit 1:requires --turn-instance-id or --begin-turn),导致选定 Todo 无法启动回合。修改后(cf8ea72a111a):host_goal_turn_start_args 仅对 CODEX_APP_SSH_VISIBLE 返回 " --begin-turn",其余配置(含 None 与 generic_cli)均投影 " --turn-instance-id '<unique-work-iteration-id-reuse-on-retry>'",生成命令可一次绑定所选 Todo 并签发心跳回执。
可观测结果:在 exact head cf8ea72a111a5b9085e250518eaa43337040d3fd 上,None、generic_cli、codex_cli、ark_managed_agent_goal、antigravity_app、outer_controller 在未绑定时均生成带 --turn-instance-id '<unique-work-iteration-id-reuse-on-retry>' 的 selection_command 且真实执行成功绑定 todo_fixture_alternative;codex_app_ssh_goal 保持生成 --begin-turn 并正常执行;已传入 --turn-instance-id 时仍保留原 Turn ID 且不重复追加;完全省略 --turn-instance-id 与 --begin-turn 直接传 --todo-id 仍以 exit 1 被拒绝。
非目标边界:本 PR 不改变 host_goal_turn_reentry_required 的可见目标准入范围,不改变 profile is None 时 cli_channel 省略 settlement_plan 的契约,不修复主干既有 test_contract_health.py:10 的 F401,也不授予任何合并权限。
改动思路 / Approach
修复直接复用既有 host_goal_turn_start_args 单一投影所有者:仅对 SchedulerRuntimeProfile.CODEX_APP_SSH_VISIBLE 保留 " --begin-turn",其余全部已识别 SchedulerRuntimeProfile 与 profile is None(未指定 profile / 手工 CLI)统一返回宿主自持有 Turn 标识占位参数 " --turn-instance-id '<unique-work-iteration-id-reuse-on-retry>'",不引入新辅助函数、新参数或平行契约。
当前 PR 范围锁定于 loopx/control_plane/quota/spend_sources.py 的 host_goal_turn_start_args 回退分支收敛与 tests/control_plane/test_quota_settlement_cli.py 参数化端到端选择回归覆盖;未触碰 host_goal_turn_reentry_required、accountable_settlement(profile is None 无 settlement_plan 行为)以及远端主干既有的 tests/control_plane/test_contract_health.py:10 F401 lint 错误或 test_claude_goal_release_qualification.py 存量故障,亦不授予合并权限。
从控制流与所有权看,loopx/control_plane/work_items/interaction_contract.py 中的 _admitted_interaction_next_cli_actions 先由 action_portfolio_selection_command_template 拼装选单模板:当调用方已绑定 turn_instance_id 时直接携带该 --turn-instance-id;仅当 turn_instance_id is None 且存在 selection_command_template 时追加 host_goal_turn_start_args(scheduler_execution_context)。quota_request.py(L181-184)无论 runtime_profile 是否为 None,对显式 --todo-id 一律强制要求 --turn-instance-id 或 --begin-turn。因此 host_goal_turn_start_args 返回空字符串是唯一断链源;将其从“白名单外返回空”改为“除 CODEX_APP_SSH_VISIBLE 外统一返回宿主自持 Turn 占位参数”,使上游投影与下游 CLI 参数校验在全部 12 种 SchedulerRuntimeProfile 及 None 下完全闭合。
全仓 rg 确认 host_goal_turn_start_args 仅有两个调用点:interaction_contract.py:810(未绑定 selection 模板构建)与 spend_sources.py:87(host_goal_turn_reentry_action)。后者外层已由 host_goal_turn_reentry_required 严格限定在 VISIBLE_GOAL_SETTLEMENT_RUNTIME_PROFILES 内,因此 None、generic_cli 或 App 心跳等非可见目标配置的 reentry 行为保持 False/None 不变,无副作用扩散。
| 调用场景 | 修改前(6a007683b7dd) |
修改后(cf8ea72a111a) |
实际 CLI 选单结果 |
|---|---|---|---|
codex_app_ssh_goal(未绑定 Turn) |
追加 --begin-turn |
保持 --begin-turn |
exit 0,分配 guided-start:... 并绑定所选 Todo |
codex_cli / ark_managed_agent_goal(未绑定 Turn) |
追加 --turn-instance-id '<placeholder>' |
保持 --turn-instance-id '<placeholder>' |
exit 0,按调用方 ID 绑定所选 Todo |
profile=None / generic_cli / 其它 profile(未绑定 Turn) |
追加 ""(空字符串) |
追加 --turn-instance-id '<placeholder>' |
修复前 exit 1 被拒;修复后 exit 0 成功绑定 |
任意 profile(已传 --turn-instance-id) |
模板已带原 ID,不调用 host_goal_turn_start_args |
保留原 --turn-instance-id,无重复参数 |
exit 0,保留原 Turn 身份 |
具体改动 / Changes
本次 diff 仅触及 2 个文件(+17 / -7,净增 10 行,相对 base 6a007683b7dd90545a93ff7d00732c4518a21d54)。
关键代码讲解
loopx/control_plane/quota/spend_sources.py(L90-103:host_goal_turn_start_args):保留profile is SchedulerRuntimeProfile.CODEX_APP_SSH_VISIBLE -> " --begin-turn"分支,移除if profile not in VISIBLE_GOAL_SETTLEMENT_RUNTIME_PROFILES: return ""及相应注释,使除CODEX_APP_SSH_VISIBLE外的全部 profile 与None统一返回" --turn-instance-id '<unique-work-iteration-id-reuse-on-retry>'"。经校验,CODEX_CLI_VISIBLE、CLAUDE_CODE_VISIBLE、KUNLUNCODE_VISIBLE、KIRO_CLI_VISIBLE、ARK_MANAGED_AGENT_GOAL语义与原分支完全相同;CODEX_APP_SSH_VISIBLE(--begin-turn)与非 SSH App/CLI 语义严格对齐quota should-run --todo-id的契约要求。loopx/control_plane/work_items/interaction_contract.py(L800-811,未改动调用方_admitted_interaction_next_cli_actions) 与loopx/control_plane/work_items/action_selection_contract.py(L39-65,未改动action_portfolio_selection_command_template):核对确认仅当turn_instance_id is None时才拼接host_goal_turn_start_args(scheduler_execution_context),已传入--turn-instance-id时在action_portfolio_selection_command_template内已写入--turn-instance-id <id>且不进入host_goal_turn_start_args分支。loopx/control_plane/quota/spend_sources.py(L49-88,未改动兄弟函数host_goal_turn_reentry_required/host_goal_turn_reentry_action):确认host_goal_turn_reentry_action在进入host_goal_turn_start_args前先检查host_goal_turn_reentry_required(...)(仅VISIBLE_GOAL_SETTLEMENT_RUNTIME_PROFILES为True),因此profile=None与generic_cli不会意外触发可见目标重入文案或自动动作。tests/control_plane/test_quota_settlement_cli.py(L5052-5090:test_unbound_visible_goal_selection_binds_the_chosen_todo):将参数化矩阵从["codex_app_ssh_goal", "codex_cli", "ark_managed_agent_goal"]扩展为[None, "generic_cli", "codex_app_ssh_goal", "codex_cli", "ark_managed_agent_goal"],以真实子进程执行quota should-run、替换生成命令中的{todo_id}与占位符并运行生成命令,断言生成心跳回执指向ALTERNATIVE_TODO_ID、heartbeat_receipt_count == 1、spend_run_count == 0,并对profile is None显式断言settlement_plan不出现在cli_channel(对齐accountable_settlement.py:69-70既定契约)。
规范依据(spec_basis: no_spec):本片修复针对 quota should-run --todo-id(loopx/cli_commands/quota_request.py:181-184)既有参数校验与 interaction_contract 生成命令模板之间的脱节缺陷,仓库未单设独立 RFC;改动与既有 CLI 校验契约及既有可见目标 Turn 绑定测试基线一致。
对主干的风险 / Risks
- 调用面边界与负向反事实验证:全仓
rg确认host_goal_turn_start_args无第 3 个调用点。在临时隔离工作区验证了全部 12 种SchedulerRuntimeProfile及None的函数返回值,CODEX_APP_SSH_VISIBLE返回" --begin-turn",其余 12 种情况统一返回" --turn-instance-id '<unique-work-iteration-id-reuse-on-retry>'"且reentry_required对非可见目标保持False。针对none与generic_cli,通过复现基线逻辑证实6a007683b7dd会生成不带 Turn 参数的命令并在执行时以rc=1失败(requires --turn-instance-id or --begin-turn);在 exact headcf8ea72a111a上执行生成命令(涵盖none、generic_cli、codex_app_ssh_goal、codex_cli、ark_managed_agent_goal、antigravity_app、outer_controller)均exit 0绑定todo_fixture_alternative。同时验证generic_cli完整长程回合闭环(quota should-run预览 -> 执行selection_command绑定 ->refresh-state->quota spend-slot --source heartbeat --execute)全部exit 0(spent_ok=True,hb_cnt=1,sp_cnt=1);验证已绑定--turn-instance-id turn-prebound-1时不会重复追加占位符或--begin-turn;验证人工省略--turn-instance-id/--begin-turn直接传--todo-id仍被rc=1拒绝。 - 远端 CI 失败归因(
diagnostic,required=false):gh run view --job 134441122390 --log-failed显示 PR #8964 的kernel-static-checks仅在未触碰的基线测试文件tests/control_plane/test_contract_health.py:10报错(F401: loopx.paths.display_report_text imported but unused);git show 6a007683b7dd:tests/control_plane/test_contract_health.py与本地ruff check tests/control_plane/test_contract_health.py证实该错在基线已完全存在,属pre_existing_unrelated;stage2c-correctness-e2e(STAGE2C_RESULT: skipped)、checks、pytest与merge-gate均因上游kernel-static-checks阻断而被连带跳过失败。 - 下游套件实测中的既有无关故障(
diagnostic,required=false):在相关下游回归tests/test_claude_goal_release_qualification.py中,15 项(含test_real_claude_stdio_mcp_binding_and_identity_gate)全部通过,2 项(test_replan_fixture_reentry_executes_bound_vision_settlement_once、test_real_mcp_delivery_completes_and_settles_existing_plan)在goal_mode_mcp/host_adapter_settlement链路报"original Turn settlement requires --slots 1 --source visible-goal"失败;在未修改的origin/main(6844005820)同命令实测出现完全相同的 2 项失败(2 failed),且goal_mode_mcp/host_adapter_settlement经rg核验完全不经由host_goal_turn_start_args,属pre_existing_unrelated。 - 本地完整验证结果(exact head
cf8ea72a111a5b9085e250518eaa43337040d3fd):uv run --extra test python -m ruff check loopx/control_plane/quota/spend_sources.py tests/control_plane/test_quota_settlement_cli.py:PASS(All checks passed!)uv run --extra test python -m mypy loopx/control_plane/quota/spend_sources.py&uv run --extra test python -m mypy(17 个核心文件):PASS(Success: no issues found)uv run --extra test python -m pytest -n 4 -q tests/control_plane/test_quota_settlement_cli.py:PASS(210 passed in 194.45s,0 failed,0 skipped)uv run --extra test python -m pytest -q tests/control_plane/test_refresh_settle_turn.py:PASS(65 passed, 10 skipped in 271.19s,10 项为 macOS 上@pytest.mark.skipif(os.name != "nt")的 Windows PowerShell 用例,0 failed)uv run --extra test python -m pytest -q tests/control_plane/test_quota_settlement.py tests/control_plane/test_scoped_gate_explicit_choice.py tests/architecture/test_semantic_vocabulary_drift.py:PASS(221 passed, 1 skipped in 137.50s,1 项为 macOS 非 Windows skip,0 failed)uv run --extra test python -m pytest -n 4 -q tests/control_plane/test_scheduler_execution_context.py tests/control_plane/test_quota_action_portfolio.py:PASS(276 passed in 2.09s,0 failed,0 skipped)uv run --extra test loopx --format json canary premerge --tier quick --from-git-diff --git-diff-base 6a007683b7dd90545a93ff7d00732c4518a21d54:PASS(ok=true,failures=0,manual_holds=0,3/3 smokes 通过:control-plane-maintainability-ratchet-smoke.py、semantic-vocabulary-drift-smoke.py、quota-plan-smoke.py,4/4 direct checks 与py_compile通过)loopx check --scan-path ...(使用项目 registry):PASS(ok=True,errors=0, warnings=0,public boundary scan clean: 2 files)- 文本合并树预检(
git merge-tree --write-tree origin/main HEAD):clean(mergeable=MERGEABLE,mergeStateStatus=BEHIND)。
我的整体评价 / Verdict
- Long-horizon 影响:
improved— 消除了未指定 profile 或generic_cli/ 非codex_app_ssh_goal宿主在selection_required=True时生成无效selection_command导致回合前置卡死的问题,且经quota should-run -> selection -> refresh-state -> quota spend-slot全流程实测闭环;已绑定 Turn 与reentry_required语义均保持不变。 - User-experience 影响:
improved— 用户或外部脚本按控制面投影出的selection_command仅填{todo_id}与独立 Turn ID 即可直接执行并完成选单,不再遭遇系统自相矛盾的参数拒绝;visual_review为not_applicable(原因:Inspected loopx/control_plane/quota/spend_sources.py and tests/control_plane/test_quota_settlement_cli.py; CLI quota selection command template and test-only change with zero rendered UI or frontend presentation surfaces.;unverified_scope:none)。 - 可观测语义 / 兼容与范围 / 词表:
observable_semantics为intentional_change_validated(修复未绑定非 SSHselection_command缺失 Turn 参数的缺陷,其余路径严格等价),repository_reuse为reused(直接复用host_goal_turn_start_args),code_volume为necessary(净 +10 行,compatibility_assessment为retain:保留CODEX_APP_SSH_VISIBLE的--begin-turn、已绑定--turn-instance-id路径及profile is None省略settlement_plan兼容行为),default_off_isolation为not_applicable(无功能开关),authority_semantics为aligned(严格区分 SSH 服务端开局与宿主自持 Turn 标识),semantic_alignment为not_applicable(未增改共享词表、枚举或状态字面量,仅复用既定SchedulerRuntimeProfile与--turn-instance-id契约)。
代码审查层面 APPROVE exact head cf8ea72a111a5b9085e250518eaa43337040d3fd;由于远端 kernel-static-checks 仍受基线既有 test_contract_health.py:10 F401 阻断且分支当前处于 BEHIND,正式合入前仍需主干修复或 rebase 复跑远端 CI 并由维护者授权。
English verdict: APPROVE exact head cf8ea72; minimal fix in host_goal_turn_start_args ensures all non-SSH runtime profiles and unprofiled callers emit host-owned --turn-instance-id placeholders instead of rejected empty args while preserving CODEX_APP_SSH_VISIBLE --begin-turn, verified by 772 passing pytest cases (plus 11 macOS Windows-skip cases), ruff/mypy, quick premerge canary, and end-to-end CLI counterfactuals; remote CI failure is pre-existing F401 in untouched test_contract_health.py:10 and branch remains BEHIND main pending CI/merge readiness.
cf8ea72 to
ac5233b
Compare
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · Gemini · Google (self_reported)
已针对 PR #8964 exact head 8d7ce9d5869cfad702ac3a822b6362ffb9bfbe56 完成增量复审与基线对比实验:除先前的 spend_sources.py / test_quota_settlement_cli.py 两文件修改外,当前精确提交新增了 settlement_cli.py、quota_should_run.py 与 quota.py(解决 hard_lease 预选单丢失 quota_spend_source 的缺陷)。全量对照反事实测试、本地检查及 canary premerge --tier quick 均通过,未发现 P0/P1/P2 阻断缺陷;审查结论为 APPROVE(注:远端 kernel-static-checks 因未修改测试文件 tests/test_chat_manager_model_adoption.py 的既有 F811 报错并连带跳过下游 pytest 与失败 merge-gate,合并就绪门禁需在主干清理或 rebase 后复测通过)。
动机 / Motivation
使用未配置运行环境画像或通用命令行宿主运行 loopx quota should-run 选单并随后提交 Todo 认领、心跳回执及 refresh-state 结算的编排器与开发者。
改前未传 --runtime-profile 或使用 generic_cli 等非 SSH 宿主调用 quota should-run 时,生成的 selection_command 缺失 --turn-instance-id 或 --begin-turn 占位参数,运行该推荐命令会在进入工作前被校验器拒绝,同时 hard_lease 路径在认领前选单会丢失 visible-goal 扣费来源记录;改后除 codex_app_ssh_goal 继续生成 --begin-turn 外,其余宿主统一在选单命令中附带 --turn-instance-id 占位参数,并在 hard_lease 预选单阶段把执行上下文推导出的 quota_spend_source 持久化到心跳回执事件。
在精确提交 8d7ce9d 上,未画像默认路线与 generic_cli 等五类宿主生成并执行的选单命令均可通过配额校验,未显式传入 Turn 标识的 --todo-id 调用仍 fail-closed 拒绝,且 hard_lease 预选单到 refresh-state 全链路完整保留 visible-goal 扣费来源。
不放宽 quota should-run 对 --todo-id 必须携带 Turn 标识的强校验,也不改变非 SSH 宿主的 settlement_plan 生成前提或修改跨接口共享词表。
就长程执行与用户工作流连续性而言,在显式选单驱动的执行链路中,此前未画像或 generic_cli 宿主按照系统投影出的命令运行会直接报错中断,而 codex_app_ssh_goal 在 hard_lease 模式尚未认领 Todo 前做选单又会把后续 refresh-state 扣费来源误降级为 heartbeat。两处问题均直接来自同一“选单阶段尚无 settlement_plan”的边界断点。
改动思路 / Approach
复用现有的 spend_sources.py 与 settlement_cli.py 单一状态归属:host_goal_turn_start_args 将「SSH 可见 Goal 用 --begin-turn、其余宿主由调用方生成唯一 --turn-instance-id」表达为两分支总规则,并通过 _cli_rollout_details 将 scheduler_execution_context 沿 quota_should_run 与 quota.py 原有参数链传入心跳回执事件,无需新增配置文件、旁路状态表或重复校验分支。
限定为 5 个配额选单投影、心跳回执落盘与测试文件,保持已有 settlement_plan 条件与 fail-closed Turn 校验不变,可独立审核、验证与回退。
改动本身足够克制:与其在调用端拼接字符串或新增第二份配置开关,不如直接让 host_goal_turn_start_args 覆盖“非 SSH 可见 Goal 宿主即自持迭代标识”这一互补事实,并在 settlement_cli._cli_rollout_details 里把原本只在 settlement_plan 生成时才写入的 quota_spend_source 回填到选单回执事件的 rollout_details 中,从而在 todo claim 与后续 refresh-state 时读取到一致来源。
| 场景 / 运行画像 | 基线 513b6f168a 表现 |
精确头 8d7ce9d586 表现 |
对照结论 |
|---|---|---|---|
默认无 --runtime-profile / generic_cli 执行生成选单命令 |
缺 --turn-instance-id,校验拒绝 (exit 1) |
生成 --turn-instance-id 占位并成功绑定 (exit 0) |
缺陷修复 |
codex_cli / ark_managed_agent_goal 执行生成选单命令 |
生成 --turn-instance-id (exit 0) |
保持 --turn-instance-id (exit 0) |
行为保持 |
codex_app_ssh_goal 选单命令 |
生成 --begin-turn (exit 0) |
保持 --begin-turn (exit 0) |
行为保持 |
hard_lease 先选单 -> todo claim -> refresh-state |
预选单回执 quota_spend_source=None,结算误归入 heartbeat |
预选单记录 visible-goal,refresh-state 保持 visible-goal |
补齐溯源 |
--todo-id 漏传 --turn-instance-id 与 --begin-turn |
拒绝 (exit 1) |
保持 fail-closed 拒绝 (exit 1) |
约束未松动 |
具体改动 / Changes
本次变动无独立 RFC 文档作为外部前置规范(no_spec),直接以现有 quota should-run fail-closed Turn 校验约定和 interaction_contract / heartbeat_receipt 既有语义作为验收依据。
关键代码讲解
host_goal_turn_start_args(loopx/control_plane/quota/spend_sources.py:90):保留SchedulerRuntimeProfile.CODEX_APP_SSH_VISIBLE返回" --begin-turn"的特例分支,移除此前对非VISIBLE_GOAL_SETTLEMENT_RUNTIME_PROFILES返回空字符串的早退逻辑,改为统一返回" --turn-instance-id '<unique-work-iteration-id-reuse-on-retry>'"。下游唯一生产调用方interaction_contract.py:809-810在turn_instance_id is None时自动将该参数拼入选单命令模板尾部。_cli_rollout_details(loopx/control_plane/quota/settlement_cli.py:121):从原quota_rollout_details(settlement_cli.py:160)抽取cli_channel明细投影。当cli_channel.get("quota_spend_source")为空(典型于未认领 Todo 的hard_lease场景,尚无settlement_plan)但args.quota_command == "should-run"且携带todo_id或replan_obligation_id时,回退调用既有quota_spend_source_for_execution_context(scheduler_execution_context),将正确来源写入心跳回执的rollout_details。quota_rollout_details与reconcile_existing_heartbeat_receipt(_for_turn)(loopx/control_plane/quota/settlement_cli.py:64,217,160)以及入口转发quota_should_run.execute_quota_should_run(loopx/cli_commands/quota_should_run.py:474)和quota._execute_quota_command(loopx/cli_commands/quota.py:649):仅透传可选参数scheduler_execution_context(默认None),使新老调用点保持接口兼容。- 回归测试扩充(
tests/control_plane/test_quota_settlement_cli.py:5052,5107):将参数化从 3 个显式画像扩展到包含None(默认未指定画像)与generic_cli的 5 类环境,断言无画像时依然不误发settlement_plan,并新增test_visible_goal_selection_before_hard_lease_preserves_spend_source覆盖预选单 -> 认领 -> 就绪 ->refresh-state全链路并检查--source visible-goal。
对主干的风险 / Risks
经完整代码走读、反事实实验与测试检查,当前精确提交 未发现 P0/P1/P2 阻塞问题。以下评估主干边界风险与剩余未覆盖项:
- 默认态与权限/门禁隔离(
default_off_isolation&domain_neutrality):本 PR 不引入开关特性,但在未指定--runtime-profile的历史默认路径上验证了未生成多余的settlement_plan,且直接调用quota should-run --todo-id而不传--turn-instance-id或--begin-turn时仍严格以退出码 1 拒绝,不存在绕过强校验的风险;同时所有输出标志与visible-goal/heartbeat来源词均保持领域中立,不存在针对特定任务域的分支硬编码。 - 既有外部依赖与兼容性:
scheduler_execution_context在内部函数签名中均带默认值None,当未传递时quota_spend_source_for_execution_context(None)仍安全退回默认"heartbeat",不破坏历史未携带该字段的调用与回放收据。 - 独立本地验证与 CI 诊断分离:本地在精确提交
8d7ce9d586已执行:tests/control_plane/test_quota_settlement_cli.py:211 passed, 0 failedruff check(5 个变更文件)PASSpython -m mypy(17 个内核源文件)PASScanary premerge --from-git-diff --git-diff-base 513b6f168a --tier quickPASS(6 项直接检查 + 3 项精选控制面 canary 全部通过,0 失败)- 远端 GitHub CI 状态中
loopx-core、loopx-codex-provider-routing、postgresql-authority (real server)、browser (1/3..3/3)、Sign-off、build、loopx-repo-health等均通过;kernel-static-checks因本 PR 未触及的tests/test_chat_manager_model_adoption.py:416(F811 Redefinition of unused steward) 失败并导致pytest/checks/merge-gate跳过或连带失败。该外部失败与本 PR 变更路径无关,但会继续阻断 GitHub 自动合并门禁,直到主干修复或基于修复后主干 rebase。
- 残余风险:本地未单独启动真实外部 Codex App SSH 长会话进程或远端 PostgreSQL 服务器(该项由 CI
postgresql-authority (real server)已跑通);所有局部不变式均已通过真实 CLI 控制面路径与基线对照测试证明。
我的整体评价 / Verdict
综合 problem_context.outcome_impact 判定:long_horizon 为 improved(消除未画像/通用 CLI 选单首步即拒的死循环并修复 hard_lease 预选单扣费来源丢失,确保跨步骤 refresh-state 可延续),user_experience 为 improved(命令投影开箱可执行,无需人工手补参数),visual_review 为 not_applicable(仅涉及 loopx/cli_commands/quota*.py、loopx/control_plane/quota/*.py 与 pytest 控制面测试,不修改任何前端渲染页面或截图视图(inspected 5 diff paths)。)。
词表与兼容结论:完全复用现有 quota_spend_source(visible-goal / heartbeat)与 Turn 标识参数协议,未引入新的共享控制面枚举或兼容兼容分支,代码增量与问题成比例。
English verdict: APPROVE — Fixes Turn-identity projection for unprofiled/generic CLI hosts and preserves quota_spend_source before hard_lease claim without relaxing fail-closed validation; remote kernel-static-checks fails solely on an unrelated unchanged test file (tests/test_chat_manager_model_adoption.py:416) so merge readiness still waits for trunk lint green/rebase.
680757c to
54f10f2
Compare
Signed-off-by: huangruiteng <huangrt01@163.com>
Signed-off-by: huangruiteng <huangrt01@163.com>
54f10f2 to
be6c957
Compare
|
@huangruiteng @xiaods here you are: wile.ai loopx-8964.mp4 |
An unprofiled or generic CLI quota guard could require explicit Todo selection, then generate a follow-up command without
--turn-instance-idor--begin-turn. Running the supplied command was rejected by the quota validator before work began.This change projects the host-owned Turn identity placeholder for every non-SSH host when no Turn is bound. SSH visible Goals keep using
--begin-turn. Regression coverage executes the generated command for the default unprofiled route,generic_cli, Codex App SSH, Codex CLI, and ARK Managed Agent profiles.Validation:
git diff --checkpassed