ci: refine PR triage and stabilize checks#959
Conversation
|
Caution Review failedFailed to post review comments 📝 WalkthroughWalkthroughAdds PR type inference and updated label planning for release-bump PRs; changes labeler rules to route ChangesPR Type Classification and Label Planning
Prompt submission and follow-up extraction
Session follow-ups and persistence
Desktop Electron install detection
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request shifts PR type labeling from static configuration in .github/labeler.yml to dynamic script-based inference in .github/scripts/pr-priority-triage.js. It introduces automated detection for release-bump PRs as "task" types without overriding user-selected labels. A review comment suggests adding a default parameter to classifyPullRequestType to prevent potential runtime errors if called without arguments.
Perf delta summaryComparator: pass
|
There was a problem hiding this comment.
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 `@packages/app/src/components/prompt-input/submit.test.ts`:
- Around line 3-13: The test harness has weakened types (Prompt,
PromptSubmitInputForTest, createPromptSubmit, sendFollowupDraft) using any and
forced casts; restore strong typing by importing the real types/interfaces used
by the implementation (e.g., the Prompt/Message type and the SubmitInput
contract from submit.ts or its exported types) and replace the loose definitions
with those concrete types (ensure Prompt is the correct array element type,
PromptSubmitInputForTest matches the real props like navigate: (path:
string)=>void, routeParams: ()=>{dir?:string;id?:string}, promptLength: (value:
Prompt)=>number, onQueue: (draft: DraftType)=>void). Also type
createPromptSubmit and sendFollowupDraft to the exact exported function
signatures instead of using as unknown as, and remove any stray index-signature
[key:string]: any so the compiler will surface API drift.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 4abdb17c-456b-4b40-8f3a-390731ac26d0
📒 Files selected for processing (14)
.github/scripts/pr-priority-triage.jspackages/app/src/components/prompt-input.tsxpackages/app/src/components/prompt-input/draft-isolation.integration.test.tspackages/app/src/components/prompt-input/followup-draft.tspackages/app/src/components/prompt-input/submit-ownership.test.tspackages/app/src/components/prompt-input/submit.test.tspackages/app/src/components/prompt-input/submit.tspackages/app/src/pages/session/composer/session-composer-region.tsxpackages/app/src/pages/session/session-action-readiness.test.tspackages/app/src/pages/session/use-session-followups.test.tspackages/app/src/pages/session/use-session-followups.tspackages/desktop-electron/scripts/repair-electron-install.mjspackages/desktop-electron/scripts/repair-electron-install.test.tspackages/opencode/test/github/pr-triage-workflow.test.ts
✅ Files skipped from review due to trivial changes (2)
- packages/app/src/pages/session/composer/session-composer-region.tsx
- packages/app/src/components/prompt-input/submit-ownership.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/opencode/test/github/pr-triage-workflow.test.ts
# Conflicts: # packages/desktop-electron/scripts/repair-electron-install.mjs
# Conflicts: # packages/desktop-electron/scripts/repair-electron-install.mjs # packages/desktop-electron/scripts/repair-electron-install.test.ts
Summary
pr-triageinfertaskonly for desktop release bump-only PRs.pr-triageon PR label changes so author-added type labels recover failed label-policy checks without manual reruns.No GitHub issue; this follows the local STATUS.md CI labeler refactor item and includes CI follow-up fixes needed to get this PR green.
Why
Release bump PRs previously needed an
enhancementworkaround because a manually addedtasklabel could be removed by the labeler sync pass. Type labels should be author/script-owned, while labeler continues to own routing labels and pr-triage continues to own priority labels.During validation, CI exposed unrelated but blocking instability in app prompt/follow-up tests and desktop Electron repair. Those fixes are included here so the PR's CI signal is clean on the current head.
Related Issue
No GitHub issue.
Human Review Status
Pending
Review Focus
Please check these four surfaces:
task; routing and priority behavior remain unchanged; label changes re-runpr-triage.Risk Notes
pr-triageon this PR.packages/apptypecheck.desktop-smokeon macOS arm64.How To Verify
Screenshots or Recordings
Not required; no visible UI or copy changed.
Checklist
bug,enhancement,task,documentation.app,ui,platform,harness,ci.P0,P1,P2,P3.Pending,Approved by @<reviewer>, orNot required: <reason>.dev, and my PR title and commit messages use Conventional Commits in English.Summary by CodeRabbit
Release Notes
New Features
Chores