Skip to content

fix(analytics): reconcile terminal conversion KPI on protected main - #338

Closed
seonghobae wants to merge 7 commits into
mainfrom
fix/terminal-kpi-main-20260810
Closed

fix(analytics): reconcile terminal conversion KPI on protected main#338
seonghobae wants to merge 7 commits into
mainfrom
fix/terminal-kpi-main-20260810

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Objective

Reconstruct PR #328's bounded terminal-outcome KPI correction directly on the current protected-main baseline after #270 integrated, without carrying stale ancestry.

Fresh exact state — 2026-08-10

  • exact source head: 65cf2956ad69614cabbb1369b010b1278b06ab3a;
  • exact protected main: 55d7ae8647208e301f282350f076eeddaba61d11;
  • clean reconstruction: five changed files, mergeable and Ready;
  • exact-head CI 31389258830: success;
  • exact-head Security Scan 31389258832: success;
  • exact-head SAST Semgrep 31389258776: success;
  • exact-head fuzz 31389258688: success;
  • no automated check, comment, status, or model output is qualifying independent approval.

All five output blobs are byte-identical to predecessor #328's exact semantic head 99e7c79142ce8e10ad0ef6880ab6d4fa8826c113, and their protected-main inputs were byte-identical to #328's historical base before applying the bounded delta. This proves #270 introduced no path-local conflict while eliminating stale ancestry.

Contract preserved

conversionSuccessRate is computed over terminal SUCCEEDED + FAILED outcomes only, returning 0.0 while no job is terminal. In-flight SUBMITTED and PROCESSING jobs no longer count as failures. API, persisted/exported evidence Javadocs, focused response tests, and controller integration expectations use the same denominator.

Exact blob identities shared with #328:

  • KpiSnapshotRecord.java: 5a91a33effc2bd81f756d8a54cac71650b074552;
  • KpiSnapshotExportResponse.java: b5c40a2951300c1ae995aba5cddda2a07829f93c;
  • KpiSnapshotResponse.java: fe0e4f5ebf49a955f7be9313b9b3b48036af98fd;
  • KpiSnapshotResponseTest.java: eba5afc202051c8db853a65fc4235fd91a4abb28;
  • AnalyticsControllerTest.java: da895f917221072325d6a11933b0428766ba946e.

Scope / non-completion boundary

This is issue #327's bounded semantics slice. It does not complete tenant-scoped repository-query authority (#326), persisted numeric-domain validation (#329/#339), authentication, persistence redesign, or canonical documentation. PR #305 remains the cross-cutting documentation owner.

Merge gate

Keep this exact head unchanged. Auto-merge may complete only after live repository protection still sees all required checks passing, zero valid unresolved findings, and the counted approving review from a qualifying independent reviewer with write access. Automated evidence is not approval.

Summary by CodeRabbit

  • 변경 사항

    • 전환 성공률 계산 기준을 전체 작업 수에서 성공 또는 실패로 종료된 작업 수로 변경했습니다.
    • 종료된 작업이 없을 경우 전환 성공률은 0.0으로 표시됩니다.
    • 관련 KPI 화면과 내보내기 설명을 새로운 계산 기준에 맞게 업데이트했습니다.
  • 테스트

    • 진행 중인 작업을 성공률 분모에서 제외하는 동작을 검증했습니다.
    • 성공률 계산 결과를 새로운 기준에 맞게 업데이트했습니다.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f3e15245-c3ae-45e7-b203-9d7db5949574

📥 Commits

Reviewing files that changed from the base of the PR and between b66b692 and 3e74595.

📒 Files selected for processing (5)
  • src/main/java/com/clearfolio/viewer/analytics/KpiSnapshotRecord.java
  • src/main/java/com/clearfolio/viewer/api/KpiSnapshotExportResponse.java
  • src/main/java/com/clearfolio/viewer/api/KpiSnapshotResponse.java
  • src/test/java/com/clearfolio/viewer/api/KpiSnapshotResponseTest.java
  • src/test/java/com/clearfolio/viewer/controller/AnalyticsControllerTest.java

📝 Walkthrough

Walkthrough

conversionSuccessRate의 분모를 전체 작업 수에서 종료된 성공·실패 작업 수로 변경했습니다. 종료 작업이 없으면 0.0을 반환합니다. 관련 문서와 테스트의 기대값을 갱신했습니다.

Changes

성공률 계산 기준 변경

Layer / File(s) Summary
종료 상태 기반 성공률 계산
src/main/java/com/clearfolio/viewer/analytics/KpiSnapshotRecord.java, src/main/java/com/clearfolio/viewer/api/KpiSnapshotExportResponse.java, src/main/java/com/clearfolio/viewer/api/KpiSnapshotResponse.java
conversionSuccessRate의 문서를 종료된 성공·실패 작업 기준으로 변경했습니다. 계산은 succeeded + failed를 분모로 사용하며, 종료 작업이 없으면 0.0을 반환합니다.
성공률 검증 갱신
src/test/java/com/clearfolio/viewer/api/KpiSnapshotResponseTest.java, src/test/java/com/clearfolio/viewer/controller/AnalyticsControllerTest.java
터미널 상태만 분모에 포함하는 동작과 종료 작업이 없는 경우를 검증합니다. 관련 기대값과 테스트 헬퍼 사용을 갱신했습니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 보호된 main 기준으로 terminal conversion KPI를 조정하는 주요 변경 사항을 명확하게 요약합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/terminal-kpi-main-20260810

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.

@seonghobae
seonghobae marked this pull request as ready for review August 10, 2026 12:45
@seonghobae
seonghobae enabled auto-merge (squash) August 10, 2026 12:48

Copy link
Copy Markdown
Collaborator Author

@opencode-agent @cwl-noema-review Please independently review exact current head 65cf2956ad69614cabbb1369b010b1278b06ab3a against protected main 55d7ae8647208e301f282350f076eeddaba61d11. Exact-head CI 31389258830, Security Scan 31389258832, SAST 31389258776, and fuzz 31389258688 are successful. Verify conversionSuccessRate = succeeded / (succeeded + failed), deterministic zero with no terminal outcomes, unchanged status counters, consistent API/export/persistence Javadocs, and separation from tenant-query and numeric-ledger work. The five output blobs are byte-identical to predecessor #328. Advisory review only; do not mutate, count as human approval, merge, or weaken gates.

Copy link
Copy Markdown
Collaborator Author

Superseded by current-main replacement #437. The replacement preserves this PR's five-file terminal-outcome KPI semantic delta on protected main 961f44a19c4ced87f8062b3ab9842a9a08d05235, has fresh exact-head CI/Security/SAST/fuzz evidence, is Ready, and has auto-merge enabled subject to ordinary independent approval and branch protection. Closing this stale-base duplicate prevents parallel review and merge ambiguity; no predecessor evidence transfers.

@seonghobae seonghobae closed this Aug 14, 2026
auto-merge was automatically disabled August 14, 2026 07:52

Pull request was closed

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.

1 participant