Skip to content

feat(runtime): add host adapter gate#12

Merged
t3chn merged 2 commits into
mainfrom
codex/rust-host-adapter
Jun 24, 2026
Merged

feat(runtime): add host adapter gate#12
t3chn merged 2 commits into
mainfrom
codex/rust-host-adapter

Conversation

@t3chn

@t3chn t3chn commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add Rust cak-host-adapter crate that maps runtime decisions to host-facing outcomes.
  • Add cakrt gate proposal evaluation with optional enforced deny exit code.
  • Add a thin Python skill launcher plus docs and tests for the adapter boundary.
  • Add a local prek gate that mirrors the PR checks so ruff, mypy, pytest, demo smoke, docs, and Rust checks run before commit.

Issue

  • N/A

Test plan

  • prek run --all-files
  • cargo fmt --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • python3 scripts/check_docs.py
  • python3 -m ruff check src tests scripts examples
  • python3 -m mypy src --show-error-codes --pretty
  • python3 -m pytest
  • PYTHONPATH=src python3 examples/v0_1/demo.py

CI

  • validate-docs: pass
  • python-checks: pass
  • rust-checks: pass

t3chn added 2 commits June 24, 2026 18:42
Why:
- Provide a canonical Rust boundary for host pre-execution gating.
- Keep Python wrappers as launchers only while v0 input semantics stay aligned with the runtime request contract.

What changed:
- Add a cak-host-adapter crate that maps runtime decisions to host-facing outcomes.
- Add cakrt gate --proposal with optional enforced deny exit code.
- Add a thin Python launcher plus docs and tests for the adapter boundary.

Testing:
- cargo fmt --check
- cargo clippy --workspace --all-targets -- -D warnings
- cargo test --workspace
- python3 scripts/check_docs.py
- python3 -m pytest

Not tested:
- Live host integration with Codex/Claude/Aider/Vibe adapters is not wired yet.

Risk:
- narrow - v0 proposal input intentionally reuses EvalRequest; a future host-specific schema may need a compatibility adapter.
Why:
- PR python-checks failed because local verification skipped the CI ruff and mypy path.
- Add a single local gate so future commits can run the same check surface before push.

What changed:
- Add a local prek config that mirrors docs, Python, Rust, and demo smoke CI checks.
- Fix the new Python shim test to satisfy the existing ruff rules.

Testing:
- python3 -m ruff check src tests scripts examples
- python3 -m mypy src --show-error-codes --pretty
- prek validate-config .pre-commit-config.yaml
- prek run --all-files

Risk:
- narrow - local hooks use system tools, so contributors need the same Python/Rust tooling installed to run the full gate.
@t3chn t3chn marked this pull request as ready for review June 24, 2026 16:38
@t3chn t3chn merged commit 741d049 into main Jun 24, 2026
3 checks passed
@t3chn t3chn deleted the codex/rust-host-adapter branch June 24, 2026 16:53
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