Skip to content

feat: add controller result helpers#167

Merged
rlippmann merged 4 commits into
mainfrom
codex/controller-helpers
Jun 3, 2026
Merged

feat: add controller result helpers#167
rlippmann merged 4 commits into
mainfrom
codex/controller-helpers

Conversation

@rlippmann
Copy link
Copy Markdown
Owner

What changed

  • added a minimal public helper set for controller result objects:
    • get_step_decision
    • get_step_state
    • get_preview_decision
    • get_preview_state_after
    • preview_would_mutate
    • diff_has_changes
  • exported the new helpers from context_compiler and added controller tests for helper behavior and importability
  • updated the README controller quick example and examples/08_controller_preview_diff.py to use the new helpers instead of teaching direct dict traversal for common reads
  • updated REPL/controller rendering internals to use the new controller accessors where that improved consistency without changing output
  • updated the conformance/public-API fixture docs so controller helper parity is an explicit cross-language target while raw controller envelope fixtures remain unchanged

Why

  • controller result envelopes are already public and stable, but the public API direction elsewhere prefers helpers for inspecting decisions and state
  • these changes make controller usage more consistent with that helper-first style while keeping the existing result dict shapes fully valid
  • the conformance docs update makes the new helper surface explicit for ports without weakening the existing raw-envelope controller contract

Checklist

  • pre-commit run (uv run pre-commit run --all-files)
  • tests pass (uv run pytest)

@rlippmann rlippmann merged commit 93a2dd8 into main Jun 3, 2026
14 checks passed
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