Skip to content

feat(observability): export readiness evidence gauges - #142

Closed
seonghobae wants to merge 5 commits into
fix/pin-hosted-runner-20260902-v2from
codex/readiness-metrics
Closed

feat(observability): export readiness evidence gauges#142
seonghobae wants to merge 5 commits into
fix/pin-hosted-runner-20260902-v2from
codex/readiness-metrics

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Superseded by clean-base replacement #152

This observability slice remains valid, but the old branch diverged from the final reviewed runner prerequisite: its ancestry stopped at predecessor runner head 2d41c4079f9a4465c3142a0aa2dd5895cb11f793, while clean runner replacement #149 now owns exact head b663f9d200e5f385c7dd067d074940a02836c68e.

Replacement #152 reconstructs the reviewed semantic head e7ef34d9f2c5d31873d7c09889b302279e8a4162 on top of exact clean #149 via non-destructive merge commit 387a447f856093d02116dfadcf2c4a4a63c6d3ba. A fresh comparison against b663f9d… reports behind_by=0; the effective delta remains exactly the four observability files and preserves the repaired HELP-text/admin-auth semantics.

No predecessor check/review evidence transfers across PR identity. Close this stale-base PR and continue validation/integration through #152.

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

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

GET /metrics가 상업 준비성, 게이트웨이 라우트, 관리자 인증 구성 게이지를 노출합니다. 관리자 인증 상태는 쓰기 가능한 자격 증명을 기준으로 판정합니다. 관련 테스트와 운영·구매자 문서도 갱신되었습니다.

Changes

운영 준비성 지표

Layer / File(s) Summary
운영 지표 exposition 및 인증 판정 구현
src/lib.rs
metrics 핸들러가 운영 지표 exposition을 사용합니다. 상업 준비성, 준비성 검사, 게이트웨이 라우트, 관리자 인증 구성에 대한 7개 게이지를 추가합니다. /healthz/metrics는 쓰기 가능한 관리자 자격 증명이 없으면 관리자 인증 구성을 비활성으로 보고합니다. 테스트가 readonly 및 write 토큰 구성을 검증합니다.
운영 및 구매자 문서 갱신
docs/analytics/soc-kpis.md, docs/commercial/buyer-due-diligence.md, CHANGELOG.md
운영 KPI 문서와 구매자 실사 문서가 GET /metrics와 준비성 게이지를 설명합니다. 연구 근거와 변경 로그 항목을 추가합니다.

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

Merge Risk: 🔵 Low · up to 021d5

The new readiness metric may describe readonly-auth configurations inaccurately by labeling the absence of write-capable credentials as disabled authentication. This is a bounded monitoring/documentation risk and is mergeable with explicit owner awareness or a follow-up correction.

Sequence Diagram(s)

sequenceDiagram
  participant MetricsHandler
  participant operational_prometheus_exposition
  participant PrometheusResponse
  MetricsHandler->>operational_prometheus_exposition: state, data, timestamp 전달
  operational_prometheus_exposition->>PrometheusResponse: KPI 및 운영 준비성 게이지 추가
  PrometheusResponse-->>MetricsHandler: Prometheus text 반환
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 1 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 /metrics를 통한 준비 상태 증거 게이지 추가라는 주요 변경 사항을 정확하고 간결하게 설명합니다.
Full details: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/readiness-metrics

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 enabled auto-merge (squash) September 1, 2026 12:42
coderabbitai[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

@coderabbitai autofix

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

@coderabbitai autofix

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Autofix skipped. No unresolved review comments with fix instructions found.

Copy link
Copy Markdown
Contributor Author

@coderabbitai Please fix the current Devin finding on this PR and commit the fix directly to the current codex/readiness-metrics branch (do not open a stacked PR). Re-read the exact current head first. Make /healthz and /metrics use one write-capable admin-auth definition: HealthStatus.admin_auth_configured must be false for readonly-only RBAC credentials and true only when has_write_admin_credential is true. Add a regression that exercises both /healthz and /metrics with readonly-only credentials and proves both report false/0; preserve the existing write-capable metric regression. Keep the patch minimal, run formatting plus the focused tests, and do not weaken any gate.

@devin-ai-integration

Copy link
Copy Markdown

Failed to start a Devin session. Please try again.

devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@devin-ai-integration

Copy link
Copy Markdown

Failed to start a Devin session. Please try again.

@devin-ai-integration

Copy link
Copy Markdown

Failed to start a Devin session. Please try again.

@opencode-agent
opencode-agent Bot disabled auto-merge September 1, 2026 17:53
@seonghobae
seonghobae changed the base branch from main to fix/pin-hosted-runner-20260902 September 1, 2026 18:08
@seonghobae
seonghobae changed the base branch from fix/pin-hosted-runner-20260902 to fix/pin-hosted-runner-20260902-v2 September 1, 2026 18:12

@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 1 new potential issue.

Devin Review

Comment thread src/lib.rs
fn operational_prometheus_exposition(state: &AppState, data: &AppData, now_unix: u64) -> String {
let kpis = kpi_snapshot_at(data, now_unix);
let readiness = commercial_readiness_snapshot_at(data, now_unix);
let routes_enabled = data.routes.iter().filter(|route| route.enabled).count();

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: Readiness gauges preserve endpoint semantics

Both route gauges use the same enabled-route predicate as readyz. One state snapshot keeps their values mutually consistent.

Devin Review

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

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