Skip to content

feat(dashboard): complete governed semantic evidence paths - #614

Merged
seonghobae merged 42 commits into
mainfrom
feat/dashboard-live-evidence
Aug 25, 2026
Merged

feat(dashboard): complete governed semantic evidence paths#614
seonghobae merged 42 commits into
mainfrom
feat/dashboard-live-evidence

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace Global Ask keyword/FTS retrieval with whole-question contextual-orchestrator embeddings over persisted semantic units, with ABAC/process scope/event time before ranking and no lexical fallback
  • add live per-post Similar VOC adjudication with bilateral extractive evidence, customer cohort, and prior action history without arbitrary scores or Event Lineage weights
  • add inclusive native Dashboard period controls, preserve shared-post deep links, and refresh ADR/gap evidence
  • promote only exact accepted TEPP criterion artifacts onto matching fast-mlsirm Event Lineage vectors

Measurement boundary

Verification

  • 95 focused Python tests passed before current-main reconciliation; 81 post-reconciliation focused tests passed except one process-scope test, repaired and re-run with its semantic/time peers (3 passed)
  • frontend focused tests: 8 passed
  • frontend lint/build and Storybook build passed
  • desktop Dashboard and Similar VOC Storybook screenshots visually audited with synthetic data

PR #606 is merged; this PR now targets protected main directly.

Summary by CodeRabbit

  • 새 기능
    • 운영 대시보드에서 기간별 운영 지표, 사례 유형, 근거 자료를 확인할 수 있습니다.
    • 게시물 상세 화면에서 의미적으로 유사한 VOC와 근거, 고객군, 조치 이력을 조회할 수 있습니다.
    • Global Ask 검색이 의미 기반으로 개선되고 관련 게시물의 계보 범위를 확장합니다.
    • Ask 답변에 보고서, 인용 근거, 알림 전달 정보가 표시됩니다.
  • 개선 사항
    • 운영 사례가 원문 근거와 함께 검증·저장됩니다.
    • 근거가 불충분하거나 권한이 없는 콘텐츠는 결과에서 제외됩니다.
  • 문서화
    • 대시보드, 검색 및 근거 데이터 처리 기준을 관련 문서에 반영했습니다.

seonghobae and others added 19 commits August 25, 2026 16:53
…hor-consumer

# Conflicts:
#	backend/app/analysis_run_start.py
…perations-dashboard

# Conflicts:
#	docs/adr/README.md
…ions-dashboard

feat(dashboard): add evidence-grounded operations workspace
# Conflicts:
#	backend/app/lineage_ingestion.py
#	backend/app/main.py
#	docs/product-technical-gap-baseline.md
#	frontend/src/App.tsx
…r' into feat/dashboard-live-evidence

# Conflicts:
#	backend/app/post_chat_ingestion.py
#	backend/tests/test_api.py
#	docs/product-technical-gap-baseline.md
#	frontend/src/App.tsx
#	tests/test_global_ask_sources.py
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

Next included review available in 27 minutes.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5a2a65c1-187f-4878-99a7-2c7efa66055d

📥 Commits

Reviewing files that changed from the base of the PR and between 002d1d5 and 3e3b3ee.

📒 Files selected for processing (42)
  • ARCHITECTURE.md
  • backend/app/lineage_ingestion.py
  • backend/app/main.py
  • backend/app/operations_case_ingestion.py
  • backend/app/operations_dashboard.py
  • backend/app/post_chat_ingestion.py
  • backend/app/post_content_worker.py
  • backend/tests/test_similar_voc_api.py
  • docs/adr/0090-global-ask-lineage-timeline-expansion.md
  • docs/adr/0150-korean-relative-time-retrieval.md
  • docs/adr/0206-evidence-operations-dashboard.md
  • docs/adr/0208-externalize-local-mathematical-compute.md
  • docs/adr/0210-temporal-topic-context-influence-dashboard.md
  • docs/adr/README.md
  • docs/doctoring/python-mathematical-compute-boundary-audit.md
  • docs/product-technical-gap-baseline.md
  • docs/storybook-inventory.md
  • docs/temporal-topic-context-influence-research.md
  • frontend/src/App.css
  • frontend/src/App.test.tsx
  • frontend/src/App.tsx
  • frontend/src/api.ts
  • frontend/src/components/OperationsDashboard.stories.tsx
  • frontend/src/components/OperationsDashboard.test.tsx
  • frontend/src/components/OperationsDashboard.tsx
  • frontend/src/components/SimilarVocPanel.stories.tsx
  • frontend/src/components/SimilarVocPanel.test.tsx
  • frontend/src/components/SimilarVocPanel.tsx
  • frontend/src/components/WorkspaceCalendar.tsx
  • frontend/src/i18n.ts
  • lineageweave/operations_case_analysis.py
  • lineageweave/similar_voc.py
  • migrations/0209_operations_case_evidence_source.sql
  • migrations/rollback/0209_operations_case_evidence_source.sql
  • tests/test_global_ask_sources.py
  • tests/test_lineage_ingestion.py
  • tests/test_math_boundary_inventory.py
  • tests/test_operations_case_analysis.py
  • tests/test_operations_case_ingestion.py
  • tests/test_operations_dashboard.py
  • tests/test_post_content_worker.py
  • tests/test_similar_voc.py
ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bb480da6-3ee5-40cf-8f9b-8156e0c24435

📥 Commits

Reviewing files that changed from the base of the PR and between 3f47348 and 002d1d5.

📒 Files selected for processing (51)
  • backend/app/analysis_run_start.py
  • backend/app/global_ask_queue.py
  • backend/app/lineage_ingestion.py
  • backend/app/main.py
  • backend/app/operations_case_ingestion.py
  • backend/app/operations_dashboard.py
  • backend/app/post_chat_ingestion.py
  • backend/app/post_content_worker.py
  • backend/tests/test_api.py
  • backend/tests/test_similar_voc_api.py
  • docs/adr/0047-global-ask-semantic-retrieval.md
  • docs/adr/0090-global-ask-lineage-timeline-expansion.md
  • docs/adr/0145-psychometric-channel-weight-estimation.md
  • docs/adr/0150-korean-relative-time-retrieval.md
  • docs/adr/0200-channel-weight-reconciliation.md
  • docs/adr/0205-tepp-lineage-anchor.md
  • docs/adr/0206-evidence-operations-dashboard.md
  • docs/adr/README.md
  • docs/product-technical-gap-baseline.md
  • docs/storybook-inventory.md
  • frontend/src/App.css
  • frontend/src/App.test.tsx
  • frontend/src/App.tsx
  • frontend/src/api.test.ts
  • frontend/src/api.ts
  • frontend/src/components/OperationsDashboard.stories.tsx
  • frontend/src/components/OperationsDashboard.test.tsx
  • frontend/src/components/OperationsDashboard.tsx
  • frontend/src/components/SimilarVocPanel.css
  • frontend/src/components/SimilarVocPanel.stories.tsx
  • frontend/src/components/SimilarVocPanel.test.tsx
  • frontend/src/components/SimilarVocPanel.tsx
  • frontend/src/components/WorkspaceNav.test.tsx
  • frontend/src/gnbChrome.ts
  • frontend/src/i18n.test.ts
  • frontend/src/styles/tokens.css
  • lineageweave/ask_delivery.py
  • lineageweave/operations_case_analysis.py
  • lineageweave/similar_voc.py
  • migrations/0207_lineage_weight_tepp_anchor.sql
  • migrations/0208_operations_case_analysis.sql
  • migrations/rollback/0207_lineage_weight_tepp_anchor.sql
  • tests/test_analysis_run_start.py
  • tests/test_ask_delivery.py
  • tests/test_global_ask_sources.py
  • tests/test_lineage_ingestion.py
  • tests/test_operations_case_analysis.py
  • tests/test_operations_case_ingestion.py
  • tests/test_operations_dashboard.py
  • tests/test_post_content_worker.py
  • tests/test_similar_voc.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

TEPP lineage anchor 검증과 영속화를 추가했습니다. Global Ask를 embedding 검색으로 전환했습니다. 운영 사례 분석, Dashboard, Similar VOC API와 분석가용 UI를 추가했습니다.

Changes

TEPP lineage anchor

Layer / File(s) Summary
TEPP 계약 및 anchor 영속화
backend/app/analysis_run_start.py, migrations/0207_lineage_weight_tepp_anchor.sql
TEPP 계약과 cutoff 형식을 변경했습니다. 검증된 lineage anchor를 저장하고 lineage weight를 갱신합니다.
TEPP weight loading 및 검증
backend/app/lineage_ingestion.py, tests/test_lineage_ingestion.py, tests/test_analysis_run_start.py
TEPP provenance와 승인 상태를 검증합니다. 불일치 시 weight를 반환하지 않습니다.

Global Ask semantic retrieval

Layer / File(s) Summary
Embedding 기반 검색
backend/app/post_chat_ingestion.py, backend/app/global_ask_queue.py
질문 embedding과 persisted semantic-unit cosine 검색을 사용합니다. embedding 오류 시 빈 결과를 반환합니다.
Delivery 및 worker wiring
lineageweave/ask_delivery.py, backend/app/global_ask_queue.py, frontend/src/api.ts
인용 게시물과 evidence를 report 및 alert delivery로 변환합니다. worker 경로에 embedding factory를 전달합니다.
검색 및 delivery 검증
tests/test_global_ask_sources.py, tests/test_ask_delivery.py
semantic ranking, fail-closed 검색, relative-time 조건과 delivery 계약을 검증합니다.

Evidence Operations Dashboard

Layer / File(s) Summary
운영 사례 분석 및 저장
lineageweave/operations_case_analysis.py, backend/app/operations_case_ingestion.py, migrations/0208_operations_case_analysis.sql
운영 사례와 사실을 원문 evidence 및 digest와 함께 검증하고 저장합니다.
Dashboard 및 Similar VOC API
backend/app/operations_dashboard.py, backend/app/main.py, lineageweave/similar_voc.py
ABAC와 event clock을 적용한 Dashboard 조회를 추가했습니다. repeat issue 후보의 evidence 기반 Similar VOC 판정을 추가했습니다.
분석가용 UI
frontend/src/components/OperationsDashboard.tsx, frontend/src/components/SimilarVocPanel.tsx, frontend/src/App.tsx
Dashboard, Similar VOC 결과, 상태 메시지, paging, 게시물 전환을 렌더링합니다.
검증 및 문서
tests/test_operations_*.py, tests/test_similar_voc*.py, docs/adr/0206-evidence-operations-dashboard.md, frontend/src/components/*.stories.tsx
parser, persistence, API, UI와 Storybook 상태를 검증하고 운영 결정 문서를 갱신합니다.

Estimated code review effort: 5 (Critical) | ~120 minutes

Merge Risk: 🟠 High · up to 002d1

This PR changes semantic retrieval, live VOC comparison, dashboard access scoping, and evidence persistence, but the current implementation still permits out-of-scope dashboard data, can make Similar VOC slow or unavailable when a provider call fails, and can persist invalid or mismatched evidence. These correctness, privacy, and availability risks should be fixed before merge.

Sequence Diagram(s)

sequenceDiagram
  participant Analyst
  participant OperationsDashboard
  participant DashboardAPI
  participant OperationsDatabase
  Analyst->>OperationsDashboard: select period
  OperationsDashboard->>DashboardAPI: GET /api/dashboard
  DashboardAPI->>OperationsDatabase: query visible posts and evidence
  OperationsDatabase-->>DashboardAPI: metrics, cases, and facts
  DashboardAPI-->>OperationsDashboard: dashboard response
  OperationsDashboard-->>Analyst: render metrics and evidence cards
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 57.04% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 135 functions across 35 files. (16 skippe… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목은 Global Ask의 semantic retrieval, Similar VOC, Dashboard 및 TEPP evidence 경로를 포함한 주요 변경 방향을 정확히 요약합니다. 제목은 간결하고 변경 사항과 직접 관련됩니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 57.04% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 135 functions across 35 files. (16 skipped: 16 unsupported.)

✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch feat/dashboard-live-evidence
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/dashboard-live-evidence

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae
seonghobae changed the base branch from feat/tepp-lineage-anchor-consumer to main August 25, 2026 09:36
@seonghobae
seonghobae enabled auto-merge (squash) August 25, 2026 09:36
@opencode-agent
opencode-agent Bot disabled auto-merge August 25, 2026 09:38
devin-ai-integration[bot]

This comment was marked as resolved.

# Conflicts:
#	backend/app/analysis_run_start.py
#	backend/app/global_ask_queue.py
#	docs/adr/0205-tepp-lineage-anchor.md
#	docs/adr/0206-evidence-operations-dashboard.md
#	docs/product-technical-gap-baseline.md
#	frontend/src/App.css
#	frontend/src/App.tsx
#	frontend/src/api.ts
#	frontend/src/components/OperationsDashboard.tsx
#	frontend/src/components/SimilarVocPanel.css
#	frontend/src/components/SimilarVocPanel.stories.tsx
#	frontend/src/components/SimilarVocPanel.test.tsx
#	frontend/src/components/SimilarVocPanel.tsx
#	lineageweave/similar_voc.py
#	tests/test_analysis_run_start.py
#	tests/test_similar_voc.py
… HEAD

# Conflicts:
#	backend/app/main.py
#	backend/tests/test_similar_voc_api.py
#	tests/test_global_ask_sources.py
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

github-advanced-security[bot]

This comment was marked as resolved.

@opencode-agent
opencode-agent Bot disabled auto-merge August 25, 2026 11:18
@seonghobae
seonghobae enabled auto-merge (squash) August 25, 2026 11:21
Co-authored-by: seonghobae <seonghobae@users.noreply.github.com>
@seonghobae
seonghobae merged commit 0862f40 into main Aug 25, 2026
19 of 22 checks passed

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 3 new potential issues.

Open in Devin Review

Comment thread backend/app/main.py
Comment on lines +1800 to +1804
@app.get("/api/posts/{post_id}/similar-voc")
async def read_similar_voc(
post_id: str,
offset: int = Query(0, ge=0),
account: CurrentAccount = Depends(get_current_account),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: Similar VOC fires orchestrator work on every post open

Opening any post detail auto-calls read_similar_voc (backend/app/main.py:1800), which runs up to 8 concurrent orchestrator adjudications inline with a 180s timeout. Bounded and ADR-0206-authorized, but every post open now issues expensive LLM work against the shared gateway.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread backend/app/main.py
Comment on lines +1858 to +1864
try:
results = await asyncio.wait_for(
asyncio.gather(*(_adjudicate(candidate) for candidate in candidates), return_exceptions=True),
timeout=_SIMILAR_VOC_REQUEST_TIMEOUT_SECONDS,
)
except TimeoutError:
results = ()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: Batch timeout discards completed Similar VOC results

On asyncio.wait_for timeout at backend/app/main.py:1863, results becomes () and all completed per-candidate adjudications are dropped, returning empty items even when some finished. Per-candidate errors are kept via return_exceptions, but a batch timeout loses partial work.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +119 to +121
if item["case_kind_code"] in seen_case_kinds:
return None
seen_case_kinds.add(item["case_kind_code"])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: Duplicate case kind rejects the whole response

parse_operations_case_response returns None when two items share a case_kind_code (lineageweave/operations_case_analysis.py:119), failing the entire job. A post genuinely supporting two instances of one case kind can never persist and stays in failed_analysis_count.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread backend/app/main.py
Comment on lines +1821 to +1844
rows = await conn.fetch(
f"""
select post.post_id, post.post_title, post.post_body,
post.visibility_code, post.corporate_entity_id, post.process_unit_id,
coalesce(post.event_occurred_at, post.created_at) as occurred_at
from operations_case_classification classification
join source_post post on post.post_id = classification.post_id
where classification.case_kind_code = 'repeat_issue'
and post.post_id <> $1
and post.post_body <> ''
and (post.visibility_code = 'public'
or (post.corporate_entity_id::text = any($2::text[])
and (cardinality($3::text[]) = 0
or post.process_unit_id::text = any($3::text[]))))
and {SOURCE_POST_ELIGIBILITY_SQL.format(alias='post')}
order by coalesce(post.event_occurred_at, post.created_at) desc, post.post_id
offset $4 limit $5
""",
post_id,
list(account.corporate_entity_ids),
list(account.process_unit_ids),
offset,
_SIMILAR_VOC_PAGE_SIZE + 1,
)
Comment thread backend/app/main.py
Comment on lines +1821 to +1844
rows = await conn.fetch(
f"""
select post.post_id, post.post_title, post.post_body,
post.visibility_code, post.corporate_entity_id, post.process_unit_id,
coalesce(post.event_occurred_at, post.created_at) as occurred_at
from operations_case_classification classification
join source_post post on post.post_id = classification.post_id
where classification.case_kind_code = 'repeat_issue'
and post.post_id <> $1
and post.post_body <> ''
and (post.visibility_code = 'public'
or (post.corporate_entity_id::text = any($2::text[])
and (cardinality($3::text[]) = 0
or post.process_unit_id::text = any($3::text[]))))
and {SOURCE_POST_ELIGIBILITY_SQL.format(alias='post')}
order by coalesce(post.event_occurred_at, post.created_at) desc, post.post_id
offset $4 limit $5
""",
post_id,
list(account.corporate_entity_ids),
list(account.process_unit_ids),
offset,
_SIMILAR_VOC_PAGE_SIZE + 1,
)
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.

2 participants