Skip to content

fix: stabilize ai inspector worker execution#490

Merged
manNomi merged 4 commits intomainfrom
codex/fix-turbo-web-build-env-warnings
Mar 27, 2026
Merged

fix: stabilize ai inspector worker execution#490
manNomi merged 4 commits intomainfrom
codex/fix-turbo-web-build-env-warnings

Conversation

@manNomi
Copy link
Copy Markdown
Contributor

@manNomi manNomi commented Mar 27, 2026

Summary\n- include web build env groups in turbo to remove missing env warnings\n- avoid Firestore composite index requirement when claiming queued inspector tasks\n- configure git author in AI Inspector Worker workflow so worker commits can be created on Actions runner\n\n## Verification\n- node --check .github/scripts/ai-inspector-worker.mjs\n- manually dispatched AI Inspector Worker workflow on this branch\n - run 23637510433 succeeded\n - worker log showed no queued inspector tasks\n

@manNomi manNomi requested review from enunsnv and wibaek as code owners March 27, 2026 08:22
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
solid-connect-web-admin Ready Ready Preview, Comment Mar 27, 2026 8:46am
solid-connection-web Ready Ready Preview, Comment Mar 27, 2026 8:46am

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

Warning

Rate limit exceeded

@manNomi has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 14 minutes and 4 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 14 minutes and 4 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 03eca4a4-280f-460e-a748-cc38e3a82b00

📥 Commits

Reviewing files that changed from the base of the PR and between 6c57cb9 and 8547143.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (6)
  • .github/scripts/ai-inspector-worker.mjs
  • .github/workflows/ai-inspector-worker.yml
  • README.md
  • package.json
  • scripts/ai-inspector-worker-loop.mjs
  • turbo.json

고차원적 변경 사항 정리

이 풀 리퀘스트는 AI Inspector 워커를 GitHub Actions 자동화에서 로컬 프로세스 기반 실행으로 전환합니다.

  1. 워커 스크립트 리팩토링

    • 깃허브 토큰과 저장소 정보를 동적으로 해결하도록 변경
    • 함수 시그니처를 수정하여 명시적 매개변수로 전달
    • Firestore 작업 쿼리에서 orderBy 제거 후 메모리에서 정렬
  2. GitHub Actions 워크플로우 제거

    • .github/workflows/ai-inspector-worker.yml 삭제 (41줄 제거)
    • 기존 크론 스케줄 기반 실행 구조 폐기
  3. 로컬 실행 환경 구성

    • 새로운 루프 스크립트 추가: scripts/ai-inspector-worker-loop.mjs
    • package.jsonai-inspector:workerai-inspector:worker:loop npm 스크립트 추가
    • firebase-admin 의존성 추가
  4. 문서 및 빌드 설정 업데이트

    • README.md에서 "GitHub secrets (worker)" 섹션을 "Local worker env" 섹션으로 변경
    • turbo.json의 빌드 작업 환경 변수 확장 (Sentry, Firebase, AI Inspector 관련 변수 포함)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~35 minutes

Suggested reviewers

  • wibaek
  • enunsnv
🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 변경사항의 핵심 목표인 'AI inspector worker 실행 안정화'를 명확하게 반영하고 있으며, 기술적이고 구체적입니다.
Description check ✅ Passed PR 설명에서는 '관련 이슈' 섹션이 누락되었으나, 핵심 변경사항 3가지(turbo env 설정, Firestore 인덱스 요구사항 제거, git author 설정)와 검증 내용(syntax 체크, workflow 수동 실행)이 명확하게 기술되었습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-turbo-web-build-env-warnings

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 and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

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: 31b8e1efdd

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

- name: Install worker dependencies
run: npm install firebase-admin
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Install worker dependency without mutating tracked files

Change this step to avoid npm saving into the repo (npm install --no-save firebase-admin or preinstall via the workspace lockfile). In this workflow, npm install firebase-admin runs before the script does git checkout -B ..., and npm’s default save=true (confirmed via npm config get save) updates tracked package.json; that makes git checkout fail with local changes when a queued task is actually processed, so the worker cannot claim/commit tasks.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

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: 85471436c9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines 260 to 262
.where("status", "==", "queued")
.orderBy("createdAt", "asc")
.limit(10)
.get();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Order queued tasks before applying limit

This query now applies limit(10) without any Firestore orderBy, then sorts only the fetched subset in memory, so when more than 10 tasks are queued the worker no longer sees the true oldest tasks. In production backlogs, newer requests can be processed ahead of older ones and older tasks can be delayed indefinitely under sustained load, which is a regression from the previous FIFO behavior.

Useful? React with 👍 / 👎.

@manNomi manNomi merged commit b5e07e9 into main Mar 27, 2026
9 checks passed
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