Skip to content

Codex automated review pipeline#3

Closed
za0012 wants to merge 9 commits into
Nextsfrom
codex-automated-review-pipeline
Closed

Codex automated review pipeline#3
za0012 wants to merge 9 commits into
Nextsfrom
codex-automated-review-pipeline

Conversation

@za0012

@za0012 za0012 commented Jul 2, 2026

Copy link
Copy Markdown
Owner

개요

LLM 연동을 지원하는 PR 기반 자동 코드 리뷰 파이프라인을 구축했습니다.

개인 프로젝트에서 코드 품질, 구조 개선점, 테스트 누락 여부를 수동으로 점검하기 어려운 문제를 해결하기 위해 AGENTS.mdreview-agents 프롬프트를 기반으로 변경 diff를 자동 분석하는 리뷰 하네스를 추가했습니다.

주요 변경 사항

  • GitHub Actions 기반 PR 자동 리뷰 workflow 추가
  • bun run review 명령으로 실행 가능한 리뷰 하네스 추가
  • PR diff, 변경 파일, lint/typecheck/test/build 결과 수집
  • 리뷰 결과를 Markdown/JSON 리포트로 생성
  • GitHub PR 댓글 자동 생성 및 기존 댓글 업데이트 처리
  • Notion 자동 퍼블리싱을 위한 scheduled workflow 추가
  • AGENTS.md에 주요 리뷰 기준 명시
    • 의미 있는 변수/함수 네이밍
    • Early Return 기반 가독성 개선
    • 런타임 성능 및 복잡도 점검

현재 동작 방식

현재는 과금 방지를 위해 OPENAI_API_KEY를 설정하지 않은 상태에서도 파이프라인이 동작하도록 구성했습니다.

  • OpenAI API 키가 없으면 LLM 리뷰 단계는 스킵됩니다.
  • 대신 lint/typecheck/test/build 결과를 수집해 PR 댓글로 자동 게시합니다.
  • 추후 OPENAI_API_KEY를 GitHub Secrets에 등록하면 LLM 기반 리뷰까지 활성화할 수 있습니다.

검증 결과

GitHub Actions에서 자동 리뷰 workflow가 실행되었고, PR 댓글이 정상적으로 생성되었습니다.

현재 댓글에 표시된 실패 항목은 파이프라인 자체 오류라기보다 기존 코드의 lint/typecheck/test/build 실패를 하네스가 감지한 결과입니다.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Automated PR Code Review

  • Cadence: pull-request
  • Generated: 2026-07-02T06:15:00.485Z
  • Base: 1dd7ec12712f8219f1b5d9cd4c589637bb0c61e3
  • Head: 7b4bb77e1dde7a83bfdc1cb547b8362c16f84725
  • Changed files: 23
  • Findings: 4

Checks

  • lint: failed (1) - bun biome check .
  • typecheck: failed (2) - "/home/runner/.bun/bin/bun" "/home/runner/work/codeTest/codeTest/node_modules/typescript/bin/tsc" --noEmit --pretty false
  • test: failed (1) - bun run test
  • build: failed (1) - bun run build

Findings

P1 build failed

  • Location: package.json
  • Source: harness
  • Existing failure: no
  • Impact: The build check exits with code 1, so the change is not currently passing CI-equivalent verification.
  • Suggested fix: Run bun run build locally and fix the reported failure. First output:
    $ bun next build
    Failed to type check.

./src/app/(with-sidebar)/problems/components/problem-add/TagSection.tsx:83:31
Type error: Parameter 'tag' implicitly has an 'any' type.

�[90m81 |�[0m <div className=�[32m"mt-2 flex flex-wrap gap-1 min-h-5"�[0m>
�[90m82 |�[0m {selectedTags.length > �[35m0�[0m ? (
�[31m�[1m>�[0m �[90m83 |�[0m selectedTags.map((tag) => (
�[90m |�[0m �[31m�[1m^�[0m
�[90m84 |�[0m <span
�[90m85 |�[0m key={tag}
�[90m86 |�[0m className=�[32m"text-[12px] text-[#8b95a1] font-medium"�[0m
Next.js build worker exited with code: 1 and signal: null
error: "next" exited with code 1
error: script "build" exited with code 1
⚠ No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape
[output truncated]

  • Verification: bun run build exits with code 0.

P1 test failed

  • Location: package.json
  • Source: harness
  • Existing failure: no
  • Impact: The test check exits with code 1, so the change is not currently passing CI-equivalent verification.
  • Suggested fix: Run bun run test locally and fix the reported failure. First output:
    $ bun test ./src//*.test.ts
    Test filter "./src/
    /*.test.ts" had no matches
    error: script "test" exited with code 1
    bun test v1.3.14 (0d9b296a)
  • Verification: bun run test exits with code 0.

P1 typecheck failed

  • Location: package.json
  • Source: harness
  • Existing failure: no
  • Impact: The typecheck check exits with code 2, so the change is not currently passing CI-equivalent verification.
  • Suggested fix: Run "/home/runner/.bun/bin/bun" "/home/runner/work/codeTest/codeTest/node_modules/typescript/bin/tsc" --noEmit --pretty false locally and fix the reported failure. First output:
    src/app/(with-sidebar)/problems/components/problem-add/TagSection.tsx(83,31): error TS7006: Parameter 'tag' implicitly has an 'any' type.
    src/app/(with-sidebar)/problems/page.tsx(135,15): error TS2322: Type 'any[] | undefined' is not assignable to type 'string[]'.
    Type 'undefined' is not assignable to type 'string[]'.
    src/app/(without-sidebar)/find/page.tsx(7,23): error TS2306: File '/home/runner/work/codeTest/codeTest/src/app/(without-sidebar)/find/component/MakeStudy.tsx' is not a module.
    src/components/Sidebar.tsx(49,36): error TS18048: 'study' is possibly 'undefined'.
    src/components/ui/Logo.tsx(2,21): error TS2307: Cannot find module '../../../public/Logo.png' or its corresponding type declarations.
    src/components/ui/calendar.tsx(94,9): error TS2353: Object literal may only specify known properties, and 'table' does not exist in type 'Partial'.
    src/lib/store/studyStore.ts(6,3): error TS2322: Type 'null' is not assignable to type 'string'.
    src/lib/store/studyStore.ts(7
    [output truncated]
  • Verification: "/home/runner/.bun/bin/bun" "/home/runner/work/codeTest/codeTest/node_modules/typescript/bin/tsc" --noEmit --pretty false exits with code 0.

P2 lint failed

  • Location: package.json

  • Source: harness

  • Existing failure: no

  • Impact: The lint check exits with code 1, so the change is not currently passing CI-equivalent verification.

  • Suggested fix: Run bun biome check . locally and fix the reported failure. First output:
    src/app/(with-sidebar)/mypage/components/BarChart/view.tsx:8:3 lint/correctness/noUnusedImports FIXABLE ━━━━━━━━━━

    ! Several of these imports are unused.

    6 │ CartesianGrid,
    7 │ Label,

    8 │ LabelList,
    │ ^^^^^^^^^
    9 │ type LabelProps,
    10 │ ResponsiveContainer,

    i Unused imports might be the result of an incomplete refactoring.

    i Unsafe fix: Remove the unused imports.

    6   6 │     CartesianGrid,
    7   7 │     Label,
    8     │ - ··LabelList,
    9   8 │     type LabelProps,
    

    10 9 │ ResponsiveContainer,

src/app/(with-sidebar)/mypage/components/BarChart/view.tsx:34:7 lint/correctness/noUnusedVariables FIXABLE ━━━━━━━━━━

! This variable CustomColorLabel is unused.

32 │ };
33 │ 

34 │ const CustomColorLabel = (props: LabelProps) => {
│ ^^^^^^^^^^^^^^^^
35 │ const fill = COLORS[(props.index ?? 0) % COLORS.length];
36 │ return <Label {...props} fill={fill} />;

[output truncated]

  • Verification: bun biome check . exits with code 0.

Warnings

  • lint failed with exit code 1.
  • typecheck failed with exit code 2.
  • test failed with exit code 1.
  • build failed with exit code 1.
  • OpenAI review skipped because OPENAI_API_KEY is missing.

@za0012 za0012 closed this Jul 2, 2026
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