feat(runtime): integrate Python control plane adapter to Rust CLI - #24
ProfRandom92 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a Python adapter (modules/runtime/cli_adapter.py) to interface with the Rust-based ctxt CLI runtime, along with corresponding integration tests. The adapter provides functions to validate agent specifications, perform dry runs, and replay/verify logged evidence. Feedback on the changes suggests improving robustness by allowing configuration of the config path and execution timeout via environment variables, parsing both stdout and stderr for JSON error envelopes on non-zero exit codes, and skipping integration tests when the compiled Rust binary is not available.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
@coderabbitai full review |
Objective
Integrate Python control plane adapter to Rust CLI (
ctxt).Adapter Implementation & Boundaries
modules/runtime/cli_adapter.py) usingsubprocess.run(shell=False)with restricted allowlist environment (PATH,SYSTEMROOT,TEMP/TMP,COMPTEXT_*).COMPTEXT_CONFIG_PATHandCOMPTEXT_CLI_TIMEOUT.ErrorEnvelopeJSON structures from bothstderrandstdoutstreams.tests/runtime/test_cli_adapter.py) and binary integration tests (tests/runtime/test_cli_adapter_integration.py).Tests
python -m pytest).