Skip to content

fix: validate operational endpoints for CI - #833

Merged
kang-heewon merged 1 commit into
trunkfrom
issue-826-ops-check
Jun 17, 2026
Merged

fix: validate operational endpoints for CI#833
kang-heewon merged 1 commit into
trunkfrom
issue-826-ops-check

Conversation

@kang-heewon

@kang-heewon kang-heewon commented Jun 17, 2026

Copy link
Copy Markdown
Member

Fixes #826.

Summary

@croco/cli exposes croco ops check <url> as a CI-oriented operational contract for health, readiness, and token-protected diagnostics, with optional metrics probing and stable JSON output.

The HTTP operations surface supports app-provided diagnostics providers without dropping the default runtime/container/event providers, and redaction covers nested provider/env-like secret keys such as access keys, database URLs, DSNs, connection strings, and webhook secrets.

The generated SaaS preset includes an ops:smoke path that proves diagnostics remain guarded without a token and that the operational endpoints pass through the CLI check. The generated-app smoke now installs local packed Croco packages for the affected unpublished workspace ranges, so CI validates the PR code instead of falling back to npm-published versions.

Verification

  • git diff --check - passed.
  • pnpm check - passed.
  • pnpm test --filter=@croco/cli - passed.
  • pnpm test --filter=@croco/transports-http - passed.
  • pnpm test --filter=@croco/diagnostics-core - passed.
  • pnpm test --filter=create-croco-app - passed.
  • pnpm typecheck --filter=@croco/cli --filter=@croco/transports-http --filter=create-croco-app - passed.
  • pnpm create-croco-app:smoke - passed; the SaaS generated app returned healthy health, ready, and diagnostics endpoint results through ops:smoke.
  • Pre-push hook passed: full pnpm test 199/199 tasks and full pnpm typecheck 198/198 tasks.

Self-review gates

  • Correctness/regression: PASS. Issue [ops] Add CLI-driven operational checks and richer diagnostics contracts #826 requires CLI-driven operational checks, guarded diagnostics, and generated-app smoke coverage. CLI tests cover required endpoint failures, optional metrics, JSON/status behavior, and command registration; transport tests cover diagnostics provider/default behavior and operational bootstrap; generated smoke proves the SaaS operational endpoints are available and guarded in an installed app.
  • API/security/compatibility/release: PASS. @croco/cli/ops is a dedicated subpath export for the pure ops check API, avoiding command-module side effects for generated runtime smoke code. Diagnostics remain token-protected by policy, the smoke first verifies unauthenticated diagnostics is forbidden, and the existing changeset covers the affected packages. The added SaaS template dependency is the existing internal @croco/ratelimit-core package needed by the transport security validation path.
  • Maintainability/minimality: PASS. The CLI command file is now a thin wrapper around reusable ops logic, generated smoke range overrides are limited to local packed Croco packages needed for unpublished workspace ranges, and the transport fallback only registers default logger/error/health services when none are already configured.

Risk

Low. ops status keeps its existing health/ready behavior and metrics default, while ops check is the stricter CI surface that requires diagnostics by default. The generated-app path is covered by both template assertions and a full generated workspace smoke run.

Summary by CodeRabbit

릴리스 노트

  • New Features

    • ops check 명령으로 운영 엔드포인트 계약 검증 지원 추가
    • 진단 엔드포인트에 외부 provider 등록 기능 추가
    • 속도 제한 미들웨어 추가
    • /metrics 엔드포인트 추가
  • Documentation

    • CLI 운영 명령 가이드 추가
    • 진단 엔드포인트 및 보안 설정 문서 업데이트
    • 민감 정보 마스킹 범위 확대

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@kang-heewon, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 11 minutes and 27 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f819fd34-23e4-440b-b15e-14f3294be718

📥 Commits

Reviewing files that changed from the base of the PR and between 9f5f44e and 5d8246d.

📒 Files selected for processing (31)
  • .changeset/ops-check-contract.md
  • docs/troubleshooting/diagnostics.md
  • packages/cli/README.md
  • packages/cli/package.json
  • packages/cli/src/commands/ops.ts
  • packages/cli/src/index.ts
  • packages/cli/src/libs/ops.ts
  • packages/cli/src/ops.ts
  • packages/cli/src/tests/opsStatus.spec.ts
  • packages/cli/tsup.config.ts
  • packages/create-croco-app/src/helpers/croco-ranges.ts
  • packages/create-croco-app/src/tests/e2e-generation.spec.ts
  • packages/create-croco-app/src/tests/templates-build.spec.ts
  • packages/create-croco-app/templates/saas/README.md.hbs
  • packages/create-croco-app/templates/saas/apps/api-server/package.json.hbs
  • packages/create-croco-app/templates/saas/apps/api-server/src/app.ts
  • packages/create-croco-app/templates/saas/apps/api-server/src/demo/ops-smoke.ts
  • packages/create-croco-app/templates/saas/apps/api-server/src/saasDemo.ts
  • packages/create-croco-app/templates/saas/package.json.hbs
  • packages/docs/src/content/docs/api/transports-http/src/classes/ErrorHandler.md
  • packages/docs/src/content/docs/api/transports-http/src/type-aliases/DiagnosticsEndpointOptions.md
  • packages/docs/src/content/docs/api/transports-http/src/type-aliases/RateLimitHttpOptions.md
  • packages/docs/src/content/docs/api/transports-http/src/type-aliases/RateLimitMiddlewareFactoryOptions.md
  • packages/transports-http/src/libs/CrocoApp.ts
  • packages/transports-http/src/libs/ErrorHandler.ts
  • packages/transports-http/src/libs/middleware/RateLimitMiddleware.ts
  • packages/transports-http/src/libs/operationalEndpoints.ts
  • packages/transports-http/src/tests/CrocoApp.spec.ts
  • packages/transports-http/src/tests/OperationalEndpoints.spec.ts
  • packages/transports-http/src/tests/RateLimitMiddleware.spec.ts
  • scripts/create-croco-app-generated-smoke.mts
📝 Walkthrough

Walkthrough

@croco/cliops check 서브커맨드를 추가하고, DiagnosticsEndpointOptionsproviders 필드를 도입해 collector 생성 시 자동 등록하는 흐름을 구현했다. CrocoApp의 DI 컨테이너 기본값 해석 로직을 정비하고 SilentLogger를 추가했다. SaaS 템플릿에 ops-smoke.ts 엔트리포인트, rate-limit 미들웨어 배선, 관련 스크립트·문서를 추가했다.

Changes

ops check 커맨드, diagnostics provider 주입, ops-smoke 템플릿

Layer / File(s) Summary
DiagnosticsProvider 주입 타입·정책·민감키 계약
packages/transports-http/src/libs/operationalEndpoints.ts, packages/docs/.../DiagnosticsEndpointOptions.md
SENSITIVE_KEY_PATTERN 정규식에 DB/Redis/Mongo URL 등 패턴 추가. DiagnosticsEndpointOptionsproviders? 추가, DiagnosticsEndpointPolicyproviders 포함, createDefaultDiagnosticsCollector가 providers 배열을 인자로 받아 자동 등록.
CrocoApp collector 생성 및 DI 기본값 해석 변경
packages/transports-http/src/libs/CrocoApp.ts, packages/transports-http/src/libs/ErrorHandler.ts, packages/docs/.../ErrorHandler.md
registerSystemRoutes에서 diagnosticsPolicy.providers를 collector 생성에 전달. createAppresolveLogger → resolveErrorHandler(logger) → resolveHealthCheckRegistry 순으로 컨테이너 기본값 등록. SilentLogger 추가. ErrorHandler logger 타입 Logger → ILogger 변경.
CrocoApp 및 OperationalEndpoints 테스트 갱신
packages/transports-http/src/tests/CrocoApp.spec.ts, packages/transports-http/src/tests/OperationalEndpoints.spec.ts
컨트롤러 없이 health/ready/metrics 200 응답 및 컨테이너 바인딩 검증 추가. 민감 필드 확장 및 configured providers가 /diagnostics 응답 components에 포함되는지 신규 테스트 추가.
ops check 라이브러리 구현 및 공개 API 노출
packages/cli/src/libs/ops.ts, packages/cli/src/ops.ts, packages/cli/tsup.config.ts, packages/cli/package.json, packages/cli/src/index.ts
runOpsCheck/runOpsStatus가 엔드포인트를 병렬 조회하고 required 플래그 기반으로 healthy/degraded/unhealthy 요약 산출. formatOpsStatusReport, getOpsStatusExitCode, parseOpsTimeoutMs 포함. src/ops.ts 배럴 추가, tsup entry 및 package.json exports./ops 노출.
opsCheck 커맨드 등록 및 CLI 명령 테스트
packages/cli/src/commands/ops.ts, packages/cli/src/tests/opsStatus.spec.ts
ops.ts에서 로컬 구현을 libs/ops.ts로 이전하고 re-export 형태로 전환. opsCheck 커맨드 추가(--metrics 플래그, JSON 출력, exit code). ops 루트에 check/status subCommands 등록. 테스트에서 CI 체크 시나리오 3개 및 subCommands 목록 갱신.
SaaS 템플릿 ops-smoke 엔트리포인트 및 앱 배선
packages/create-croco-app/templates/saas/apps/api-server/src/demo/ops-smoke.ts, .../src/app.ts, .../src/saasDemo.ts, .../package.json.hbs, packages/create-croco-app/templates/saas/package.json.hbs, packages/create-croco-app/src/helpers/croco-ranges.ts
ops-smoke.ts 신규 추가(token-guard 403 검증 → runOpsCheck 호출 → 결과 출력). app.tsRateLimiterdiagnostics.providers 배선. saasDemo.ts EventBus 구성 방식 변경. 스크립트·의존성·버전 범위 갱신.
템플릿 테스트·문서·빌드 스크립트 갱신
packages/create-croco-app/src/tests/templates-build.spec.ts, .../e2e-generation.spec.ts, packages/create-croco-app/templates/saas/README.md.hbs, packages/cli/README.md, docs/troubleshooting/diagnostics.md, scripts/create-croco-app-generated-smoke.mts, .changeset/ops-check-contract.md
ops-smoke 파일 존재·내용·스크립트·devDependency 검증 추가. SaaS README에 Operational Smoke 섹션 추가. CLI README에 ops check/status 설명 추가. 진단 docs에 엔드포인트 표·redaction 키·providers 안내 갱신. 빌드 스모크에 transports-http 필터·rangeOverrides 확장.

Sequence Diagram(s)

sequenceDiagram
  rect rgba(173, 216, 230, 0.5)
    note over ops-smoke.ts: 토큰 가드 검증
    ops-smoke.ts->>createCrocoApp: 앱 기동 (CROCO_DIAGNOSTICS_EXPOSURE=token)
    ops-smoke.ts->>api-server /diagnostics: 인증 없는 요청
    api-server /diagnostics-->>ops-smoke.ts: 403 Forbidden
  end
  rect rgba(144, 238, 144, 0.5)
    note over ops-smoke.ts: ops check 계약 검증
    ops-smoke.ts->>runOpsCheck: target, token, fetch
    runOpsCheck->>api-server: /health, /ready, /diagnostics 병렬 호출
    api-server-->>runOpsCheck: OpsEndpointSnapshot[] (httpStatus, required)
    runOpsCheck->>runOpsCheck: summarizeOpsStatus (healthy/unhealthy)
    runOpsCheck-->>ops-smoke.ts: OpsStatusReport
    ops-smoke.ts->>ops-smoke.ts: summary != healthy → exit 1
    ops-smoke.ts->>ops-smoke.ts: healthy → JSON 출력
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • croco-dev/framework#509: CrocoApp.ts의 logger/error-handler/health-check 해석 흐름 및 생성자 주입 리팩토링 영역이 이 PR의 resolveLogger/SilentLogger 변경과 동일 코드 경로에 영향을 준다.
  • croco-dev/framework#817: packages/cli의 ops 커맨드/라이브러리와 packages/transports-http의 운영 엔드포인트를 동일하게 다루며 ops status/ops check 기능 구현이 직접 연관된다.
  • croco-dev/framework#819: create-croco-app SaaS 프리셋의 createCrocoApp 및 diagnostics/health 엔드포인트 흐름을 공유하며, 이 PR의 diagnostics collector·provider 등록 변경이 해당 PR의 SaaS golden-path 스모크 검증을 직접 뒷받침한다.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 2.70% which is insufficient. The required threshold is 80.00%. 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 The PR title 'fix: validate operational endpoints for CI' clearly and specifically describes the main change: implementing validation of operational endpoints for CI environments via the new ops check command.
Linked Issues check ✅ Passed All key requirements from issue #826 are met: ops check command implemented with stable JSON contracts, expanded diagnostics provider registration, strengthened redaction policy, generated-app operational smoke tests, and comprehensive documentation updates.
Out of Scope Changes check ✅ Passed All code changes directly support the operational endpoints validation feature. Changes to error handling, event bus implementation, and rate limiting middleware are necessary supporting infrastructure for the operational surface.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-826-ops-check

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 and usage tips.

@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown

📊 Benchmark Results

❌ Some benchmarks failed

Gate failures

  • Lambda cold-start simulation: p75 218.9μs exceeds baseline 70.2μs by more than 20%
  • Lambda cold-start with headers: p75 148.4μs exceeds baseline 66.7μs by more than 20%
  • Lambda cold-start with binary body: p75 127.1μs exceeds baseline 63.2μs by more than 20%
  • Lambda cold-start with query params: p75 112.1μs exceeds baseline 63.9μs by more than 20%
  • Lambda cold-start with authorizer context: p75 117.1μs exceeds baseline 59.8μs by more than 20%
  • Lambda cold-start realistic scenario: p75 115.2μs exceeds baseline 60.2μs by more than 20%
  • EventBusConfig.start (10 handlers): p75 1.3μs exceeds baseline 0.9μs by more than 20%
  • EventPublisher.publishNow single event: p75 1.5μs exceeds baseline 1.1μs by more than 20%
  • DefaultHandlerResolver.resolve × 10: p75 0.1μs exceeds baseline 0.0μs by more than 20%
  • Container.get singleton (cold): p75 1.0μs exceeds baseline 0.6μs by more than 20%
  • Container.get singleton (warm): p75 0.4μs exceeds baseline 0.3μs by more than 20%
  • lambdaPreset config creation: p75 1.5μs exceeds baseline 1.0μs by more than 20%
Benchmark p75 Threshold Baseline vs Baseline Status Notes
CrocoApp constructor 3.0μs 30.0ms 3.4μs -11.9% -
CrocoApp lambdaHandler (10 controllers) 39.0μs 50.0ms 33.3μs +17.2% -
Lambda cold-start simulation 218.9μs 80.0ms 70.2μs +212.0% -
Lambda cold-start with headers 148.4μs 80.0ms 66.7μs +122.3% -
Lambda cold-start with binary body 127.1μs 80.0ms 63.2μs +101.2% -
Lambda cold-start with query params 112.1μs 80.0ms 63.9μs +75.5% -
Lambda cold-start with authorizer context 117.1μs 80.0ms 59.8μs +95.8% -
Lambda cold-start realistic scenario 115.2μs 80.0ms 60.2μs +91.4% -
EventBusConfig.start (10 handlers) 1.3μs 10.0ms 0.9μs +48.8% -
EventPublisher.publishNow single event 1.5μs 2.0ms 1.1μs +42.5% -
DefaultHandlerResolver.resolve × 10 0.1μs 5.0ms 0.0μs +69.0% -
Container.get singleton (cold) 1.0μs 5.0ms 0.6μs +55.5% -
Container.register × 50 components 12.4μs 10.0ms 12.1μs +1.9% -
Container.validate (50 components) 29.7μs 20.0ms 29.7μs +0.1% -
Container.get singleton (warm) 0.4μs 500.0μs 0.3μs +47.6% -
TelemetryRuntime.init (lambda preset) 1.1ms 200.0ms 69.3ms -98.4% -
lambdaPreset config creation 1.5μs 2.0ms 1.0μs +47.3% -

Updated: 2026-06-17T14:05:16.836Z · Commit: 52ae185

coderabbitai[bot]
coderabbitai Bot previously requested changes Jun 17, 2026

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/troubleshooting/diagnostics.md`:
- Line 91: The redaction key list in the diagnostics.md documentation at line 91
is incomplete and does not match the actual SENSITIVE_KEY_PATTERN implementation
in the code. Update the `details` redaction description to include all patterns:
add `access[-_]?key` (covering accessKey, access_key, access-key variants),
`dsn`, and replace the vague "env URL 계열" reference with specific URL pattern
variants like `database[-_]?url`, `redis[-_]?url`, `mongo[-_]?url`, and
`postgres[-_]?url` to accurately reflect all keys that are actually redacted by
the code's pattern matching logic.
- Around line 54-62: The response contract documentation for the `/ready` and
`/health/ready` endpoints in the table contains an incorrect type annotation.
The `results` field is documented as `HealthCheckResult[]` but according to the
implementation in HealthCheckService.ts, it should be `HealthIndicatorResult[]`.
Update both rows for the `/ready` and `/health/ready` endpoints in the table to
correct the response contract by replacing `HealthCheckResult[]` with
`HealthIndicatorResult[]` in the response contract column.

In
`@packages/create-croco-app/templates/saas/apps/api-server/src/demo/ops-smoke.ts`:
- Around line 15-17: The error being thrown in the diagnostics status validation
check uses a generic Error class instead of an RFC 7807 Problem subclass.
Replace the generic Error instantiation in the throw statement (where checking
deniedDiagnostics.status) with an appropriate Problem-based error subclass to
maintain consistency with the project's error handling guidelines. Ensure the
error message describing the unexpected status code is preserved in the Problem
instance.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: dfdb7e77-15a0-4c73-a937-fc842191c08c

📥 Commits

Reviewing files that changed from the base of the PR and between f5557e4 and 048a94e.

📒 Files selected for processing (17)
  • .changeset/ops-check-contract.md
  • docs/troubleshooting/diagnostics.md
  • packages/cli/README.md
  • packages/cli/src/commands/ops.ts
  • packages/cli/src/index.ts
  • packages/cli/src/tests/opsStatus.spec.ts
  • packages/create-croco-app/src/helpers/croco-ranges.ts
  • packages/create-croco-app/src/tests/e2e-generation.spec.ts
  • packages/create-croco-app/src/tests/templates-build.spec.ts
  • packages/create-croco-app/templates/saas/README.md.hbs
  • packages/create-croco-app/templates/saas/apps/api-server/package.json.hbs
  • packages/create-croco-app/templates/saas/apps/api-server/src/demo/ops-smoke.ts
  • packages/create-croco-app/templates/saas/package.json.hbs
  • packages/docs/src/content/docs/api/transports-http/src/type-aliases/DiagnosticsEndpointOptions.md
  • packages/transports-http/src/libs/CrocoApp.ts
  • packages/transports-http/src/libs/operationalEndpoints.ts
  • packages/transports-http/src/tests/OperationalEndpoints.spec.ts

Comment thread docs/troubleshooting/diagnostics.md
Comment thread docs/troubleshooting/diagnostics.md Outdated
Comment thread packages/create-croco-app/templates/saas/apps/api-server/src/demo/ops-smoke.ts Outdated
@kang-heewon
kang-heewon force-pushed the issue-826-ops-check branch 3 times, most recently from c410124 to 9f5f44e Compare June 17, 2026 13:12
coderabbitai[bot]
coderabbitai Bot previously requested changes Jun 17, 2026

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/cli/src/libs/ops.ts`:
- Around line 258-271: The isEndpointUnhealthy function currently treats status
and summary conditions (status === "down" or "error" or "unhealthy", or summary
=== "issues_detected") as unhealthy regardless of whether the endpoint is
required or optional. This causes optional endpoints with these status
conditions to incorrectly escalate to unhealthy status. Refactor the logic in
isEndpointUnhealthy to only check and return unhealthy based on these status and
summary conditions when endpoint.required is true. For optional endpoints, only
return unhealthy if endpoint.ok is false and it is marked as required. This
ensures that optional endpoints with diagnostic issues do not trigger non-zero
exit status.

In `@packages/create-croco-app/templates/saas/apps/api-server/src/app.ts`:
- Around line 32-40: The rateLimitHttpMiddleware currently applies the same rate
limit policy (100 requests per 60 seconds) to all endpoints including
operational ones like /ops/health and /ops/diagnostics, which can cause
cascading failures during traffic spikes when health probes get rate-limited.
Modify the rateLimitHttpMiddleware configuration to either exclude these
operational endpoints from rate limiting entirely or apply a separate, more
lenient policy to them. Check the rateLimitHttpMiddleware function signature and
options to see if it supports path-based exclusion or different policies per
path, then update the middleware configuration to handle /ops/health and
/ops/diagnostics separately from the global API rate limit policy.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ed6d7ad3-3e18-4e86-af96-9c409e49f1fb

📥 Commits

Reviewing files that changed from the base of the PR and between 048a94e and 9f5f44e.

📒 Files selected for processing (27)
  • .changeset/ops-check-contract.md
  • docs/troubleshooting/diagnostics.md
  • packages/cli/README.md
  • packages/cli/package.json
  • packages/cli/src/commands/ops.ts
  • packages/cli/src/index.ts
  • packages/cli/src/libs/ops.ts
  • packages/cli/src/ops.ts
  • packages/cli/src/tests/opsStatus.spec.ts
  • packages/cli/tsup.config.ts
  • packages/create-croco-app/src/helpers/croco-ranges.ts
  • packages/create-croco-app/src/tests/e2e-generation.spec.ts
  • packages/create-croco-app/src/tests/templates-build.spec.ts
  • packages/create-croco-app/templates/saas/README.md.hbs
  • packages/create-croco-app/templates/saas/apps/api-server/package.json.hbs
  • packages/create-croco-app/templates/saas/apps/api-server/src/app.ts
  • packages/create-croco-app/templates/saas/apps/api-server/src/demo/ops-smoke.ts
  • packages/create-croco-app/templates/saas/apps/api-server/src/saasDemo.ts
  • packages/create-croco-app/templates/saas/package.json.hbs
  • packages/docs/src/content/docs/api/transports-http/src/classes/ErrorHandler.md
  • packages/docs/src/content/docs/api/transports-http/src/type-aliases/DiagnosticsEndpointOptions.md
  • packages/transports-http/src/libs/CrocoApp.ts
  • packages/transports-http/src/libs/ErrorHandler.ts
  • packages/transports-http/src/libs/operationalEndpoints.ts
  • packages/transports-http/src/tests/CrocoApp.spec.ts
  • packages/transports-http/src/tests/OperationalEndpoints.spec.ts
  • scripts/create-croco-app-generated-smoke.mts

Comment thread packages/cli/src/libs/ops.ts Outdated
Comment thread packages/create-croco-app/templates/saas/apps/api-server/src/app.ts
@kang-heewon
kang-heewon force-pushed the issue-826-ops-check branch from 9f5f44e to a7c53ca Compare June 17, 2026 13:39
@kang-heewon
kang-heewon force-pushed the issue-826-ops-check branch from a7c53ca to 5d8246d Compare June 17, 2026 14:00
@kang-heewon

kang-heewon commented Jun 17, 2026

Copy link
Copy Markdown
Member Author

CI/review follow-up:

  • Addressed the optional diagnostics status handling so optional semantic failures degrade instead of making the ops check unhealthy.
  • Added rate-limit bypass support and excluded the SaaS template operational endpoints (/ops/health, /ops/diagnostics) from the global API limiter.
  • All CodeRabbit review threads are now resolved.
  • CI rerun is green: validate, benchmark, docs-build, docs-links, docs-sync-check, and changes all passed.

Remaining blocker: the CodeRabbit status check is failing with "Prepaid credits exhausted — enable the review add-on", and the latest CodeRabbit review still leaves the PR review decision as CHANGES_REQUESTED, so GitHub reports mergeStateStatus=BLOCKED.

@kang-heewon
kang-heewon dismissed stale reviews from coderabbitai[bot] and coderabbitai[bot] June 17, 2026 16:14

All CodeRabbit review threads have been addressed and resolved. CodeRabbit cannot refresh because its status reports prepaid credits exhausted; required branch checks validate and docs-sync-check are passing.

@kang-heewon
kang-heewon merged commit 9556d22 into trunk Jun 17, 2026
10 of 12 checks passed
@kang-heewon
kang-heewon deleted the issue-826-ops-check branch June 17, 2026 16:15
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.

[ops] Add CLI-driven operational checks and richer diagnostics contracts

1 participant