[codex] Emit loop decision envelopes#34
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c52bad9ca2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
|
|
||
| def _context_refs(state: Mapping[str, Any]) -> list[dict[str, str]]: | ||
| context = state.get("knowledge_context") or state.get("context_pack") |
There was a problem hiding this comment.
Read the actual knowledge context pack
When knowledge context is enabled, the loop stores the pack under state["knowledge_context_pack"] (see build_feature_state) and GraphState only defines that key, but this helper looks for knowledge_context/context_pack instead. In those runs the new envelope's retrieved_context and context-derived evidence_refs are always empty, dropping the source metadata the decision envelope is meant to carry for replay/audit; read knowledge_context_pack here and handle its included_refs shape.
Useful? React with 👍 / 👎.
Summary
LoopDecisionEnvelopetrace event to Engineering Loop trace emissionValidation
uvx ruff check src testsuv run --group dev mypy --strict srcuv run --group dev python -m pytest -q