fix: add reader-safe OTel server diagnostics - #383
Conversation
) * feat: trace post processing and valkey sessions * docs: align orchestrator runtime pin * docs: codify telemetry boundary * fix: normalize OTLP trace endpoint * chore: pin orchestrator telemetry fix * fix: keep provider details out of ingestion ledger * fix: propagate W3C trace context to gateway
|
Warning Review limit reachedNext included review available in 13 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (36)
📝 WalkthroughWalkthroughOpenTelemetry 관측성 경계와 선택적 OTLP 내보내기를 추가했습니다. HTTP와 Valkey 작업에 trace context를 연결했습니다. 서버 실패를 분류하고 진단 데이터와 일반화된 ChangesOpenTelemetry 관측성과 서버 진단
OIDC 로그인 반환 URL
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: 🟠 High · up to The PR adds reader-safe 503 handling and telemetry, but current paths can still misclassify local defects as provider outages and let source-gathering failures bypass the intended safe response and diagnostics. The change is not ready to merge until these production behavior issues and the required integration coverage are addressed or explicitly accepted. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ 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 |
|
Reviewed exact current head The worker redaction finding is already fixed at this head: Exact-head validation:
Please rerun the required Checks and obtain protected formal approval for |
|
Revalidated the remote Agent head and fixed the remaining contract edge: Exact current head: @claude Please review exact current head b0c9bc6. Do not modify, self-approve, or merge. |
|
Validation update for exact head 7200049: local observability, server diagnostics, HTTP transport, activity stream, analysis outbox/worker, and post-content worker tests pass (40 passed). Hosted security and product checks observed for this head are successful where completed; formal independent approval is still absent, so no merge was attempted. |
|
Exact-head validation for 7a79cfa: restored the validated OIDC return-url helper in the diagnostics branch after the latest frontend-only commit had removed it. This keeps OpenTelemetry server diagnostics while preserving safe redirect validation and storage. Local frontend lint, 140 tests, TypeScript build, Vite build, backend diagnostics/observability/HTTP/worker targeted tests 43 passed, and diff check passed. Hosted Checks are recalculating; formal independent approval is absent, so no merge was attempted. |
|
Exact-head correction for e614946: the validated OIDC return-url helper was restored on the fork PR branch, preserving redirect validation and storage alongside server diagnostics. Local frontend lint, 140 tests, TypeScript build, Vite build, backend diagnostics/observability/HTTP/worker targeted tests 43 passed, and diff check passed. Hosted Checks are recalculating; formal independent approval is absent, so no merge was attempted. |
The branch's diagnostic spans around the Valkey xread path now wrap main's fail-closed per-run AnalysisRunCreateError refusal handling, so a refused run is logged and skipped without ending the worker while the batch keeps its traced span. Also drops conflict markers that an earlier branch-side merge committed and unifies on _worker_logger.
# Conflicts: # backend/app/main.py # lineageweave/http_client.py # tests/test_http_client.py # tests/test_post_content_worker.py
# Conflicts: # lineageweave/http_client.py
There was a problem hiding this comment.
📝 Info: Worker unavailable message still names ORCHESTRATOR_ env vars to the reader*
When the chat client is unavailable at processing time, the job settles with detail "...set ORCHESTRATOR_BASE_URL / ORCHESTRATOR_API_KEY", which read_ask_job returns verbatim to the reader. The PR made the /api/ask and post-chat endpoint messages reader-safe but left this worker-side _SafeJobError unchanged, so this path still exposes config-hint text. Pre-existing and outside the diff.
(Refers to this code)
Was this helpful? React with 👍 or 👎 to provide feedback.
| "Post chat is temporarily unavailable. " | ||
| "Saved evidence is still available.", |
There was a problem hiding this comment.
🟡 Post-chat message change leaves a test asserting the old text
The malformed/transport-failure branch now raises the 503 detail "Post chat is temporarily unavailable. Saved evidence is still available.", but test_post_chat_malformed_provider_reply_is_unavailable still asserts the old "no complete evidence object" text. The test raises TypeError, which this branch rewrites to the new message, so the assertion fails against a live stack. The sibling evaluate-endpoint test was updated for its message change; this one was not.
Prompt for agents
The post-chat endpoint's 503 detail was changed to "Post chat is temporarily unavailable. Saved evidence is still available." but backend/tests/test_api.py:3759 in test_post_chat_malformed_provider_reply_is_unavailable still asserts the old detail substring "no complete evidence object". Update that assertion to match the new reader-safe message (and consider asserting the raw exception text "provider message content is not a string" does not appear), consistent with how test_evaluate_is_unavailable_without_orchestrator was updated.
Was this helpful? React with 👍 or 👎 to provide feedback.
…484) * feat: name Allen interval relations on Event Lineage edges (v2.15.0) Persist interval_relation_code on post_lineage_edge after reconstruct chooses a parent. Ticket-aware windows (created day through earliest open due date) make the A-100 pricing follow-up Contain the revised quote and Overlap the delivery question. Click Contains to open the revised quote. ADR 0122. Independent of leftover-map #481 and SKOS chips #482. * fix: restore PR 481 CI contracts * docs: remove duplicate Storybook inventory row * fix: normalize interval dates to UTC * fix: ground Event Lineage interval evidence * fix: fail closed on missing interval evidence * docs: align seeded interval claims with point evidence * test: prove activity feed requires post read * fix: resolve migration/ADR numbering collisions, drop dead i18n key - Renumber migrations/0105_post_lineage_interval_relation.sql to 0140: 0105 collides with the already-open PR #387's migrations/0105_post_lineage_edge_signal.sql on the same post_lineage_edge table. Update migrate.sh's whitelist, tests/test_schema.py, tests/test_migration_replay.py, backend/tests/test_api.py, and scripts/seed_demo_data.py to match. - Renumber docs/adr/0122-event-lineage-interval-relation.md to 0160: 0122 collides with the already-open PR #383's docs/adr/0122-otel-session-observability.md. Update every in-tree "ADR 0122" cross-reference (AGENTS.md, ARCHITECTURE.md, CLAUDE.md, CHANGELOG.d entry, the migration's SQL comment, and the seed script docstring) to ADR 0160, and note the renumber + collision in the ADR itself (see ContextualWisdomLab/.github#1249). - Drop the unused "Click Contains to open the revised quote." i18n key from all four locale dictionaries and the i18n completeness test's required-keys list -- no component ever rendered it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B5M79L945DMyMs3sg5yJ14 * docs: reserve Event Lineage ADR 0161 * test(lineage): restore dropped persist_lineage_edges coverage The prior merge of origin/main into this branch (daa9dd7) silently dropped test_persist_requires_observed_points_before_replacing_edges and its supporting imports (pytest, persist_lineage_edges, reconstruct_group_key, records_from_source_posts, Edge) while resolving the interleaved conflict in tests/test_lineage_ingestion.py. That test predates this PR's own branch and is not present on origin/main; restore it alongside the Allen-interval tests it was merged next to. * fix(lineage): compose interval evidence onto current main * test(lineage): remove arbitrary reconstruction weights * fix(migration): defer interval relation FK validation --------- Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>
Summary
maintraceparenton GET and POST; export OTLP logs when an endpoint is setEvidence
lineageweave.server.failuresuses only boundedoperation_codeandfailure_outcomemetric labelsinternal_error; exception values, prompts, responses, source bodies, credentials, actor IDs, and tenant IDs are excludedtests/test_observability.py,tests/test_http_client.py, andtests/test_server_diagnostics.pydrive the shipped configure/trace/failure-record/HTTP-propagation functions with an in-memory SDK exporter (no mocked TraceIds)Closes #361
Related to #345; its OTel implementation was cherry-picked onto current
mainbecause #345 is merged into a non-main feature branch.Summary by CodeRabbit