Skip to content

fix: report doctor advisory readiness - #1196

Merged
kang-heewon merged 29 commits into
trunkfrom
fix/1145-doctor-advisory-readiness
Jul 5, 2026
Merged

fix: report doctor advisory readiness#1196
kang-heewon merged 29 commits into
trunkfrom
fix/1145-doctor-advisory-readiness

Conversation

@kang-heewon

@kang-heewon kang-heewon commented Jul 3, 2026

Copy link
Copy Markdown
Member

Fixes #1145.

Summary

  • Adds an advisory-gate-readiness doctor check that reports warning diagnostics for core coverage selection gaps, bundle-size baseline readiness, benchmark variance evidence, and static-misuse allowlist metadata.
  • Registers stable warning-level CROCO_DOCTOR_* definitions in the shared diagnostic catalog and exposes the new codes through CLI doctor JSON output.
  • Validates benchmark variance evidence as a local structured five-run GitHub Actions contract, without network credentials.
  • Adds passing, warning-only, and malformed evidence doctor coverage plus patch changesets for @croco/cli and @croco/diagnostics-core.

Verification

  • CI=true corepack pnpm --filter @croco/cli exec vitest run src/tests/doctor.spec.ts src/tests/diagnosticCodes.spec.ts - passed, 27 tests.
  • CI=true corepack pnpm --filter @croco/diagnostics-core exec vitest run src/tests/DiagnosticCodes.spec.ts - passed, 5 tests.
  • CI=true corepack pnpm exec oxfmt --check packages/cli/src/commands/doctor.ts packages/cli/src/tests/doctor.spec.ts packages/cli/src/libs/diagnosticCodes.ts packages/diagnostics-core/src/libs/DiagnosticCodes.ts .changeset/doctor-advisory-readiness.md - passed.
  • CI=true corepack pnpm exec oxlint packages/cli/src/commands/doctor.ts packages/cli/src/tests/doctor.spec.ts packages/cli/src/libs/diagnosticCodes.ts packages/diagnostics-core/src/libs/DiagnosticCodes.ts - passed.
  • CI=true corepack pnpm typecheck --filter @croco/cli --filter @croco/diagnostics-core - passed, 46 tasks.
  • CI=true corepack pnpm check - passed.
  • CI=true COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack pnpm changeset-required:check -- --base origin/trunk --head HEAD - passed.
  • git diff --check and git diff --cached --check - passed.

Self-review gates

  • Correctness/regression: PASS. Doctor now reports the four advisory gate families with stable warning diagnostics, keeps summary/exit code healthy for warning-only readiness failures, and rejects incomplete benchmark variance evidence.
  • API/security/compatibility/release: PASS. The check is local filesystem-only, introduces no credentials or network calls, and includes patch changesets for the changed public packages.
  • Maintainability/minimality: PASS. The implementation stays inside the existing doctor command and diagnostic catalog, mirrors small local readiness contracts, and avoids importing script entrypoints or adding dependencies.

Review and QA

  • Cleanup pass: PASS. No masking fallback, dead code, unrelated abstraction, or dependency addition found in the changed scope.
  • Independent code review: APPROVE with no findings after the stricter benchmark validator delta.
  • Architecture review: CLEAR after benchmark evidence validation was tightened from marker-shape presence to local five-run contract validation.
  • Adversarial QA covered normal pass, warning-only missing artifacts, incomplete benchmark evidence, malformed evidence, dirty-worktree preservation, bounded local execution, and misleading success prevention through exit-code/summary assertions.

Notes

  • Local commit and push used LEFTHOOK=0 after the equivalent focused tests, diagnostics tests, formatter, lint, typecheck, full check, changeset, and diff gates above passed explicitly through Corepack/manual commands before PR creation.

Summary by CodeRabbit

  • New Features
    • croco doctor에 “릴리즈 하드닝 준비 상태” 점검을 추가해 커버리지 선택 증거, 번들 크기 베이스라인, 벤치마크 변동 증거, 보안 allowlist 메타데이터 문제를 경고합니다.
    • 신규 CLI 진단 코드 4개(경고)가 추가되었습니다.
  • Documentation
    • 진단 코드 문서 스니펫 가독성이 개선되고, 외부 링크가 공식 URL 중심으로 교체되었습니다.
  • Bug Fixes / Improvements
    • 핵심 커버리지 경고 체크의 --filter 파싱 및 임계값 추출 로직이 더 안정적으로 동작하도록 개선되었습니다.
    • 패키지 품질 리포트의 해시 매칭이 대소문자 무관하게 처리됩니다.
  • Tests / Chores
    • 점검 로직 및 스냅샷 기대값이 갱신되었습니다.
    • 핵심 커버리지 경고 체크 스크립트의 관련 테스트/헬퍼가 확장되었습니다.
    • 관련 패키지 patch 릴리스 Changeset이 추가/갱신되었습니다.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

croco doctor에 advisory release-hardening readiness 체크가 추가되어 core coverage, bundle baseline, benchmark evidence, static allowlist 메타데이터를 검증합니다. 관련 진단 코드, 테스트, 스크립트 파서, 문서, 체인지셋도 함께 갱신됐습니다.

Changes

Advisory Gate Readiness

Layer / File(s) Summary
진단 코드와 문서 갱신
packages/cli/src/libs/diagnosticCodes.ts, packages/diagnostics-core/src/libs/DiagnosticCodes.ts, packages/docs/src/content/docs/api/diagnostics-core/src/variables/CROCO_DIAGNOSTIC_CODE_DEFINITIONS.md, .changeset/doctor-advisory-readiness.md, docs/llm-governance.md
4개 신규 CROCO_DOCTOR_* 코드와 warning 정의를 추가하고, severity 입력을 옵셔널로 바꾸며 문서 스니펫, 체인지셋, LLM 가이드 링크를 갱신했다.
Doctor 체크 진입점과 공통 유틸
packages/cli/src/commands/doctor.ts
advisory gate용 타입, 상수, 공통 유틸, package private 판정, 체크 등록을 추가하고 진단 묶음의 생성과 요약을 연결했다.
Core coverage와 bundle baseline 파서
packages/cli/src/libs/coreCoverageFilters.ts, scripts/core-coverage-warning-check.mts, scripts/package-quality-report.mts
core coverage 필터/threshold 파싱을 분리하고, 번들 해시 패턴 판정 로직을 대소문자 무관하게 갱신했다.
Doctor 테스트와 픽스처 생성
packages/cli/src/tests/doctor.spec.ts
advisory gate 스냅샷과 판정 테스트를 추가하고, core coverage 및 benchmark/baseline/allowlist용 테스트 픽스처 생성 헬퍼를 확장한다.
Script 검증 테스트
scripts/tests/core-coverage-warning-check.spec.ts, scripts/tests/package-quality-report.spec.ts
core coverage warning 체크와 package quality report의 새 파싱 및 baseline 매칭 동작을 검증하는 테스트를 추가한다.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant runDoctor
  participant advisoryGateReadinessCheck
  participant DoctorPackage
  participant advisoryDiagnostic

  runDoctor->>advisoryGateReadinessCheck: rootDir, workspace.packages
  advisoryGateReadinessCheck->>DoctorPackage: read package private flag and normalized fields
  advisoryGateReadinessCheck->>advisoryDiagnostic: build warning diagnostics
  advisoryGateReadinessCheck-->>runDoctor: pass/fail/skipped summary
Loading

Possibly related PRs

  • croco-dev/framework#1109: 신규 CROCO_* 진단 코드와 legacy 분류 변경이 이번 PR의 doctor 진단 코드 확장과 직접 연결됩니다.
  • croco-dev/framework#1156: static-misuse allowlist JSON 포맷과 이번 PR의 allowlist 메타데이터 검증이 같은 데이터 흐름을 다룹니다.
  • croco-dev/framework#1159: benchmark variance evidence와 benchmark-result.json 정합성 검증이 같은 structured evidence 흐름을 공유합니다.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning docs/llm-governance.md의 OpenAI 문서 링크 갱신은 doctor advisory readiness 목표와 직접 관련이 없어 보입니다. 이 문서 링크 갱신은 별도 PR로 분리하거나, advisory readiness 작업과의 직접적 연관성을 설명해 주세요.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 doctor advisory readiness 추가라는 핵심 변경을 간결하게 잘 요약합니다.
Linked Issues check ✅ Passed advisory gate readiness 진단, 안정 코드, JSON 출력, passing/failing 테스트가 모두 요구사항에 맞게 반영되었습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/1145-doctor-advisory-readiness

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.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 696313b222

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/commands/doctor.ts Outdated
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

📊 Benchmark Results

✅ All benchmarks passed

Benchmark p75 Threshold Baseline vs Baseline Status Notes
CrocoApp constructor 6.8μs 30.0ms 8.2μs -17.3% -
CrocoApp lambdaHandler (10 controllers) 170.4μs 50.0ms 258.4μs -34.1% -
Lambda cold-start simulation 312.1μs 80.0ms 418.1μs -25.3% -
Lambda cold-start with headers 285.4μs 80.0ms 369.7μs -22.8% -
Lambda cold-start with binary body 242.1μs 80.0ms 339.1μs -28.6% -
Lambda cold-start with query params 217.7μs 80.0ms 301.3μs -27.7% -
Lambda cold-start with authorizer context 221.5μs 80.0ms 299.8μs -26.1% -
Lambda cold-start realistic scenario 216.8μs 80.0ms 299.2μs -27.5% -
EventBusConfig.start (10 handlers) 1.3μs 10.0ms 1.4μs -6.4% -
EventPublisher.publishNow single event 1.5μs 2.0ms 1.7μs -10.2% -
DefaultHandlerResolver.resolve × 10 0.1μs 5.0ms 0.1μs -25.0% -
Container.get singleton (cold) 45.1μs 5.0ms 70.3μs -35.8% -
Container.register × 50 components 2.2ms 10.0ms 3.2ms -32.3% -
Container.validate (50 components) 2.8ms 20.0ms 3.4ms -18.4% -
Container.get singleton (warm) 1.3μs 500.0μs 1.6μs -22.7% -
TelemetryRuntime.init (lambda preset) 1.6μs 200.0ms 1.1ms -99.9% -
lambdaPreset config creation 1.1μs 2.0ms 1.4μs -26.0% -

Updated: 2026-07-05T07:57:47.562Z · Commit: 0a5ea1e

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f90ad90ddc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/commands/doctor.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c11a6298d0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/commands/doctor.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d0ede96ad4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/commands/doctor.ts Outdated
Comment thread packages/cli/src/commands/doctor.ts Outdated
Comment thread packages/cli/src/commands/doctor.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fedd33785f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/commands/doctor.ts Outdated
Comment thread packages/cli/src/commands/doctor.ts
Comment thread packages/cli/src/commands/doctor.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 03cd6ac6b9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/commands/doctor.ts

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e91f762f42

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/commands/doctor.ts Outdated
Comment thread packages/cli/src/commands/doctor.ts Outdated
Comment thread packages/cli/src/commands/doctor.ts Outdated

@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 `@packages/cli/src/commands/doctor.ts`:
- Around line 1639-1654: `matchesGitHubActionsRunUrl` is hardcoding the GitHub
org/repo path, which will break the advisory check for forks or renamed
repositories. Extract the `/croco-dev/framework/actions/runs/${runId}` portion
into a reusable constant alongside the existing top-level constants block, and
have `matchesGitHubActionsRunUrl` build `expectedPath` from that shared value so
the repo path is configurable in one place.
- Around line 1419-1467: The benchmark evidence validation is incorrectly
forcing checks.promotedBaselineFailures to be 0, which conflicts with the row
validation that expects the real regression count. Update
validateBenchmarkEvidenceChecks to exclude promotedBaselineFailures from the
zero-only list and keep it aligned with the artifact failure counts pattern used
for the other structured evidence keys in doctor.ts.

In `@packages/cli/src/tests/doctor.spec.ts`:
- Around line 1291-1392: writeBenchmarkVarianceEvidence currently hardcodes the
markdown evidence rows to a single “Example benchmark” entry even when
resultReports is passed, so update the helper to build the JSON rows from
resultReports using the existing BenchmarkResultReport shape and keep
writeBenchmarkResult aligned. Add a rows override option to
BenchmarkVarianceEvidenceOptions so drift-focused tests can still force
mismatched markdown evidence when needed, and update the doctor.spec.ts helpers
that call writeBenchmarkVarianceEvidence to use the new override where they
intentionally rely on the mismatch.
🪄 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: 4912e32e-8325-4248-88c7-70abfe477417

📥 Commits

Reviewing files that changed from the base of the PR and between 8b6c574 and e91f762.

📒 Files selected for processing (7)
  • .changeset/doctor-advisory-readiness.md
  • docs/llm-governance.md
  • packages/cli/src/commands/doctor.ts
  • packages/cli/src/libs/diagnosticCodes.ts
  • packages/cli/src/tests/doctor.spec.ts
  • packages/diagnostics-core/src/libs/DiagnosticCodes.ts
  • packages/docs/src/content/docs/api/diagnostics-core/src/variables/CROCO_DIAGNOSTIC_CODE_DEFINITIONS.md

Comment thread packages/cli/src/commands/doctor.ts
Comment thread packages/cli/src/commands/doctor.ts
Comment thread packages/cli/src/tests/doctor.spec.ts

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cfa7ea61c7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/commands/doctor.ts
Comment thread packages/cli/src/commands/doctor.ts

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f2ed3c190d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/commands/doctor.ts Outdated
Comment thread packages/cli/src/commands/doctor.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 464d1f9932

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/commands/doctor.ts Outdated
Comment thread packages/cli/src/commands/doctor.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5323e9e766

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/commands/doctor.ts Outdated
Comment thread packages/cli/src/commands/doctor.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8671e3c018

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/commands/doctor.ts Outdated
Comment thread packages/cli/src/commands/doctor.ts

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 10f52ca08a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/commands/doctor.ts Outdated
Comment thread packages/cli/src/commands/doctor.ts Outdated

@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/commands/doctor.ts`:
- Line 171: The hashed chunk normalization regex in doctor.ts only matches
uppercase hashes, so lowercase chunk names can slip through and be treated as
real changes. Update hashedChunkArtifactPattern (and any related normalization
logic in the same doctor command) to match both uppercase and lowercase
8-character hashes so chunk-abcdef12.js is normalized the same as
chunk-ABCDEF12.js.
- Around line 1052-1056: 요약: hasObjectExport가 세미콜론이 없는 object export를 놓쳐
CORE_COVERAGE_THRESHOLDS를 잘못 missing 처리합니다. doctor.ts의 hasObjectExport에서 export
const 패턴을 찾는 정규식을 완화해, 객체 본문 뒤에 세미콜론이 없어도 매칭되도록 하세요. 특히
escapeRegExp(exportName)로 만드는 RegExp의 끝부분을 }; 고정 대신 }\\s*;? 형태로 바꾸어 세미콜론 유무 모두
인식되게 수정하면 됩니다.
🪄 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: 26986650-8ed4-4bdc-9752-e3f40706ce36

📥 Commits

Reviewing files that changed from the base of the PR and between 480a0c8 and 10f52ca.

📒 Files selected for processing (2)
  • packages/cli/src/commands/doctor.ts
  • packages/cli/src/tests/doctor.spec.ts

Comment thread packages/cli/src/commands/doctor.ts Outdated
Comment thread packages/cli/src/commands/doctor.ts

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1720115dfd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/commands/doctor.ts

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0e768919c8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/commands/doctor.ts

@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: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
scripts/core-coverage-warning-check.mts (1)

142-226: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

--filter 파싱 로직을 공통 유틸로 분리하세요. scripts/core-coverage-warning-check.mtspackages/cli/src/commands/doctor.ts가 같은 CORE_COVERAGE=true 이후 필터 정규식을 각각 유지하고 있어, 한쪽만 바뀌면 doctor 진단과 CI 경고 기준이 쉽게 어긋날 수 있습니다.

🤖 Prompt for 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.

In `@scripts/core-coverage-warning-check.mts` around lines 142 - 226, The
`--filter` parsing logic is duplicated and can drift between
`parseCoreCoveragePackageFilters` in `scripts/core-coverage-warning-check.mts`
and the corresponding `doctor.ts` logic. Extract the shared
`CORE_COVERAGE=true`/`--filter` regex parsing into a common utility and have
both callers use it so there is one source of truth for package filter
extraction. Keep the existing behavior and ensure the shared helper covers the
same quoted/unquoted filter formats currently handled by
`parseCoreCoveragePackageFilters`.
🤖 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 `@scripts/core-coverage-warning-check.mts`:
- Around line 181-188: `parseCoreCoverageThresholds` is now a reusable parser,
but its error path still hardcodes `vitestConfigPath`, so update the failure
message to reflect the actual input source instead of the module-scoped path.
Add a source label parameter (or equivalent context) to
`parseCoreCoverageThresholds` and propagate it from
`readCoreCoverageThresholds`, then use that label in the thrown error so callers
like tests get accurate diagnostics.

---

Outside diff comments:
In `@scripts/core-coverage-warning-check.mts`:
- Around line 142-226: The `--filter` parsing logic is duplicated and can drift
between `parseCoreCoveragePackageFilters` in
`scripts/core-coverage-warning-check.mts` and the corresponding `doctor.ts`
logic. Extract the shared `CORE_COVERAGE=true`/`--filter` regex parsing into a
common utility and have both callers use it so there is one source of truth for
package filter extraction. Keep the existing behavior and ensure the shared
helper covers the same quoted/unquoted filter formats currently handled by
`parseCoreCoveragePackageFilters`.
🪄 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: 4c0b3249-9c75-40d1-8c53-c0d7c8fbe93c

📥 Commits

Reviewing files that changed from the base of the PR and between 10f52ca and 0e76891.

📒 Files selected for processing (4)
  • packages/cli/src/commands/doctor.ts
  • packages/cli/src/tests/doctor.spec.ts
  • scripts/core-coverage-warning-check.mts
  • scripts/tests/core-coverage-warning-check.spec.ts

Comment thread scripts/core-coverage-warning-check.mts

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8fbb0169cb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/commands/doctor.ts
Comment thread packages/cli/src/commands/doctor.ts

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7efadb81e2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/commands/doctor.ts Outdated

@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: 1

🤖 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/commands/doctor.ts`:
- Line 736: The selectedPackages setup in doctor.ts is using
parseCoreCoveragePackageFilters directly, which can diverge from the real core
coverage script parsing and make doctor.spec.ts fixtures inconsistent. Update
the doctor command to use the shared parseCoreCoverageScriptFilters logic for
extracting package filters from coreCoverageScript, so it handles
CORE_COVERAGE=true and quoted filter forms the same way as the actual input.
Keep the change localized around selectedPackages and the related parsing helper
names.
🪄 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: 5ee47898-1cdd-4e92-a477-7f84a9d3f1f0

📥 Commits

Reviewing files that changed from the base of the PR and between 0e76891 and 7efadb8.

📒 Files selected for processing (7)
  • packages/cli/src/commands/doctor.ts
  • packages/cli/src/libs/coreCoverageFilters.ts
  • packages/cli/src/tests/doctor.spec.ts
  • scripts/core-coverage-warning-check.mts
  • scripts/package-quality-report.mts
  • scripts/tests/core-coverage-warning-check.spec.ts
  • scripts/tests/package-quality-report.spec.ts

Comment thread packages/cli/src/commands/doctor.ts

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 57adeefe58

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/commands/doctor.ts

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8fdd974adb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/commands/doctor.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b6c13cf8db

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/commands/doctor.ts Outdated
Comment thread packages/cli/src/commands/doctor.ts
@kang-heewon
kang-heewon requested a review from ddarkr July 4, 2026 14:03
@kang-heewon

Copy link
Copy Markdown
Member Author

Merge-readiness refresh: all checks are green on head 9e6725071d1aad1438c1cc282e4a953b64e661ff (validate, docs-sync-check, docs-build, docs-links, benchmark, changes, companion, CodeRabbit, WIP), and the unresolved review-thread sweep is empty. GitHub still reports mergeStateStatus=BLOCKED because protected trunk requires review; review is requested from @ddarkr.

@kang-heewon
kang-heewon requested a review from croco-admin July 4, 2026 14:17
@kang-heewon
kang-heewon merged commit cd98718 into trunk Jul 5, 2026
9 checks passed
@kang-heewon
kang-heewon deleted the fix/1145-doctor-advisory-readiness branch July 5, 2026 08:44
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.

[doctor] Report advisory gate readiness in croco doctor

1 participant