Skip to content

test: add Python directive drafter integration coverage#9

Merged
rlippmann merged 3 commits into
mainfrom
codex/drafter-examples
Jun 22, 2026
Merged

test: add Python directive drafter integration coverage#9
rlippmann merged 3 commits into
mainfrom
codex/drafter-examples

Conversation

@rlippmann

Copy link
Copy Markdown
Owner

Summary

Add repo-owned deterministic Python coverage for the surviving directive-drafter integration variants and wire the real workspace dependency for test execution:

  • LiteLLM with_directive_drafter
  • LiteLLM Proxy context_compiler_precall_hook_with_directive_drafter
  • Open WebUI open_webui_pipe_with_directive_drafter
  • repo pyproject.toml + uv.lock so tests use the real context-compiler-directive-drafter package

Why

This gives context-compiler-example-integrations ownership of runnable directive-drafter integration coverage before deleting duplicate runnable integrations from context-compiler and context-compiler-directive-drafter.

Example metadata

  • Enforcement point: Host-side request shaping and runtime decision handling around authoritative compiler state with optional directive drafting
  • Domain: Example and reference integration coverage migration
  • Technology/runtime: Python, pytest, LiteLLM, LiteLLM Proxy, Open WebUI
  • Example type: reference integration / repository maintenance
  • Does this use directive drafter? should normally be no: yes, intentionally for the optional variants covered here
  • Does this derive state from model output? must be no for primary examples: no

Checklist

  • Repository scaffolding / governance change
  • One primary enforcement point
  • Explicit authoritative state
  • No model-derived state mutation
  • Adversarial stub or equivalent test
  • Observable runtime behavior change
  • Domain vocabulary is natural
  • Framework is secondary to the enforcement point
  • Docs updated
  • Tests/smoke checks added where practical

Notes

Validation run:

  • ./.venv/bin/pytest python/tests/test_litellm_with_directive_drafter.py python/tests/test_litellm_proxy_with_directive_drafter.py python/tests/test_openwebui_pipe_with_directive_drafter.py
  • ./.venv/bin/pytest python/tests
  • Result: 55 passed

The tests use the real workspace context-compiler and context-compiler-directive-drafter packages. Provider/model calls remain mocked.

@rlippmann
rlippmann merged commit f83863c into main Jun 22, 2026
1 check passed
@rlippmann
rlippmann deleted the codex/drafter-examples branch June 22, 2026 06:37
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