Skip to content

fix: retain generated smoke failure artifacts - #1302

Merged
kang-heewon merged 1 commit into
trunkfrom
fix-1241-smoke-failure-artifacts
Jul 10, 2026
Merged

fix: retain generated smoke failure artifacts#1302
kang-heewon merged 1 commit into
trunkfrom
fix-1241-smoke-failure-artifacts

Conversation

@kang-heewon

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

Copy link
Copy Markdown
Member

Fixes #1241.

Summary

  • Failed generated-app smoke cases retain capped stdout/stderr plus relevant generated manifests, configuration, contract files, and allowlisted REST source.
  • JSON and Markdown tier reports classify deterministic versus suspected-flaky failures, expose actual diagnostic codes, preserve copied artifacts, and provide an exact local rerun command.
  • Per-case combined output is capped at 64 MiB; GraphQL canary output is retained as each canary completes; the REST SPA contract smoke participates in the selectable matrix.
  • The CI validation timeout is 60 minutes, allowing the expanded sequential generated-app matrix and the existing CLI integration gate to complete.

Verification

  • pnpm vitest run scripts/tests/create-croco-app-generated-smoke.spec.ts passed (16 tests).
  • pnpm create-croco-app:smoke rest-spa-contracts passed, including shared gates and REST contract assertions.
  • pnpm create-croco-app:smoke graphql-standalone-api passed, including GraphQL drift canaries.
  • pnpm test and pnpm typecheck passed again in the pre-push hook (225 and 224 tasks).
  • pnpm check passed. Direct TypeScript validation of all changed smoke scripts, YAML parsing of the CI workflow, and git diff HEAD --check passed.

Self-review

  • Correctness and regression: passed; focused report/matrix tests and both generated-app smoke paths cover failure evidence and report behavior.
  • API, compatibility, and release: passed; no publishable package behavior changed and the changeset gate passed.
  • Maintainability and minimality: passed; the obsolete v1 report writer was removed so all persisted tier reports share one evidence model, and the CI timeout increase is limited to the workflow budget needed by the expanded smoke tier.

Summary by CodeRabbit

  • 새 기능
    • 생성 앱 스모크에 REST SPA 계약 검증 케이스가 추가되었고, 선택 플랜에 따라 케이스를 유연하게 실행합니다.
    • 실패 시 복구 요약, 실패 분류(일시적/재현 가능), 진단 코드, 로컬 재실행 안내, 표준 출력·에러 캡처 및 관련 아티팩트를 매트릭스 보고서에 함께 표시합니다.
  • 개선
    • 실패 아티팩트를 디렉터리/파일 규칙에 따라 정밀하게 수집·정리해 표시합니다.
    • 진단 정보와 리포트 렌더링이 케이스 간 더 일관되게 업데이트됩니다.
  • 기타
    • CI 검증 작업 최대 실행 시간이 60분으로 연장되었습니다.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 46 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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

How do review limits work?

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

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, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4b967f7e-ed8c-46dd-a6a1-6ee9d8830d79

📥 Commits

Reviewing files that changed from the base of the PR and between 5c903d2 and ffd3a89.

📒 Files selected for processing (5)
  • .github/workflows/ci.yml
  • scripts/create-croco-app-generated-smoke-matrix.mts
  • scripts/create-croco-app-generated-smoke-report.mts
  • scripts/create-croco-app-generated-smoke.mts
  • scripts/tests/create-croco-app-generated-smoke.spec.ts
📝 Walkthrough

Walkthrough

생성 앱 스모크 실행이 선택 계획과 구조화된 명령 결과를 사용하도록 변경되었다. 실패 시 출력, 진단 코드, 아티팩트, 복구 요약을 케이스별로 기록하며 REST SPA 계약 스모크와 매트릭스 리포트 검증이 추가되었다.

Changes

생성 앱 스모크 리포팅

Layer / File(s) Summary
실패 증거 계약 및 아티팩트 경로 처리
scripts/create-croco-app-generated-smoke-report.mts
실패 분류, 복구 요약, 진단 코드 추출, 아티팩트 포함·제외 및 재귀 수집 API를 추가하고 POSIX 경로 변환을 적용한다.
매트릭스 실패 증거 모델 및 렌더링
scripts/create-croco-app-generated-smoke-matrix.mts
케이스 상태에 failureEvidence를 추가하고 복구 정보, 진단 코드, 오류, 아티팩트 번들을 Failed Case Recovery 섹션으로 렌더링한다.
명령 결과 캡처 모델
scripts/create-croco-app-generated-smoke.mts
명령 실행이 stdout, stderr, 상태, 시그널, truncation, 진단 코드를 포함하는 CommandRunResult를 반환하며 빌드·팩 결과도 상위 출력 버퍼로 전달한다.
스모크 선택 및 실행 오케스트레이션
scripts/create-croco-app-generated-smoke.mts
선택 계획에 REST SPA 계약 케이스를 포함하고 생성, 설치, 검증, GraphQL 카나리, REST SPA 실행 흐름을 통합한다.
실패 기록 및 아티팩트 저장
scripts/create-croco-app-generated-smoke.mts
케이스별 출력, 진단 코드, 실패 분류, 복구 요약, 아티팩트 번들을 기록하고 매트릭스용 실패 증거를 생성한다.
실패 증거 검증 및 CI 실행 시간
scripts/tests/create-croco-app-generated-smoke.spec.ts, .github/workflows/ci.yml
REST SPA 선택, 실패 증거 렌더링, 진단 코드, 분류, 아티팩트 필터를 테스트하고 validate 제한 시간을 60분으로 변경한다.

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

Sequence Diagram(s)

sequenceDiagram
  participant SmokeRunner as 생성 스모크 실행기
  participant CommandRunner as runSmokeCaseCommand
  participant Executor as executeCommand
  participant FailureReporter as recordSmokeCaseFailure
  participant MatrixReport as 매트릭스 리포트
  SmokeRunner->>CommandRunner: 선택된 케이스 명령 실행
  CommandRunner->>Executor: stdout/stderr 캡처 요청
  Executor-->>CommandRunner: CommandRunResult 반환
  CommandRunner->>FailureReporter: 실패 결과와 projectDir 전달
  FailureReporter->>MatrixReport: failureEvidence 기록
  MatrixReport-->>SmokeRunner: 복구 정보와 아티팩트 경로 출력
Loading

Possibly related PRs

  • croco-dev/framework#838: 생성 스모크 실행 파이프라인과 명령 결과·실패 증거 리포팅 흐름이 연결된다.

Suggested reviewers: ddarkr, croco-admin

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning GitHub Actions validate 타임아웃 60분 상향은 #1241의 요구사항과 직접 관련이 없는 추가 변경입니다. 타임아웃 조정이 필수라면 근거를 남기고, 아니면 별도 PR로 분리하세요.
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 (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 생성 스모크 실패 아티팩트 보존이라는 핵심 변경을 잘 요약합니다.
Linked Issues check ✅ Passed 아티팩트 보존, 정확한 rerun 명령, 실패 분류, 요약 노출, 관련 테스트 추가가 모두 반영되었습니다.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-1241-smoke-failure-artifacts

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.

@kang-heewon
kang-heewon force-pushed the fix-1241-smoke-failure-artifacts branch from e198609 to bd4135e Compare July 10, 2026 05:40
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown

📊 Benchmark Results

✅ All benchmarks passed

Benchmark p75 Threshold Baseline vs Baseline Status Notes
CrocoApp constructor 8.5μs 30.0ms 8.2μs +3.9% -
CrocoApp lambdaHandler (10 controllers) 278.3μs 50.0ms 258.4μs +7.7% -
Lambda cold-start simulation 467.2μs 80.0ms 418.1μs +11.7% -
Lambda cold-start with headers 391.1μs 80.0ms 369.7μs +5.8% -
Lambda cold-start with binary body 375.0μs 80.0ms 339.1μs +10.6% -
Lambda cold-start with query params 318.8μs 80.0ms 301.3μs +5.8% -
Lambda cold-start with authorizer context 315.8μs 80.0ms 299.8μs +5.3% -
Lambda cold-start realistic scenario 313.5μs 80.0ms 299.2μs +4.8% -
EventBusConfig.start (10 handlers) 1.5μs 10.0ms 1.4μs +5.6% -
EventPublisher.publishNow single event 1.8μs 2.0ms 1.7μs +4.2% -
DefaultHandlerResolver.resolve × 10 0.1μs 5.0ms 0.1μs +0.0% -
Container.get singleton (cold) 76.7μs 5.0ms 70.3μs +9.2% -
Container.register × 50 components 3.3ms 10.0ms 3.2ms +3.4% -
Container.validate (50 components) 3.8ms 20.0ms 3.4ms +11.8% -
Container.get singleton (warm) 1.6μs 500.0μs 1.6μs -1.2% -
TelemetryRuntime.init (lambda preset) 1.9μs 200.0ms 1.1ms -99.8% -
lambdaPreset config creation 1.4μs 2.0ms 1.4μs -2.1% -

Updated: 2026-07-10T23:12:39.260Z · Commit: f1d4e56

@kang-heewon
kang-heewon force-pushed the fix-1241-smoke-failure-artifacts branch from bd4135e to d5c3145 Compare July 10, 2026 06:40

@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

Caution

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

⚠️ Outside diff range comments (2)
scripts/create-croco-app-generated-smoke.mts (2)

1514-1575: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

동일한 실패 처리 try/catch 패턴이 여러 함수에 반복됩니다.

runSmokeCaseCommand, runExpectedSmokeCaseCommand(여기), 그리고 runValidation(Line 2006-2013), runGraphQLContractDriftCanaries(Line 2078-2085)에 걸쳐 "getCommandResultFromErrorappendSmokeCaseOutputrecordSmokeCaseFailurecreateSmokeFailureError 던지기" 흐름이 거의 동일하게 4곳에 중복되어 있습니다. 공통 헬퍼로 추출하면 향후 실패 처리 로직을 수정할 때 누락 위험을 줄일 수 있습니다.

♻️ 제안: 공통 실패 처리 헬퍼 추출
function withSmokeStepFailureHandling<T extends CommandRunResult>(
  report: GeneratedSmokeReport,
  caseResult: SmokeCaseResult,
  step: SmokeStepResult,
  projectDir: string,
  execute: () => T,
): T {
  try {
    return execute();
  } catch (error) {
    const commandResult = getCommandResultFromError(error);
    if (commandResult) {
      appendSmokeCaseOutput(caseResult, step.label, commandResult);
    }
    recordSmokeCaseFailure(report, caseResult, step, error, projectDir);
    throw createSmokeFailureError(caseResult, step, error);
  }
}
🤖 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/create-croco-app-generated-smoke.mts` around lines 1514 - 1575, 중복된
명령 실패 처리 로직을 공통 헬퍼로 추출하세요. `withSmokeStepFailureHandling`을 추가해
`getCommandResultFromError`부터 출력 기록, `recordSmokeCaseFailure`,
`createSmokeFailureError` 재던지기까지 캡슐화하고, `runSmokeCaseCommand`,
`runExpectedSmokeCaseCommand`, `runValidation`,
`runGraphQLContractDriftCanaries`의 try/catch를 해당 헬퍼 호출로 교체하세요.

2046-2114: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

GraphQL 드리프트 카나리 중 일부만 실패해도 앞선 성공 카나리의 출력이 버퍼에서 누락됩니다.

commandResults 배열은 3개의 runGraphQLSnapshotCanary 호출이 모두 성공해야만 완성되고, 그 뒤에야 for 루프에서 appendSmokeCaseOutput이 호출됩니다. 두 번째 또는 세 번째 카나리가 throw 하면 배열 리터럴 평가가 중단되어, 이미 성공적으로 실행된 이전 카나리의 stdout/stderr는 smokeCaseOutputBuffers에 전혀 기록되지 않습니다. catch 블록은 오직 실패를 유발한 카나리 자신의 commandResult만 복구합니다.

이는 "실패 케이스마다 stdout/stderr를 보존한다"는 PR의 핵심 목표를 이 스텝에서 부분적으로 무력화합니다. 각 카나리 실행 직후 즉시 appendSmokeCaseOutput을 호출하도록 바꿔야 앞선 카나리의 출력도 항상 보존됩니다.

🐛 제안: 카나리 실행 직후 즉시 출력 캡처
-    const commandResults = [
-      runGraphQLSnapshotCanary(
-        packageDir,
-        snapshotPath,
-        originalSnapshot,
-        withStaleGraphQLOperationBaseline,
-        ["graphql-operation-removed"],
-      ),
-      runGraphQLSnapshotCanary(
-        packageDir,
-        snapshotPath,
-        originalSnapshot,
-        withChangedGraphQLFieldTypeBaseline,
-        ["graphql-schema-breaking-change"],
-      ),
-      runGraphQLSnapshotCanary(
-        packageDir,
-        snapshotPath,
-        originalSnapshot,
-        withGraphQLResolverMetadataDriftBaseline,
-        GRAPHQL_RESOLVER_METADATA_DRIFT_CODES,
-      ),
-    ];
-
-    for (const result of commandResults) {
-      appendSmokeCaseOutput(caseResult, step.label, result);
-    }
+    const canaryScenarios: ReadonlyArray<{
+      readonly mutate: (snapshot: GraphQLContractSnapshotJson) => GraphQLContractSnapshotJson;
+      readonly expectedDiagnosticCodes: readonly string[];
+    }> = [
+      { mutate: withStaleGraphQLOperationBaseline, expectedDiagnosticCodes: ["graphql-operation-removed"] },
+      { mutate: withChangedGraphQLFieldTypeBaseline, expectedDiagnosticCodes: ["graphql-schema-breaking-change"] },
+      { mutate: withGraphQLResolverMetadataDriftBaseline, expectedDiagnosticCodes: GRAPHQL_RESOLVER_METADATA_DRIFT_CODES },
+    ];
+    const commandResults = canaryScenarios.map(({ mutate, expectedDiagnosticCodes }) => {
+      const result = runGraphQLSnapshotCanary(
+        packageDir,
+        snapshotPath,
+        originalSnapshot,
+        mutate,
+        expectedDiagnosticCodes,
+      );
+      appendSmokeCaseOutput(caseResult, step.label, result);
+      return result;
+    });
🤖 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/create-croco-app-generated-smoke.mts` around lines 2046 - 2114,
Update the GraphQL drift canary orchestration so each run’s output is appended
immediately after that canary completes, rather than collecting results in a
single array first. Refactor the three calls in the step using a sequential loop
or equivalent helper that invokes runGraphQLSnapshotCanary and then
appendSmokeCaseOutput for each result, while preserving diagnostic code
aggregation and existing failure handling in the surrounding try/catch.
🤖 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/create-croco-app-generated-smoke-report.mts`:
- Around line 308-343: Refactor shouldIncludeSmokeFailureArtifact to remove the
hardcoded rest-spa-contracts path exception. Define a
caseName-to-allowed-relative-paths map or equivalent configuration near the
helper, then check normalizedPath against the paths configured for the current
case, preserving the existing global artifact rules and .croco handling. Use the
map so future case-specific source files can be added without modifying the
function’s conditional logic.

In `@scripts/create-croco-app-generated-smoke.mts`:
- Around line 1240-1251: 중복된 최상위 케이스 실패 처리 로직을 공통 헬퍼로 추출하세요. 현재 catch 블록과
runSpaBeSplitContractSmoke의 동일한 caseResult.status 검사, commandResult 기록, fallback
스텝 생성 및 recordSmokeCaseFailure 호출을 recordUnhandledCaseFailure(report,
caseResult, projectDir, error) 같은 함수로 통합하고, 두 위치에서 해당 헬퍼를 호출하도록 수정하세요.
- Around line 1637-1652: appendSmokeCaseOutput에서 케이스별 stdout과 stderr 누적 크기에 전체
상한을 적용하세요. commandCaptureMaxBytes와 별도로 모든 스텝의 출력 합계가 설계된 최대 크기를 넘지 않도록 남은 용량만
추가하고 초과분은 잘라내며 output.outputTruncated를 true로 설정하세요.

---

Outside diff comments:
In `@scripts/create-croco-app-generated-smoke.mts`:
- Around line 1514-1575: 중복된 명령 실패 처리 로직을 공통 헬퍼로 추출하세요.
`withSmokeStepFailureHandling`을 추가해 `getCommandResultFromError`부터 출력 기록,
`recordSmokeCaseFailure`, `createSmokeFailureError` 재던지기까지 캡슐화하고,
`runSmokeCaseCommand`, `runExpectedSmokeCaseCommand`, `runValidation`,
`runGraphQLContractDriftCanaries`의 try/catch를 해당 헬퍼 호출로 교체하세요.
- Around line 2046-2114: Update the GraphQL drift canary orchestration so each
run’s output is appended immediately after that canary completes, rather than
collecting results in a single array first. Refactor the three calls in the step
using a sequential loop or equivalent helper that invokes
runGraphQLSnapshotCanary and then appendSmokeCaseOutput for each result, while
preserving diagnostic code aggregation and existing failure handling in the
surrounding try/catch.
🪄 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: 555dfbb4-b8fa-4abf-826b-1a6adc65b9f4

📥 Commits

Reviewing files that changed from the base of the PR and between cb36e68 and d5c3145.

📒 Files selected for processing (3)
  • scripts/create-croco-app-generated-smoke-report.mts
  • scripts/create-croco-app-generated-smoke.mts
  • scripts/tests/create-croco-app-generated-smoke.spec.ts

Comment thread scripts/create-croco-app-generated-smoke-report.mts
Comment thread scripts/create-croco-app-generated-smoke.mts
Comment thread scripts/create-croco-app-generated-smoke.mts
@kang-heewon
kang-heewon force-pushed the fix-1241-smoke-failure-artifacts branch from d5c3145 to bbaaf61 Compare July 10, 2026 07:00
@kang-heewon
kang-heewon force-pushed the fix-1241-smoke-failure-artifacts branch 2 times, most recently from 35006c9 to 4db0801 Compare July 10, 2026 21:12

@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 `@scripts/create-croco-app-generated-smoke-matrix.mts`:
- Around line 77-183: 중복된 "rest-spa-contracts" 매직 스트링을 단일 공유 상수로 통합하세요. 케이스 정의를
소유한 GENERATED_SMOKE_MATRIX_CASES 파일에서 REST_SPA_CONTRACT_SMOKE_CASE_NAME을
export하고, create-croco-app-generated-smoke.mts의 기존 상수 및
create-croco-app-generated-smoke-report.mts의
caseSpecificSmokeFailureArtifactPaths 키가 해당 상수를 import해 사용하도록 변경해 이름 변경 시 모든 참조가
함께 검증되게 하세요.

In `@scripts/create-croco-app-generated-smoke.mts`:
- Around line 3230-3270: Update executeCommand so stdout and stderr are streamed
to the CI console while the command runs, while still being captured for
readCappedCommandOutput and toCommandRunResult; replace the current
spawnSync-only file-descriptor wiring with an appropriate spawn-based
implementation or otherwise preserve incremental progress output for successful
long-running commands.
🪄 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: 04336dca-d87f-4fee-8a04-5abd138b855a

📥 Commits

Reviewing files that changed from the base of the PR and between d5c3145 and 4db0801.

📒 Files selected for processing (5)
  • .github/workflows/ci.yml
  • scripts/create-croco-app-generated-smoke-matrix.mts
  • scripts/create-croco-app-generated-smoke-report.mts
  • scripts/create-croco-app-generated-smoke.mts
  • scripts/tests/create-croco-app-generated-smoke.spec.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.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

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 `@scripts/create-croco-app-generated-smoke-matrix.mts`:
- Around line 77-183: 중복된 "rest-spa-contracts" 매직 스트링을 단일 공유 상수로 통합하세요. 케이스 정의를
소유한 GENERATED_SMOKE_MATRIX_CASES 파일에서 REST_SPA_CONTRACT_SMOKE_CASE_NAME을
export하고, create-croco-app-generated-smoke.mts의 기존 상수 및
create-croco-app-generated-smoke-report.mts의
caseSpecificSmokeFailureArtifactPaths 키가 해당 상수를 import해 사용하도록 변경해 이름 변경 시 모든 참조가
함께 검증되게 하세요.

In `@scripts/create-croco-app-generated-smoke.mts`:
- Around line 3230-3270: Update executeCommand so stdout and stderr are streamed
to the CI console while the command runs, while still being captured for
readCappedCommandOutput and toCommandRunResult; replace the current
spawnSync-only file-descriptor wiring with an appropriate spawn-based
implementation or otherwise preserve incremental progress output for successful
long-running commands.
🪄 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: 04336dca-d87f-4fee-8a04-5abd138b855a

📥 Commits

Reviewing files that changed from the base of the PR and between d5c3145 and 4db0801.

📒 Files selected for processing (5)
  • .github/workflows/ci.yml
  • scripts/create-croco-app-generated-smoke-matrix.mts
  • scripts/create-croco-app-generated-smoke-report.mts
  • scripts/create-croco-app-generated-smoke.mts
  • scripts/tests/create-croco-app-generated-smoke.spec.ts
🛑 Comments failed to post (2)
scripts/create-croco-app-generated-smoke-matrix.mts (1)

77-183: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

"rest-spa-contracts" 케이스 이름이 3개 파일에 매직 스트링으로 중복됩니다.

이 배열의 182번째 줄("rest-spa-contracts")은 scripts/create-croco-app-generated-smoke.mtsREST_SPA_CONTRACT_SMOKE_CASE_NAME 상수(Line 246, 1177)와 scripts/create-croco-app-generated-smoke-report.mtscaseSpecificSmokeFailureArtifactPaths 키(Line 147)와 동일한 리터럴을 독립적으로 반복합니다. 세 곳 중 한 곳에서 케이스 이름이 바뀌면 나머지는 컴파일 오류 없이 조용히 어긋나게 됩니다(예: assertGeneratedSmokeMatrixContract는 통과하지만 아티팩트 허용목록만 무효화됨).

♻️ 제안: 공유 상수를 하나의 소스로 통일
-  { name: "rest-spa-contracts", tier: "spine-blocking" },
+  { name: REST_SPA_CONTRACT_SMOKE_CASE_NAME, tier: "spine-blocking" },

REST_SPA_CONTRACT_SMOKE_CASE_NAME을 이 파일(또는 create-croco-app-generated-smoke-report.mts)에서 export하고, create-croco-app-generated-smoke.mtscreate-croco-app-generated-smoke-report.mts가 이를 import하도록 정리하세요. import 순환을 피하려면 상수를 case 정의를 소유한 이 파일에 두는 것이 자연스럽습니다.

🤖 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/create-croco-app-generated-smoke-matrix.mts` around lines 77 - 183,
중복된 "rest-spa-contracts" 매직 스트링을 단일 공유 상수로 통합하세요. 케이스 정의를 소유한
GENERATED_SMOKE_MATRIX_CASES 파일에서 REST_SPA_CONTRACT_SMOKE_CASE_NAME을 export하고,
create-croco-app-generated-smoke.mts의 기존 상수 및
create-croco-app-generated-smoke-report.mts의
caseSpecificSmokeFailureArtifactPaths 키가 해당 상수를 import해 사용하도록 변경해 이름 변경 시 모든 참조가
함께 검증되게 하세요.
scripts/create-croco-app-generated-smoke.mts (1)

3230-3270: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the current file around executeCommand and nearby call sites.
sed -n '3200,3295p' scripts/create-croco-app-generated-smoke.mts

echo '--- PREVIOUS VERSION (if available) ---'
# Show the same region from the parent revision, if the repository has one.
if git rev-parse --verify HEAD^ >/dev/null 2>&1; then
  git show HEAD^:scripts/create-croco-app-generated-smoke.mts | sed -n '3200,3295p'
fi

Repository: croco-dev/framework

Length of output: 149


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Compare the exact stdio behavior across the current and parent revision, if available.
python3 - <<'PY'
import subprocess, os, textwrap

path = "scripts/create-croco-app-generated-smoke.mts"

def show(ref):
    try:
        out = subprocess.check_output(["git", "show", f"{ref}:{path}"], text=True, stderr=subprocess.STDOUT)
        return out
    except subprocess.CalledProcessError as e:
        return None

for ref in ["HEAD", "HEAD^"]:
    data = show(ref)
    if data is None:
        print(f"[{ref}] unavailable")
        continue
    for needle in ["stdio:", "spawnSync(", "inherit", "pipe", "ignore"]:
        pass
    # Print only the executeCommand block and any stdio line.
    lines = data.splitlines()
    start = None
    for i, line in enumerate(lines):
        if line.startswith("function executeCommand("):
            start = i
            break
    if start is not None:
        for line in lines[start:start+45]:
            print(line)
    print("-----")
PY

Repository: croco-dev/framework

Length of output: 149


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find any mention of replayCommandOutput and whether command stdout/stderr is ever echoed during success.
rg -n "replayCommandOutput|toCommandRunResult|spawnSync\(|stdio:" scripts/create-croco-app-generated-smoke.mts

Repository: croco-dev/framework

Length of output: 682


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Read only the relevant small ranges around the command execution and replay helpers.
sed -n '3160,3345p' scripts/create-croco-app-generated-smoke.mts

Repository: croco-dev/framework

Length of output: 5260


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Check whether this file ever streams subprocess output directly to the terminal elsewhere.
rg -n "stdio:\s*\[|stdio:\s*'inherit'|stdio:\s*\"inherit\"|process\.stdout|process\.stderr|console\.(log|error)\(" scripts/create-croco-app-generated-smoke.mts

Repository: croco-dev/framework

Length of output: 1221


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show only the diff hunk that touches executeCommand and stdio, with minimal context.
git diff --unified=3 HEAD^ HEAD -- scripts/create-croco-app-generated-smoke.mts | sed -n '/function executeCommand(/,/function readCappedCommandOutput(/p'

Repository: croco-dev/framework

Length of output: 1460


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# If the previous command is too broad, show just the changed lines near the stdio capture.
git diff --unified=0 HEAD^ HEAD -- scripts/create-croco-app-generated-smoke.mts | rg -n -C 3 "spawnSync|stdio|executeCommand|replayCommandOutput"

Repository: croco-dev/framework

Length of output: 3966


명령 출력이 성공 시에도 즉시 보이도록 복원해야 합니다. spawnSync를 파일 디스크립터로만 연결하면 장시간 실행되는 성공 스텝의 stdout/stderr가 종료 전까지 CI 로그에 전혀 나타나지 않습니다. 콘솔과 파일에 동시에 스트리밍하도록 spawn 기반으로 바꾸거나, 최소한 진행 상황이 남는 방식이 필요합니다.

🤖 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/create-croco-app-generated-smoke.mts` around lines 3230 - 3270,
Update executeCommand so stdout and stderr are streamed to the CI console while
the command runs, while still being captured for readCappedCommandOutput and
toCommandRunResult; replace the current spawnSync-only file-descriptor wiring
with an appropriate spawn-based implementation or otherwise preserve incremental
progress output for successful long-running commands.

@kang-heewon

Copy link
Copy Markdown
Member Author

CodeRabbit follow-up:

  • Consolidated the REST SPA smoke case name in the matrix module and imported it at all runtime allowlist/dispatch sites.
  • Retained capture-only stdout/stderr for successful long-running child commands. Streaming their full output back through the parent terminal was previously shown to block when the output consumer disconnects; this runner instead records capped output for failure artifacts, replays failed command output, and emits case-level progress. This preserves failure observability without reintroducing the pipe deadlock.

@kang-heewon
kang-heewon force-pushed the fix-1241-smoke-failure-artifacts branch from 4db0801 to 5c903d2 Compare July 10, 2026 22:00
@kang-heewon

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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 `@scripts/create-croco-app-generated-smoke.mts`:
- Around line 3302-3310: Update readCommandOutputSegment to loop readSync calls
until the requested length is filled or no more bytes are available, tracking
the current offset and file position. Decode the accumulated bytes with a
streaming-safe UTF-8 approach so multibyte characters split across reads are
preserved and do not produce replacement characters.
🪄 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: 549a4626-5805-47a6-9758-17fe7e63ab79

📥 Commits

Reviewing files that changed from the base of the PR and between 4db0801 and 5c903d2.

📒 Files selected for processing (5)
  • .github/workflows/ci.yml
  • scripts/create-croco-app-generated-smoke-matrix.mts
  • scripts/create-croco-app-generated-smoke-report.mts
  • scripts/create-croco-app-generated-smoke.mts
  • scripts/tests/create-croco-app-generated-smoke.spec.ts

Comment thread scripts/create-croco-app-generated-smoke.mts Outdated
@kang-heewon
kang-heewon force-pushed the fix-1241-smoke-failure-artifacts branch from 5c903d2 to ffd3a89 Compare July 10, 2026 23:04
@kang-heewon
kang-heewon merged commit 1683e68 into trunk Jul 10, 2026
9 checks passed
@kang-heewon
kang-heewon deleted the fix-1241-smoke-failure-artifacts branch July 10, 2026 23:49
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.

[create-croco-app] Add per-smoke-case artifact bundles and recovery summaries

1 participant