Skip to content

Compact start-goal host selection gate - #8582

Merged
cocolord merged 1 commit into
mainfrom
codex/start-goal-default-gate-20261111
Nov 11, 2026
Merged

cocolord merged 1 commit into
mainfrom
codex/start-goal-default-gate-20261111

Conversation

@cocolord

@cocolord cocolord commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Compact the default loopx start-goal --guided host-selection gate to common host surfaces instead of rendering the full host matrix on first contact.
  • Keep omitted host surfaces reachable through full_choices_detail_command, which reruns the same read-only gate with --include-command-pack-detail.
  • Update the guided-start markdown renderer, host-surface probes, compact-projection coverage, and protocol docs for the compact/default versus complete/detail contract.

Readback

  • Default JSON gate now reports choice_projection=compact, 7 visible choices, omitted_choice_count=14, and a non-null detail command.
  • Default packet duplication readback for Improve the README quick start: serialized bytes 14250, objective occurrences 36, command occurrences 32.
  • Markdown first screen now uses Choose Where This Agent Runs and ends with Need another host (14 more)? instead of listing every host by default.

Validation

  • uv run --extra test ruff check loopx/bootstrap_command_pack.py loopx/presentation/renderers/start_goal_markdown.py tests/control_plane/test_start_goal_compact_projection.py tests/host_surface_cli_probes.py
  • uv run --extra test pytest tests/control_plane/test_start_goal_compact_projection.py -q (77 passed)
  • uv run --extra test pytest tests/test_gemini_cursor_host_surfaces.py tests/test_kiro_cli_host_surface.py tests/test_zcode_host_surface.py tests/test_agy_host_surface.py -q (49 passed)
  • uv run --extra test pytest tests/control_plane/test_cli_output_budget.py -q (46 passed, 1 skipped)
  • uv run --extra test loopx canary premerge --from-git-diff --git-diff-base origin/main at 56402b7a4712b2a3213b638308aee4f1d492dfe3 (passed, 15 selected, 0 failures)

@mergify

mergify Bot commented Nov 11, 2026

Copy link
Copy Markdown

This pull request has merge conflicts with main and cannot be merged
until they are resolved. Please rebase or merge the base branch, @cocolord.

Choose the remote for the base repository, not an out-of-date fork.
For a fork clone, first inspect git remote -v; upstream must point
to https://github.com/loopx-project/loopx.git. If it is absent, add it
with git remote add upstream https://github.com/loopx-project/loopx.git.
Then run:

git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEAD

For a same-repository clone whose origin points to
https://github.com/loopx-project/loopx.git, use origin instead of
upstream for fetch/rebase. If you prefer merging the base, use
git merge <base-remote>/main and push normally.

Keep the DCO Signed-off-by trailer on every commit when you rebase.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Nov 11, 2026
@cocolord
cocolord force-pushed the codex/start-goal-default-gate-20261111 branch from 3372257 to b576477 Compare November 11, 2026 07:39
@mergify mergify Bot removed the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Nov 11, 2026
@cocolord
cocolord force-pushed the codex/start-goal-default-gate-20261111 branch from b576477 to 8f7a693 Compare November 11, 2026 07:45

@cocolord cocolord left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Reviewer: model_agent; model GPT-5; provider TRAE; declaration_source self_reported

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机 / Motivation

首次用 loopx start-goal --guided 从一句自然语言目标启动工作的 CLI 用户。 Before: 省略 --host-surface 时第一屏直接展开完整 host 矩阵和大量 rerun 命令;After: 默认只显示常见 host,并用 detail command 展开其余 host。 默认 gate 仍然 read-only,但 JSON choice_projection=compact、7 个默认 choices、omitted_choice_count=14,完整清单通过 --include-command-pack-detail 可达。 本 PR 不自动猜测当前 host、不激活 loop、不写 registry/state/todo,也不改变已显式 --host-surface 的启动路径。 这个改动回应的不是单纯删词,而是把默认入口的注意力从完整运行时矩阵拉回“先说目标,再选择当前常见运行位置”。我按 exact head 8f7a69373d39d84a459c448c14b4cbaaa02031bc 检查了 diff、真实 CLI readback 和协议文档;PR 边界是一个可独立回滚的 host-selection projection 变更。

改动思路 / Approach

保留现有 start-goal host-selection owner,只把默认投影从完整列表改为 compact,并把完整列表作为同一 read-only gate 的 detail projection;current_pr_boundary 是 guided-start host gate 的投影与 markdown 呈现,不扩大到自动 host detection。 current_pr_boundary: guided-start host gate 的 compact/default 和 complete/detail projection;不改变 host activation、quota、todo 写入或显式 host-surface 路径。 具体路径是 build_start_goal_host_surface_selection_packet 继续产生同一个 read-only gate,但默认 choices 只保留 codex-app、trae_app、codex-app-ssh、codex-cli-tui、claude-code、shell、other-agent;full_choices_detail_command 负责恢复完整矩阵。renderer owner 已在最新 main 拆到 loopx/presentation/renderers/start_goal_markdown.py,本 PR把标题改为 Choose Where This Agent Runs 并追加 Need another host detail path,没有复制旧 renderer。更小的做法是只改文案,但那不会减少默认 choice/command 体积;更大的自动检测 host 暂时没有必要,也会引入错误归属风险。

具体改动 / Changes

规格依据:docs/reference/protocols/codex-app-host-command-registry-v0.md at bcf1b6363f70487ab21dfaec34c5eda14b9db226。我按两个 criterion 检查:HS-READONLY 要求 omitted --host-surface 时返回 read-only gate,不连接项目、不写 todos、不激活 host、不花 quota;此 head 仍由 safety_contract 和 host-selection blocked path 保持。HS-RERUN-DETAIL 要求 host 可以通过 exact rerun command 到达;此 head 对默认 choices 保留直接 rerun command,对省略的 host 通过 full_choices_detail_command 加 --include-command-pack-detail 展开完整清单。关键代码一是 loopx/bootstrap_command_pack.py::build_start_goal_host_surface_selection_packet,它新增 DEFAULT_HOST_SURFACE_SELECTION_CHOICES、choice_projection、omitted_choice_count 和 detail command。关键代码二是 loopx/presentation/renderers/start_goal_markdown.py::render_start_goal_guided_markdown,它消费这些字段来呈现 compact 标题和展开提示。关键代码三是 tests/host_surface_cli_probes.py::selection_gate_offers_surface,当目标 surface 不在默认 gate 时会执行 detail command 再验证 rerun command 可执行,覆盖了 gemini-cli、kiro-cli、zcode、agy 和 antigravity-app 等非默认 surface。

对主干的风险 / Risks

主风险是默认 JSON/markdown 消费者依赖完整 choices 列表;本 PR通过 --include-command-pack-detail 明确迁移路径,并在协议文档写明 compact/default 与 complete/detail 的区别。负向路径已覆盖:默认 compact gate 找不到非默认 host 时,测试 helper 会执行 full_choices_detail_command,确认完整 gate 的 choice_projection=complete 且对应 host 的 rerun command 仍然返回该 host surface。验证矩阵为 PASS:ruff passed;compact projection pytest 77 passed;host-surface probes 49 passed;CLI output budget 46 passed, 1 skipped;premerge at 8f7a69373d39d84a459c448c14b4cbaaa02031bc 15 selected, 0 failures。远端 CI 在 review 时仍有 pending/BEHIND 的 merge-readiness 风险,所以这是 review 结论,不是 merge-readiness 许可。

我的整体评价 / Verdict

我没有发现 blocking finding。long_horizon 影响是 improved,因为默认入口更少重复目标文本和 rerun commands,用户更容易从自然语言目标继续到真实启动;user_experience 影响也是 improved,但 CLI markdown text render was inspected via command readback; no browser/page visual surface is affected. No screenshot inspection; rendered CLI markdown and JSON packet were checked instead. observable_semantics 是 intentional_change_validated:默认文字和 choices 有意变化,read-only、安全和 detail reachability 保持。新增字段是对既有 loopx_host_surface_selection_gate_v0 的 justified extension,而不是新的 authority model;authority_semantics aligned,因为这些字段只描述投影和展开,不授予 host activation 或写入权限。残余风险是远端 branch protection/CI 仍需 merge-readiness 最终确认。

English verdict: APPROVE exact head 8f7a693; no blocking finding, with merge readiness still separate for pending/behind remote state.

@cocolord
cocolord force-pushed the codex/start-goal-default-gate-20261111 branch from 8f7a693 to 6dd4bb7 Compare November 11, 2026 08:04
Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
@cocolord
cocolord force-pushed the codex/start-goal-default-gate-20261111 branch from 6dd4bb7 to 56402b7 Compare November 11, 2026 08:10

@cocolord cocolord left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Reviewer: model_agent; model GPT-5; provider TRAE; declaration_source self_reported

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机 / Motivation

首次用 loopx start-goal --guided 从一句自然语言目标启动工作的 CLI 用户。 Before: 省略 --host-surface 时第一屏直接展开完整 host 矩阵和大量 rerun 命令;After: 默认只显示常见 host,并用 detail command 展开其余 host。 默认 gate 仍然 read-only,但 JSON choice_projection=compact、7 个默认 choices、omitted_choice_count=14,完整清单通过 --include-command-pack-detail 可达。 本 PR 不自动猜测当前 host、不激活 loop、不写 registry/state/todo,也不改变已显式 --host-surface 的启动路径。 这个改动回应的不是单纯删词,而是把默认入口的注意力从完整运行时矩阵拉回“先说目标,再选择当前常见运行位置”。我按 exact head 56402b7a4712b2a3213b638308aee4f1d492dfe3 检查了 diff、真实 CLI readback 和协议文档;PR 边界是一个可独立回滚的 host-selection projection 变更。

改动思路 / Approach

保留现有 start-goal host-selection owner,只把默认投影从完整列表改为 compact,并把完整列表作为同一 read-only gate 的 detail projection;current_pr_boundary 是 guided-start host gate 的投影与 markdown 呈现,不扩大到自动 host detection。 current_pr_boundary: guided-start host gate 的 compact/default 和 complete/detail projection;不改变 host activation、quota、todo 写入或显式 host-surface 路径。 具体路径是 build_start_goal_host_surface_selection_packet 继续产生同一个 read-only gate,但默认 choices 只保留 codex-app、trae_app、codex-app-ssh、codex-cli-tui、claude-code、shell、other-agent;full_choices_detail_command 负责恢复完整矩阵。renderer owner 已在最新 main 拆到 loopx/presentation/renderers/start_goal_markdown.py,本 PR把标题改为 Choose Where This Agent Runs 并追加 Need another host detail path,没有复制旧 renderer。更小的做法是只改文案,但那不会减少默认 choice/command 体积;更大的自动检测 host 暂时没有必要,也会引入错误归属风险。

具体改动 / Changes

规格依据:docs/reference/protocols/codex-app-host-command-registry-v0.md at 6d6439c0148c04c9f4c2dd71a74db151a9b33424。我按两个 criterion 检查:HS-READONLY 要求 omitted --host-surface 时返回 read-only gate,不连接项目、不写 todos、不激活 host、不花 quota;此 head 仍由 safety_contract 和 host-selection blocked path 保持。HS-RERUN-DETAIL 要求 host 可以通过 exact rerun command 到达;此 head 对默认 choices 保留直接 rerun command,对省略的 host 通过 full_choices_detail_command 加 --include-command-pack-detail 展开完整清单。关键代码一是 loopx/bootstrap_command_pack.py::build_start_goal_host_surface_selection_packet,它新增 DEFAULT_HOST_SURFACE_SELECTION_CHOICES、choice_projection、omitted_choice_count 和 detail command。关键代码二是 loopx/presentation/renderers/start_goal_markdown.py::render_start_goal_guided_markdown,它消费这些字段来呈现 compact 标题和展开提示。关键代码三是 tests/host_surface_cli_probes.py::selection_gate_offers_surface,当目标 surface 不在默认 gate 时会执行 detail command 再验证 rerun command 可执行,覆盖了 gemini-cli、kiro-cli、zcode、agy 和 antigravity-app 等非默认 surface。

对主干的风险 / Risks

主风险是默认 JSON/markdown 消费者依赖完整 choices 列表;本 PR通过 --include-command-pack-detail 明确迁移路径,并在协议文档写明 compact/default 与 complete/detail 的区别。负向路径已覆盖:默认 compact gate 找不到非默认 host 时,测试 helper 会执行 full_choices_detail_command,确认完整 gate 的 choice_projection=complete 且对应 host 的 rerun command 仍然返回该 host surface。验证矩阵为 PASS:ruff passed;compact projection pytest 77 passed;host-surface probes 49 passed;CLI output budget 46 passed, 1 skipped;premerge at 56402b7a4712b2a3213b638308aee4f1d492dfe3 15 selected, 0 failures。远端 CI 在 review 时仍有 pending/BEHIND 的 merge-readiness 风险,所以这是 review 结论,不是 merge-readiness 许可。

我的整体评价 / Verdict

我没有发现 blocking finding。long_horizon 影响是 improved,因为默认入口更少重复目标文本和 rerun commands,用户更容易从自然语言目标继续到真实启动;user_experience 影响也是 improved,但 CLI markdown text render was inspected via command readback; no browser/page visual surface is affected. No screenshot inspection; rendered CLI markdown and JSON packet were checked instead. observable_semantics 是 intentional_change_validated:默认文字和 choices 有意变化,read-only、安全和 detail reachability 保持。新增字段是对既有 loopx_host_surface_selection_gate_v0 的 justified extension,而不是新的 authority model;authority_semantics aligned,因为这些字段只描述投影和展开,不授予 host activation 或写入权限。残余风险是远端 branch protection/CI 仍需 merge-readiness 最终确认。

English verdict: APPROVE exact head 56402b7; no blocking finding, with merge readiness still separate for pending/behind remote state.

@cocolord
cocolord merged commit df5f37e into main Nov 11, 2026
5 of 9 checks passed
@cocolord
cocolord deleted the codex/start-goal-default-gate-20261111 branch November 11, 2026 08:18
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.

1 participant