feat(ask): per-post Ask history stack with gap-baseline refresh - #667
feat(ask): per-post Ask history stack with gap-baseline refresh#667seonghobae wants to merge 263 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthrough분석 실행 요청과 실패 재시도, 게시물별 Ask 대화 기록, Global Ask 검증, 온톨로지 공개 정책, 가속기 런타임 경계 및 관련 문서·테스트가 갱신되었습니다. Changes게시물 Ask 기능
분석 실행 요청과 재시도
온톨로지와 런타임 경계
제품 기술 기준선
Estimated code review effort: 5 (Critical) | ~120 minutes Merge Risk: 🟡 Moderate · up to The PR adds per-post Ask history and related API/UI behavior. A current correctness risk remains in public-source verification: malformed or empty verification results could either fail an Ask request or mark verification complete without cited sources, so this handling should be fixed or explicitly accepted before merge. A smaller ADR contract clarification is also still needed. Sequence Diagram(s)sequenceDiagram
participant Analyst
participant AnalysisUI
participant AnalysisAPI
participant Outbox
participant tepp_client
Analyst->>AnalysisUI: Retry measurement 선택
AnalysisUI->>AnalysisAPI: 새 current-snapshot 실행 생성
AnalysisAPI-->>AnalysisUI: Pending 실행과 기업 범위 반환
AnalysisAPI->>Outbox: 시작 작업 기록
Outbox->>tepp_client: 측정 제출
sequenceDiagram
participant AskAgentPanel
participant GlobalAskAPI
participant submit_global_ask
participant ExternalClaimVerifier
AskAgentPanel->>GlobalAskAPI: 질문과 검증 옵션 전송
GlobalAskAPI->>submit_global_ask: 비동기 작업 제출
submit_global_ask->>ExternalClaimVerifier: 공개 주장 검증 요청
ExternalClaimVerifier-->>AskAgentPanel: 주장·근거·제한사항 반환
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 56.82% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 88 functions across 21 files. (23 skipped: 23 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 |
|
Baseline refresh is based on protected |
|
Protected main advanced through #659 to |
|
Revalidated at exact head |
|
Fixed the snapshot inconsistency at exact head ef95d32: the section 1 narrative and protected-release gap row now both report 12 open PRs, matching the 12-row inventory. No identifying data was added. |
|
Updated the PR description from 11-PR to 12-PR queue, matching the exact-head inventory and current open-PR count. Resolved the corresponding review thread. |
…826' into HEAD # Conflicts: # docs/product-technical-gap-baseline.md
| and ( | ||
| $3 is null | ||
| or $4 is null | ||
| or session.updated_at < $3 | ||
| or (session.updated_at = $3 and session.post_ask_session_id < $4) | ||
| ) | ||
| group by session.post_ask_session_id, session.updated_at | ||
| order by session.updated_at desc, session.post_ask_session_id desc | ||
| limit $5 |
There was a problem hiding this comment.
📝 Info: Keyset pagination on a mutable sort key can drop conversations
list_conversations keysets on session.updated_at (backend/app/post_ask_history.py:79-87), but persist_turn sets updated_at=now() on every new turn. A conversation bumped after the page-1 cursor is captured moves above the cursor and never appears on a later Load more page. appendUniqueConversations dedups but cannot recover an omitted row, so a concurrently-updated conversation can vanish from the list until reload.
Was this helpful? React with 👍 or 👎 to provide feedback.
| except PostAskConversationNotFound as exc: | ||
| if recover_deleted_conversation and conversation_id is not None: | ||
| return await _persist_post_ask_turn( | ||
| conn, | ||
| account, | ||
| post_id, | ||
| None, | ||
| question, | ||
| answer_text, | ||
| source_post_ids, | ||
| cited_post_ids, | ||
| ) | ||
| raise HTTPException( | ||
| status.HTTP_404_NOT_FOUND, | ||
| "This conversation is no longer available. Choose another conversation or start a new one.", | ||
| ) from exc |
There was a problem hiding this comment.
📝 Info: Deleted-conversation recovery re-runs source reauthorization
The recovery recursion in _persist_post_ask_turn passes conversation_id=None, so no second PostAskConversationNotFound is possible and dropping recover_deleted_conversation is safe. It does re-run _ensure_sources_visible, taking share locks a second time in one request; harmless but duplicated.
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
This PR is not docs-only despite the original title. It is a stack-composition branch carrying:
docs(gaps): refreshesdocs/product-technical-gap-baseline.mdagainst protectedmain@494b54e2and records the exact-head queue (aggregate, non-identifying evidence only)feat(ask): per-post Ask conversation history — ADR 0235, migration 0223,GET/POSTconversation endpoints, ChatPanel continuation UI with localized loading states, authorization re-checked per turnfix(ui): cancelled analysis-run next-action guidance, responsive analysis grid stacking, non-empty action columndocs(adr): decomposition of ADR 0133–0137 into current records_require_lineage_create_kind→_require_requestable_run_kindsoPOST /api/analysis-runsaccepts Pending TEPP/topic-lineage requests (amends ADR 0017/0022 + AGENTS.md)Verification
uv run --extra dev --extra backend pytest -q tests/test_documentation_hygiene.py tests/test_public_docstrings.pyThis change contains aggregate, non-identifying evidence only. Committed screenshots use synthetic fixtures.
Summary by CodeRabbit