Repository navigation
G10 durable runtime observability correlation - #207
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR propagates runtime correlation identifiers into observability spans by adding safe, low-cardinality correlation attributes (tape_id, turn_id, run_id) to pipeline stage and LLM generation spans, filtering trace_metadata by allowlist, and enriching session root run binding with trace metadata—while preserving OTLP/Langfuse privacy filtering that excludes sensitive fields. ChangesDurable Runtime Observability Correlation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
coding-agent/tests/coding_agent/test_observability.py (1)
94-98: ⚡ Quick winStrengthen privacy assertion with structured key checks.
Current checks only validate sentinel values are absent from the serialized body. Add assertions that denylisted attribute keys are not present in exported span attributes to catch key-leak regressions too.
Proposed test-hardening diff
body = request.read().decode() assert "llm.generation" in body assert "input_tokens" in body assert "do-not-send" not in body assert "content-do-not-send" not in body assert "message-do-not-send" not in body assert "result-do-not-send" not in body assert "secret-do-not-send" not in body assert "text-do-not-send" not in body + span = _first_span(_payload(request)) + exported_keys = { + item["key"] + for item in span.get("attributes", []) + if isinstance(item, dict) and isinstance(item.get("key"), str) + } + assert {"content", "message", "result", "secret", "text", "prompt"}.isdisjoint( + exported_keys + )🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@coding-agent/tests/coding_agent/test_observability.py` around lines 94 - 98, Add assertions to the test that not only check sentinel values are absent from the serialized body but also verify the denylisted attribute keys are not present in exported span attributes: after the existing body checks, iterate the exported spans (e.g., the variable holding exported span payloads or each span's .attributes) and assert that keys "content", "message", "result", "secret", and "text" are not in any span.attributes keys to prevent key-leak regressions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@coding-agent/.opencode/prompts/tasks/durable-runtime-observability-correlation.md`:
- Around line 36-41: Update the "Target tests:" block to match PR verification
steps by adding the missing full-suite and observability tests and the ruff
format check: include `uv run pytest tests/agentkit/runtime/test_pipeline.py
-v`, `uv run pytest tests/agentkit/observability/test_core.py -v`, add the `uv
run ruff format --check ...` command used in PR verification, and ensure the `uv
run ruff check` command's file list includes
`tests/coding_agent/test_observability.py`; edit the Target tests section (the
"Target tests:" header and its bullet list) to add these exact commands so the
task definition and PR verification steps are synchronized.
---
Nitpick comments:
In `@coding-agent/tests/coding_agent/test_observability.py`:
- Around line 94-98: Add assertions to the test that not only check sentinel
values are absent from the serialized body but also verify the denylisted
attribute keys are not present in exported span attributes: after the existing
body checks, iterate the exported spans (e.g., the variable holding exported
span payloads or each span's .attributes) and assert that keys "content",
"message", "result", "secret", and "text" are not in any span.attributes keys to
prevent key-leak regressions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1aeeed9f-6bb7-49a2-8fdb-f01ac34ed738
📒 Files selected for processing (7)
coding-agent/.opencode/prompts/tasks/durable-runtime-observability-correlation.mdcoding-agent/docs/durable_runtime/GOAL_PROGRESS.mdcoding-agent/src/agentkit/runtime/pipeline.pycoding-agent/src/coding_agent/ui/session_manager.pycoding-agent/tests/agentkit/runtime/test_pipeline.pycoding-agent/tests/coding_agent/test_observability.pycoding-agent/tests/ui/test_session_manager_runtime.py
Summary
Verification
Summary by CodeRabbit
Release Notes
New Features
Documentation
Tests