Skip to content

fix(nexu-pal): skip triage for internal issue authors#599

Merged
nettee merged 1 commit intomainfrom
bypass-triage
Mar 27, 2026
Merged

fix(nexu-pal): skip triage for internal issue authors#599
nettee merged 1 commit intomainfrom
bypass-triage

Conversation

@nettee
Copy link
Copy Markdown
Contributor

@nettee nettee commented Mar 27, 2026

What

Skip the opened-issue triage flow for issues created by internal organization members after translation and bug classification.

Why

Internal team issues should still get AI translation and automatic bug labeling, but they should not be routed through the external intake flow that adds needs-information, known-issue checks, or needs-triage.

How

  • pass issue.author_association from the issue-opened workflow into the triage script
  • treat MEMBER and OWNER as internal authors in the triage engine
  • short-circuit the opened-issue plan after translation and bug classification for internal authors
  • log the author association in diagnostics and document the new behavior

Affected areas

  • Desktop app (Electron shell)
  • Controller (backend / API)
  • Web dashboard (React UI)
  • OpenClaw runtime
  • Skills
  • Shared schemas / packages
  • Build / CI / Tooling

Checklist

  • pnpm typecheck passes
  • pnpm lint passes
  • pnpm test passes
  • pnpm generate-types run (if API routes/schemas changed)
  • No credentials or tokens in code or logs
  • No any types introduced (use unknown with narrowing)

Notes for reviewers

pnpm lint and pnpm test do not pass in the current local environment because workspace dependencies/tooling are not installed (node_modules missing, vitest not found, and TypeScript tooling is not ready). Syntax checks for the touched nexu-pal scripts passed.

Summary by CodeRabbit

  • Chores
    • Enhanced issue triage automation to differentiate issues by author type (internal vs. external)
    • Internal team members' issues now skip certain triage checks for faster processing
    • External user submissions continue to receive full triage evaluation and automated labeling
    • Improved workflow efficiency for team-authored issues while maintaining standard assessment for external reports

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 27, 2026

📝 Walkthrough

Walkthrough

The pull request adds GitHub issue author association detection to the triage pipeline. A new environment variable ISSUE_AUTHOR_ASSOCIATION is introduced through the GitHub Actions workflow and passed to the triage engine. Internal authors (MEMBER or OWNER) now trigger an early return, skipping roadmap matching, duplicate detection, and completeness checks.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
.github/workflows/nexu-pal-issue-opened.yml
Added ISSUE_AUTHOR_ASSOCIATION environment variable sourced from GitHub issue event data.
Triage Pipeline Logic
scripts/nexu-pal/lib/triage-opened-engine.mjs
Added isInternalIssueAuthor() helper; extended buildOpenedIssueTriagePlan() signature with issueAuthorAssociation parameter; reordered bug classification earlier; added early-return control flow for internal authors to bypass roadmap/duplicate/completeness checks.
Issue Processing Script
scripts/nexu-pal/process-issue-opened.mjs
Reads ISSUE_AUTHOR_ASSOCIATION environment variable and passes it to buildOpenedIssueTriagePlan().
Documentation
specs/current/nexu-pal.md
Updated opened-issue triage pipeline specification to document internal-member short-circuit behavior and conditional gating of completeness checks and needs-triage labeling.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested reviewers

  • PerishCode
  • alchemistklk
  • mrcfps

Poem

🐰 A whisker's twitch, author checked with care,
Internal members skip the triage snare,
Bug classification jumps the queue so fast,
Diagnostics logged, the short-circuit's cast! 🎯

🚥 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 The title clearly and concisely summarizes the main change: skipping triage for internal issue authors, which is the primary objective of the PR.
Description check ✅ Passed The description follows the template with all major sections completed: What, Why, How, Affected areas (with Build/CI/Tooling checked), and Checklist items addressed. Specific implementation details and rationale are provided.

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

✨ 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 bypass-triage

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

@coderabbitai coderabbitai Bot left a comment

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 the current code and only fix it if needed.

Inline comments:
In `@scripts/nexu-pal/lib/triage-opened-engine.mjs`:
- Around line 253-258: Add a unit test for buildOpenedIssueTriagePlan that
passes issueAuthorAssociation="MEMBER" (or "OWNER") to exercise the
internal-author short-circuit path; assert the function returns early (e.g.,
returns the diagnostics/plan indicating short-circuit) and that diagnostics
explicitly note that roadmap matching, duplicate detection, completeness
assessment, and triage labeling were skipped; also verify downstream helpers
(the roadmap matcher, duplicate detector, completeness assessor, and triage
labeler mocks) were not invoked. Ensure the test uses the same invocation
signature (issueTitle, issueBody, chat) and inspects the returned
diagnostics/messages to confirm the short-circuit explanation is present.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 190b6eb4-f69a-459f-acf3-79899a9b898d

📥 Commits

Reviewing files that changed from the base of the PR and between d67c73a and 2924af4.

📒 Files selected for processing (4)
  • .github/workflows/nexu-pal-issue-opened.yml
  • scripts/nexu-pal/lib/triage-opened-engine.mjs
  • scripts/nexu-pal/process-issue-opened.mjs
  • specs/current/nexu-pal.md

Comment thread scripts/nexu-pal/lib/triage-opened-engine.mjs
@nettee
Copy link
Copy Markdown
Contributor Author

nettee commented Mar 27, 2026

/cr 组织内成员创建的 issue 跳过分拣流程

@slack-code-review-channel
Copy link
Copy Markdown

✅ CR topic created in Feishu topic group Refly CR.

@nettee nettee merged commit e7b58d9 into main Mar 27, 2026
6 checks passed
@lefarcen lefarcen mentioned this pull request Mar 30, 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.

2 participants