Skip to content

fix: remove stale observability imports#54

Merged
rlippmann merged 1 commit into
mainfrom
remove-stale-observability-imports
Jul 9, 2026
Merged

fix: remove stale observability imports#54
rlippmann merged 1 commit into
mainfrom
remove-stale-observability-imports

Conversation

@rlippmann

Copy link
Copy Markdown
Owner

Summary

Update the Python LiteLLM and Open WebUI examples to remove stale imports from the deleted context_compiler.observability module and use current public context_compiler APIs with example-local trace helpers.

Why

These examples were migrated from a late-0.7 codebase where trace rendering lived in context_compiler.observability.

context-compiler>=0.8.0 removed that module, causing Python validation to fail even though equivalent public state and decision APIs remain available.

This change preserves the optional trace experience while removing the dependency on deleted core internals.

Example metadata

  • Enforcement point: Prompt construction
  • Domain: LLM application integration
  • Technology/runtime: LiteLLM, Open WebUI
  • Example type: Example maintenance
  • Does this use directive drafter? Yes (where applicable)
  • Does this derive state from model output? 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

  • Replaced stale context_compiler.observability imports in the LiteLLM and Open WebUI examples.
  • Preserved SHOW_CONTEXT_COMPILER_TRACE behavior using example-local trace helpers.
  • Uses current public context_compiler APIs (state_diff, get_premise_value, get_policy_items, and existing decision/state data).
  • Packaging configuration and package metadata were intentionally left unchanged.
  • Validation passed:
    • targeted example tests (36 passed)
    • ./scripts/validate_python.sh (185 passed, 6 skipped)

@rlippmann rlippmann merged commit 9e7e432 into main Jul 9, 2026
6 checks passed
@rlippmann rlippmann deleted the remove-stale-observability-imports branch July 9, 2026 04:51
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