Repository navigation
feat: ask the requester whether an unknown project is lf and review lf names missing from pcc (lfx-cdp-insights-ops#815) - #5007
Conversation
PR SummaryMedium Risk Overview
Reviewed by Cursor Bugbot for commit 0a370c6. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
🟢 Approval recommended
The scoped confirmation and manual-review changes have focused test coverage and no identified blocking issues; tests were not rerun.
0 open findings
What changed in this PR
Adds LF-status confirmation to the onboarding bot and sends declared LF projects missing from PCC to manual review instead of skipping them.
Changes:
- Asks eligible requesters whether an unknown project is LF, preserving existing routing for other sources.
- Routes LF projects missing from PCC to human review.
- Adds review messaging and tests for confirmation, answers, and hand-offs.
| File | Description |
|---|---|
| services/libs/project-onboarding/src/routing.ts | Routes missing PCC projects to review. |
| services/libs/project-onboarding/src/routing.test.ts | Tests revised review routing. |
| services/libs/project-onboarding/src/reviewCard.ts | Selects the new review case and project name. |
| services/libs/project-onboarding/src/reviewCard.test.ts | Tests missing-PCC case selection. |
| services/libs/project-onboarding/src/requestResolver.ts | Adds optional LF confirmation. |
| services/libs/project-onboarding/src/requestResolver.test.ts | Tests confirmation eligibility and answers. |
| services/libs/project-onboarding/src/requestQuestion.ts | Adds confirmation hand-off wording. |
| services/libs/project-onboarding/src/requestQuestion.test.ts | Tests the hand-off reason. |
| services/libs/project-onboarding/src/classifyRequest.ts | Passes resolver options through. |
| services/libs/project-onboarding/src/classifyCatalogRow.ts | Computes question eligibility and manual-review proposals. |
| services/libs/project-onboarding/src/classifyCatalogRow.test.ts | Tests classification and routing outcomes. |
| services/libs/project-onboarding/src/botThreadReply.ts | Explains the PCC review next step. |
| services/libs/project-onboarding/src/botThreadReply.test.ts | Tests the new thread reply. |
| services/libs/project-onboarding/src/botCopy.ts | Adds missing-PCC review instructions. |
| services/libs/project-onboarding/src/botCopy.test.ts | Tests review wording. |
| services/libs/data-access-layer/src/project-catalog/types.ts | Adds the lf_confirm question kind. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…f names missing from pcc Refs linuxfoundation/lfx-cdp-insights-ops#815 Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
532dfef to
0a370c6
Compare
Summary
Second part of #815 (the first was the explicit non-LF copy in #4990). A request whose project name is unknown to PCC and that does not say whether the project is LF no longer goes straight to the LLM evaluation and a non-LF creation: the bot asks the requester first, and a name declared LF but missing from PCC ends in a manual review instead of a skip.
lf_confirmquestion. When the name is not in the foundation project list, the message does not state LF or non-LF, and the request comes from the bot with a known requester, the resolver returns a question: "I couldn't find Dummy Name in the foundation project list. Is it a Linux Foundation project?" with "Yes, it's an LF project" (hintdeclaredLf: true), "No, it's not LF" (hinttreatAsNew: true) and "Not sure, ask the CDP team" (hand-off). Same mechanic as Remove hash function for star and follow activity sourceId generation #805: ❓ on the mention, "needs your input" status, re-run on the answer, only the requester or a reviewer can answer. No question when the message already says LF or non-LF, when there is no project name, or for rows without a requester (discovery, API, manual command keep today's routing).create_segment). Yes → PCC lookup again; if still unmatched, review. Not sure → hand-off, reasonthe requester isn't sure whether Dummy Name is an LF project.lf_not_in_pccnow routes to review withproposedAction = human_review, reason "Dummy Name is described as an LF project, but it isn't in the foundation project list yet". New review casenot_in_pcc: "Not in the foundation project list · Check Dummy Name with PCC, then create it in CDP, add this repo and mark as done", Open in CDP ↗ and Mark as done / Reject; thread reply "I've asked the CDP team to check it with PCC and add it; they'll let you know here."The resolver takes a
canAskoption (computed once inclassifyCatalogRowfrom the provenance and the requester) so that rows that cannot be asked keep today'snon_lf_new_projectresolution, trace node and alert.Closes linuxfoundation/lfx-cdp-insights-ops#815
Test plan
pnpm tsc-check,pnpm lint --deny-warningsapiandprojects-evaluation-worker:onboard https://github.com/<free repo> to Dummy Name→ question with three plain buttons; "No, it's not LF" → evaluation → "Create a new non-LF project" card → Rejectwith the CDP team: the requester isn't sure whether Dummy Name is an LF projectonboard Dummy Name, LF project, https://github.com/<free repo>→ review card directly, no question (was a skip)/crowd onboard-projector discovery row with an unknown name → evaluation as before, no question🤖 Generated with Claude Code