Skip to content

fix: keep automatic CI within its runtime budget - #1611

Merged
kang-heewon merged 4 commits into
trunkfrom
agent/keep-ci-under-10m
Jul 29, 2026
Merged

fix: keep automatic CI within its runtime budget#1611
kang-heewon merged 4 commits into
trunkfrom
agent/keep-ci-under-10m

Conversation

@kang-heewon

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

Copy link
Copy Markdown
Member

Outcome

Automatic PR and trunk CI now scopes build, typecheck, and test work to the changed package graph. Windows scaffold, real-resource, docs, and ecosystem advisory checks run only when their paths or invocation mode require them, while manual dispatch keeps the complete verification path available.

A repository performance contract budgets routine automatic CI at 9.5 minutes and rejects workflow changes that would broaden the critical path beyond the 10-minute target.

Verification

  • Hosted validate: passed in 7m39s
  • Hosted parallel checks: benchmark 1m15s, companion 2m55s, real-resource tests 1m19s
  • Targeted Windows scaffold: passed in 10m36s; this PR triggers it because the workflow itself changes, while ordinary package PRs skip it
  • Review contract tests: 42/42 passed
  • node --experimental-strip-types scripts/verification-command.mts --id ci-performance-budget: 9.5/10-minute design budget passed
  • Pre-push full test graph: 232/232 tasks passed
  • Pre-push full typecheck graph: 231/231 tasks passed
  • CI executable policy, workflow YAML parsing, Oxfmt, and Oxlint passed

Review gates

  • Correctness: manual dispatch retains the full repository verification profile.
  • Reliability: automatic runs use the exact PR or trunk base/head range and include downstream affected packages.
  • Security: the real-resource job uses explicit read-only repository permissions.
  • Performance: executable budget checks and mutation tests guard Windows, advisory, docs, resource, and affected-graph routing.
  • Scope: no package runtime API, release version, or publishable package behavior changes.

Residual risk

The hosted average should be confirmed over the next 5–10 routine CI runs. Scaffold- or docs-heavy changes can still take longer than routine changes, but the ordinary automatic path is budgeted below 10 minutes and the full manual safety path remains available.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

CI에서 실제 PostgreSQL/Redis 검증을 별도 작업으로 분리하고, 변경 파일 기반 검증 매니페스트와 PR CI 성능 예산 검사를 추가했다. 관련 워크플로우 조건, 계약 테스트, 릴리즈 게이트 유지보수 목록도 갱신했다.

Changes

CI 검증 및 매니페스트 개편

Layer / File(s) Summary
변경 범위 기반 검증 매니페스트
scripts/verification-manifest.mts, scripts/tests/verification-manifest.spec.ts
변경 파일과 영향 영역에 따라 spinepublish 명령의 applicable 값과 Turbo 필터를 동적으로 구성하고, ci-performance-budget 계약 명령을 추가했다.
CI 작업 라우팅 및 실제 리소스 검증
.github/workflows/ci.yml, scripts/tests/ci-workflow.spec.ts
PostgreSQL/Redis 검증을 real-resource-tests 작업으로 이동하고, 실제 리소스·Windows·문서·생태계 작업의 이벤트 및 변경 경로 조건을 조정했다.
CI 성능 예산 검사와 계약 테스트
scripts/ci-performance-budget.mts, scripts/tests/ci-performance-budget.spec.ts, scripts/release-gate-maintenance.mts, scripts/tests/package-entrypoint-smoke.spec.ts
워크플로우와 ordinary/maintenance 매니페스트를 대조해 예산 및 실행 조건 위반을 반환하는 검사기와 변형 시나리오 테스트를 추가하고, 릴리즈 게이트 목록 및 스모크 테스트 타임아웃을 갱신했다.

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

Sequence Diagram(s)

sequenceDiagram
  participant PullRequest
  participant changes
  participant VerificationManifest
  participant CIWorkflow
  participant RealResourceTests
  PullRequest->>changes: 변경 파일 분류
  changes->>VerificationManifest: 프로파일 및 변경 범위 전달
  VerificationManifest->>CIWorkflow: 검증 명령과 applicable 값 생성
  CIWorkflow->>RealResourceTests: 실제 리소스 조건에 따른 작업 실행
  RealResourceTests->>PullRequest: 검증 결과 반환
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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
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 자동 CI를 런타임 예산 내로 유지하도록 CI 범위와 검증을 조정한 핵심 변경을 잘 요약합니다.
✨ 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 agent/keep-ci-under-10m

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.

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

📊 Benchmark Results

✅ All benchmarks passed

Benchmark p75 Threshold Baseline vs Baseline Status Notes
CrocoApp constructor 9.0μs 30.0ms 8.2μs +9.6% -
CrocoApp lambdaHandler (10 controllers) 286.6μs 50.0ms 258.4μs +10.9% -
Lambda cold-start simulation 433.8μs 80.0ms 418.1μs +3.7% -
Lambda cold-start with headers 376.1μs 80.0ms 369.7μs +1.7% -
Lambda cold-start with binary body 362.8μs 80.0ms 339.1μs +7.0% -
Lambda cold-start with query params 303.3μs 80.0ms 301.3μs +0.7% -
Lambda cold-start with authorizer context 303.7μs 80.0ms 299.8μs +1.3% -
Lambda cold-start realistic scenario 303.7μs 80.0ms 299.2μs +1.5% -
EventBusConfig.start (10 handlers) 1.6μs 10.0ms 1.4μs +14.2% -
EventPublisher.publishNow single event 2.0μs 2.0ms 1.7μs +16.3% -
DefaultHandlerResolver.resolve × 10 0.1μs 5.0ms 0.1μs -16.2% -
Container.get singleton (cold) 72.1μs 5.0ms 70.3μs +2.6% -
Container.register × 50 components 3.3ms 10.0ms 3.2ms +2.5% -
Container.validate (50 components) 3.8ms 20.0ms 3.4ms +10.9% -
Container.get singleton (warm) 1.9μs 500.0μs 1.6μs +15.1% -
TelemetryRuntime.init (lambda preset) 2.2μs 200.0ms 1.1ms -99.8% -
lambdaPreset config creation 1.5μs 2.0ms 1.4μs +5.3% -

Updated: 2026-07-29T15:35:18.245Z · Commit: ca3c65b

@kang-heewon
kang-heewon force-pushed the agent/keep-ci-under-10m branch from 64b19ac to 3afb0d3 Compare July 29, 2026 15:03

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

🤖 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 @.github/workflows/ci.yml:
- Around line 530-534: Update the real-resource-tests job to add a job-level
permissions block granting only read access needed for checkout and tests,
matching the least-privilege pattern used by ecosystem-advisory. Do not inherit
the workflow’s broader default token permissions.

In `@scripts/ci-performance-budget.mts`:
- Around line 47-51: Update jobSection to match job keys anchored at the start
of a job-definition line, avoiding matches inside indented steps such as
windows-scaffold outputs. Change the filter validation around jobSection and the
checks at lines 80-89 to explicitly inspect the changes job section, preserving
the existing mutant test behavior that replaces filters within changes.
- Around line 158-180: Extract the duplicated ordinary and maintenance manifest
setup from main into exported fixture factory function(s) in this module, then
reuse those factories in both main() and
scripts/tests/ci-performance-budget.spec.ts. Preserve the existing manifest
values and ensure the contract test no longer defines an independent copy.

In `@scripts/verification-manifest.mts`:
- Around line 576-629: Define a single CORE_COVERAGE_PACKAGES constant
containing the packages currently listed in the core coverage command, then
derive both the command’s pnpm --filter arguments and affectsCoreCoverage’s
directory matching from it. Update the existing affectsCoreCoverage symbol and
core-coverage command configuration to use these derived values, preserving the
current package set and coverage behavior.
- Around line 464-478: Update the publish-profile verification path around the
alpha-release-smoke manifest entry and pnpm verify:publish invocation so it
receives the changed-file list, matching the CI workflow behavior. Ensure the
classifier does not mark alpha-release-smoke as not_applicable during release
validation, while preserving the existing command and artifact configuration.
- Around line 54-60: Update affectsPackageEntrypoints to include changes
anywhere under each package’s src directory, not only src/index.ts, while
continuing to exclude create-croco-app and preserve existing manifest, lockfile,
workspace, Turbo, Node version, and smoke-script matches.
🪄 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 Plus

Run ID: 04ba4241-5acf-44d5-9c67-db697e22bb9b

📥 Commits

Reviewing files that changed from the base of the PR and between 286a5ad and 3afb0d3.

📒 Files selected for processing (8)
  • .github/workflows/ci.yml
  • scripts/ci-performance-budget.mts
  • scripts/release-gate-maintenance.mts
  • scripts/tests/ci-performance-budget.spec.ts
  • scripts/tests/ci-workflow.spec.ts
  • scripts/tests/package-entrypoint-smoke.spec.ts
  • scripts/tests/verification-manifest.spec.ts
  • scripts/verification-manifest.mts

Comment thread .github/workflows/ci.yml
Comment thread scripts/ci-performance-budget.mts
Comment thread scripts/ci-performance-budget.mts
Comment thread scripts/verification-manifest.mts
Comment thread scripts/verification-manifest.mts
Comment thread scripts/verification-manifest.mts
@kang-heewon
kang-heewon merged commit 9fd38ba into trunk Jul 29, 2026
12 checks passed
@kang-heewon
kang-heewon deleted the agent/keep-ci-under-10m branch July 29, 2026 15:51
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