feat: persist and explain Event Lineage channel evidence - #387
Conversation
Reconstruct already computed per-channel scores, but live Event Lineage collapsed each edge to a fused score. Persist the active signals beside each edge, return them on GET /api/lineage, and disclose exact inferred values in the Buyer DAG.
|
Warning Review limit reachedNext included review available in 50 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 selected for processing (22)
📝 WalkthroughWalkthroughEvent Lineage에 채널별 증거 저장, 원자적 재구성, 접근 제어 API 응답, DAG 표시가 추가되었습니다. 본문 변환기는 각주, 중첩 목록, Markdown 표를 처리합니다. 외부 판정과 작업자 오류 처리도 보강되었습니다. ChangesEvent Lineage 채널 근거
본문 변환과 표시
외부 판정과 작업자 오류 처리
Estimated code review effort: 5 (Critical) | ~120 minutes Merge Risk: 🟠 High · up to This PR adds persisted lineage evidence and new display behavior, but a transient database failure can permanently skip queued analysis deliveries, while schema validation, accessibility, lint, and test issues remain unresolved. Merge should wait for the delivery retry/cursor fix and cleanup of the remaining checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 31.32% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 182 functions across 30 files. (10 skipped: 10 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
|
Requesting independent Copilot review on exact head 03c1946. This is not APPROVE. Do not squash-merge without independent exact-head APPROVE plus required success. |
|
Fixed on exact current head 780fd57: restored the 0102 project-bound summary-event migration constant while retaining the new 0105 channel-evidence migration, so the real PostgreSQL schema fixture applies both in dependency order. Exact schema suite: 10 passed. @claude please review this exact head. |
|
Reproduced and fixed a current frontend Checks failure on the exact PR stack.\n\nRoot cause: the unauthenticated render branch mounted AdminPanel with accessToken typed as string but actually undefined, and retained unused OIDC helper imports. That caused TypeScript TS2322 plus oxlint no-unused-vars. The unauthenticated branch now renders only the login screen; the authenticated admin route remains unchanged, and the unused imports are removed.\n\nExact head: cd7044a. Evidence after the concurrent 780fd57 base: server focused tests 20 passed; frontend focused tests 103 passed; lint, TypeScript/Vite build, Storybook build, and git diff --check passed. No approval is asserted; rerun all Checks on this exact head. |
|
@claude Please review exact current head The rebuild adjudication fix is present in the remote Exact-head local validation: |
|
Validated on exact concurrent head. Preserved 2c47b35 and pushed 516cc55. GET /api/lineage now orders rebuild weights from common_lookup_value.display_order with a deterministic code tie-breaker, so buyer-facing and audit output do not depend on PostgreSQL row order. Rebuild and PostgreSQL import continue to pass the configured ContextualOrchestratorAdjudicationClient; no local provider call or fabricated LLM score was added. Targeted lineage/adjudication/import tests: 40 passed. Full Python suite with dev and backend extras: 768 passed, 17 skipped; 4 existing dependency warnings. git diff --check: passed. Please rerun required checks for the new exact head. |
|
@claude Please review exact current head The current ancestry now also orders persisted rebuild weights by the controlled |
|
Reconciled the current review notes on exact head 4faf9a3: (1) channel availability is run-scoped by reconstruct.active_weights, so the stored rebuild profile is uniform by contract; (2) weight_rows now join common_lookup_value and order by display_order plus signal_code, removing PostgreSQL row-order dependence; (3) the administrator rebuild and PostgreSQL import now pass the configured ContextualOrchestratorAdjudicationClient, while an unavailable gateway remains the explicit NullAdjudicationClient three-channel path. No fabricated LLM evidence is emitted. |
|
Exact-head follow-up:
Hosted Checks have restarted for this exact head. This is a review request, not an approval or merge instruction. |
|
@claude Please review exact current head |
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Exact-head b14725f keeps database owner lookup failures outside the per-delivery exception boundary, retains durable progress across one malformed provider delivery, makes channel weights required, aligns lineage viewport assertions with accessible names and stored direction, and accepts quoted or unquoted HTML footnote attributes. Verified 43 backend tests, 57 frontend tests, lint, and production build. |
# Conflicts: # frontend/src/api.ts
|
Exact-head a3acdaf composes current protected main without dropping either reconstruction provenance or focused-isolation state. Revalidated 47 backend tests, 57 frontend tests, lint, and production build; independent exact-head approval remains required. |
…as role=status Its resolved empty/unavailable state carried role="status" like sibling panels' transient loading text does, so mounting it inside the Board's collapsed Advanced Review Tools details collided with every other status region on the page (4 failing App.test.tsx assertions). RankingsPanel's own resolved placeholders carry no ARIA role for the same reason -- only the "Loading..." state announces.
# Conflicts: # CHANGELOG.md # backend/app/main.py
| adjudication_client=adjudication_client, | ||
| valkey_stream_entry_id=str(entry_id), | ||
| ) | ||
| except AnalysisRunCreateError as exc: | ||
| _worker_logger.warning( | ||
| "analysis-run %s delivery refused (%s): %s", | ||
| analysis_run_id, | ||
| exc.status_code, | ||
| exc.detail, | ||
| ) | ||
| except AnalysisRunCreateError as exc: | ||
| _worker_logger.warning( | ||
| "analysis-run %s delivery refused (%s): %s", | ||
| analysis_run_id, | ||
| exc.status_code, | ||
| exc.detail, | ||
| ) | ||
| except Exception as exc: | ||
| _worker_logger.warning( | ||
| "analysis-run %s delivery failed (error_type=%s)", | ||
| analysis_run_id, | ||
| type(exc).__name__, | ||
| ) |
There was a problem hiding this comment.
📝 Info: Worker swallows all delivery errors and advances the cursor
The broad except Exception now sits inside the per-entry loop, so any delivery failure is logged instead of ending the worker task, and last_id advances regardless. A transiently-failed run has its Valkey cursor advanced and depends on the durable outbox plus an explicit HTTP retry for recovery. Documented and a net availability improvement over the prior crash-the-worker behavior.
(Refers to this code)
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
Implements issue #274 on current
main(v2.14.0). Live Event Lineage no longer collapses a reconstructed connection to a fused score.post_lineage_edge_signalbeside eachpost_lineage_edgerow: score, the normalized active weight actually used, andweight * scorecontribution.asyncpg.executemanyso a full-corpus replacement does not make one database round-trip per row.event_lineage_rebuild+event_lineage_rebuild_channelso reconstruction version, generated-at, and the weight profile cannot silently rewrite historic evidence.lineage_signal_temporal|secondary_key|text|llm, enforced by table-level CHECK constraints. The LLM row is omitted when it did not participate; it is never fabricated.GET /api/lineagereturns additivechannel_evidence(signal_code,signal_label,score,weight,contribution,rank) ordered by contribution, then controlled signal order. ABAC never reveals evidence for an invisible endpoint.This is independent of #264 ontology-path repair, GNB, and unmerged PRs that claim ADR 0119 / 0122 / 0123 and migration 0104. Analysis-run reconstruction stays out of scope.
Head:
6bcd52f1d8b1efb76f160506e15b5fb2cea1dbf4Tests
Latest persistence regression: 23 passed; real PostgreSQL API/schema partition: 110 passed, 6 capability-gated skips.
uv run --extra dev --with asyncpg pytest tests/test_lineage_ingestion.py tests/test_lineage_channel_evidence.py tests/test_schema.py— 35 passed against real PostgreSQL.pnpm test— 157 passed in 14 files; lint and the 454.69 kB production build passed.Ruff I001/RUF022, ShellCheck,
sh -n, andgit diff --checkpassed.Merge gates
Independent exact-head APPROVE required. This request is not APPROVE. Do not squash-merge without independent APPROVE plus exact-head required success. Issues #79 and #87 stay open.
Summary by CodeRabbit
새 기능
버그 수정
문서