Skip to content

fix(ci): fall back to REST for live-base availability - #416

Merged
seonghobae merged 2 commits into
mainfrom
fix/ci-live-base-rest-fallback
Aug 17, 2026
Merged

fix(ci): fall back to REST for live-base availability#416
seonghobae merged 2 commits into
mainfrom
fix/ci-live-base-rest-fallback

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Problem

PR #412 application CI run 32052374630 failed twice at verify live pull-request base before lockfile control. Exact-head jobs 95460492226 and rerun 95463563690 each exhausted the existing three-attempt GraphQL retry contract while resolving the live main tip. #412 already contains protected main 965939e305f5addc5bfca3001b901b9cac5863df, so the repeated failure is the Noema-owned live-base transport reliability boundary rather than an ancestry defect.

RED → GREEN lineage

  • RED 3d39cb90d9947e61c3424b188f47eda07bfa3995: added test/ci-live-base-rest-fallback.test.ts, requiring both pre- and post-verification resolvers to have a live Git-ref REST fallback and forbidding PR snapshot github.event.pull_request.base.sha as authority. Its initial runs were superseded when the repair head was pushed.
  • GREEN 3b24d033bfcbf5f475361d00d482378b4696f7f4: preserves the three bounded GraphQL attempts for HTTP 502/503/504; only after all three transient availability failures does it perform one fail-closed GET repos/${GITHUB_REPOSITORY}/git/ref/heads/${NOEMA_PR_BASE_REF} read. Non-transient GraphQL errors still fail immediately, raw diagnostics are not exposed, and the returned SHA still passes the existing 40-hex, ancestry and mid-run drift checks.

Exact-head evidence

For unchanged head 3b24d033bfcbf5f475361d00d482378b4696f7f4:

  • application CI 32055665137: success — exact checkout, live-base verification, lockfile control, full release verify, and final live-base drift refusal all passed;
  • reviewer-ci 32055665227: success;
  • central Security Scan 32055665181: success;
  • formal submitted reviews: 0;
  • unresolved review threads: 0;
  • live ruleset 18794436 requires the central Security Scan workflow and contains no counted-approval rule or bypass actor.

The PR is Ready. No predecessor-head evidence is used as current success.

Ownership

Only Noema CI/test code is changed. No dedicated dependency repository is mutated.

Summary by CodeRabbit

  • 버그 수정

    • 기준 브랜치 SHA 확인 중 일시적인 API 오류가 발생하면 최대 3회 재시도합니다.
    • GraphQL 조회가 최종 실패할 경우 REST API로 자동 전환합니다.
    • REST 조회까지 실패하면 명확한 오류 메시지를 표시하고 검증을 중단합니다.
  • 테스트

    • GraphQL 실패 후 REST API로 전환되는 시나리오를 검증하는 테스트를 추가했습니다.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 38cc3009-1b93-4947-b290-82332956354c

📥 Commits

Reviewing files that changed from the base of the PR and between 965939e and 3b24d03.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • test/ci-live-base-rest-fallback.test.ts

📝 Walkthrough

Walkthrough

CI 워크플로의 두 기준 브랜치 조회 경로가 일시적인 GraphQL 오류를 최대 3회 재시도합니다. 재시도 후 실패하면 REST API로 SHA를 조회합니다. 새 Vitest 테스트가 두 REST 폴백과 실패 메시지를 검증합니다.

Changes

기준 브랜치 SHA 조회

Layer / File(s) Summary
GraphQL 재시도와 REST 폴백
.github/workflows/ci.yml, test/ci-live-base-rest-fallback.test.ts
두 검증 경로가 GraphQL 502/503/504 오류를 최대 3회 재시도합니다. 재시도 후 실패하면 REST API에서 SHA를 조회합니다. REST 조회 실패 메시지와 기존 github.event.pull_request.base.sha 참조 부재를 테스트합니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CI워크플로
  participant GitHubGraphQLAPI
  participant GitHubRESTAPI
  CI워크플로->>GitHubGraphQLAPI: 기준 브랜치 SHA 조회
  GitHubGraphQLAPI-->>CI워크플로: 502/503/504 오류
  CI워크플로->>GitHubGraphQLAPI: 최대 3회 재시도
  CI워크플로->>GitHubRESTAPI: live Git ref 조회
  GitHubRESTAPI-->>CI워크플로: 기준 브랜치 SHA 반환
Loading
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-live-base-rest-fallback

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.

@seonghobae
seonghobae marked this pull request as ready for review August 17, 2026 18:44
@cursor

cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@seonghobae
seonghobae merged commit 28fb5db into main Aug 17, 2026
12 of 14 checks passed
@seonghobae
seonghobae deleted the fix/ci-live-base-rest-fallback branch August 17, 2026 18: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.

1 participant