Skip to content

feat(client): expose host capability discovery via actions:list for issue #135 - #158

Merged
bouillipx merged 2 commits into
mainfrom
codex/client-capability-discovery-and-host-tests
Mar 3, 2026
Merged

feat(client): expose host capability discovery via actions:list for issue #135#158
bouillipx merged 2 commits into
mainfrom
codex/client-capability-discovery-and-host-tests

Conversation

@bouillipx

Copy link
Copy Markdown
Collaborator

Summary

This PR implements Slice D of issue #135.

It adds explicit capability discovery to the CLI host protocol surface and freezes the related host-protocol regressions:

  • expose actions:list through run/script --headless --control-stdin
  • keep discovery explicit and scoped to the current CLI host bridge surface
  • add integration coverage for run/script discovery, coexistence with existing control actions, and the no-startup-handshake constraint

Why

After Slice C, hosts could control a running headless session but still needed a hardcoded action matrix.

This PR closes the remaining protocol gap without expanding the transport model:

  • no unsolicited startup handshake
  • no richer metadata schema yet
  • no new control channel

The host explicitly asks for actions:list and receives the current canonical action surface in structured form.

Scope

Included in this PR:

  • actions:list host bridge in client/main.py
  • Slice D integration tests in tests/integration/test_client_cli_flow.py
  • canonical doc updates in client/DESIGN.md and client/README.md
  • task / evidence / TODO sync for client-capability-discovery-and-host-tests

Not included in this PR:

  • unsolicited startup capability handshake
  • richer discovery metadata beyond canonical action ids
  • any new network control plane

TODO / Change Mapping

  • Change:
    • client-capability-discovery-and-host-tests
  • TODOs covered:
    • CCLI-007
    • CCLI-008

Validation

Executed:

  • ../../.venv/bin/python -m pytest tests/unit/test_client_cli.py -q
  • ../../.venv/bin/python -m pytest tests/integration/test_client_cli_flow.py -q
  • openspec list
  • openspec validate client-capability-discovery-and-host-tests --type change --strict --json --no-interactive
  • ./scripts/ci/check_governance_evidence_truth.sh

Results:

  • unit CLI suite passes (45 tests)
  • integration CLI flow suite passes (25 tests)
  • Slice D change validates with 0 issues
  • governance evidence truth passes

Review Focus

Please focus on:

  • whether actions:list is correctly scoped to the CLI host bridge surface instead of the full runtime action universe
  • whether the no-startup-handshake constraint is documented and tested clearly enough
  • whether the new discovery tests freeze the right protocol behavior without over-constraining future expansion

Implement the Slice D capability-discovery baseline for Issue #135 by exposing explicit actions:list discovery over the existing headless control-stdin surface.

Key changes:
- add a dedicated CLI host-surface helper in client/main.py and route actions:list locally instead of delegating discovery to the runtime action dispatcher
- keep the host discovery result scoped to the actual CLI host protocol surface, including approvals, MCP, skills, status:get, and actions:list itself
- add integration coverage for run/script actions:list, coexistence with existing control actions, and the no-startup-handshake constraint
- update client/DESIGN.md and client/README.md to mark explicit discovery as landed while keeping unsolicited startup handshake out of v1
- sync Slice D tasks, feature evidence, and the host-orchestration master TODO with implementation progress and fresh verification results

Rationale:
After Slice C, hosts could control a running headless session but still needed a hardcoded action matrix. This commit closes that gap without expanding the transport protocol: discovery stays explicit, deterministic, and constrained to the current CLI host bridge rather than exposing every runtime action by accident.
Update the Slice D feature evidence doc with the implementation branch push result and the live implementation PR link.

Key changes:
- add the git push command/result for codex/client-capability-discovery-and-host-tests
- link implementation PR #158 from the review and merge-gate evidence section
- rerun governance evidence truth after the evidence update

Rationale:
The feature aggregation doc is the audit source for the Slice D review gate. Once the implementation PR exists, the evidence doc should point at it directly so review history and merge-gate state remain discoverable without reconstructing branch events from git or GitHub history.
@bouillipx

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@bouillipx
bouillipx merged commit 9f8f992 into main Mar 3, 2026
8 checks passed
@bouillipx
bouillipx deleted the codex/client-capability-discovery-and-host-tests branch March 3, 2026 01:32
bouillipx added a commit that referenced this pull request Mar 3, 2026
Archive the completed client-capability-discovery-and-host-tests change and close the Issue #135 host orchestration initiative.\n\nKey changes:\n- archive the Slice D OpenSpec change under openspec/changes/archive/2026-03-03-client-capability-discovery-and-host-tests\n- move the Slice D feature aggregation doc into docs/features/archive and update its evidence with the final archive and spec-validation commands\n- move the Issue #135 gap analysis and master TODO into docs/todos/archive, mark them archived, and mark CCLI-007/008 plus claim CLM-20260302-CCLI-D done\n- update docs/todos/README.md to point at the archived Issue #135 records\n- sync the Slice D capability-discovery delta back into openspec/specs/client-host-orchestration/spec.md so the main spec now requires explicit actions:list discovery and no unsolicited startup handshake\n\nRationale:\nPR #158 merged the final implementation slice for Issue #135. The repository was still carrying Slice D as an active change, the feature doc as an active record, and the Issue #135 governance TODOs as active ledgers. This commit completes the mandatory completion-archive checkpoint so docs/** and openspec/** agree that the client host orchestration initiative is closed.
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