Skip to content

feat: ask the requester whether an unknown project is lf and review lf names missing from pcc (lfx-cdp-insights-ops#815) - #5007

Merged
ulemons merged 1 commit into
mainfrom
feat/issue-815-lf-confirm-question
Oct 16, 2026
Merged

ulemons merged 1 commit into
mainfrom
feat/issue-815-lf-confirm-question

Conversation

@ulemons

@ulemons ulemons commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

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_confirm question. 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" (hint declaredLf: true), "No, it's not LF" (hint treatAsNew: 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).
  • Answers. No → today's flow (evaluation, then create_segment). Yes → PCC lookup again; if still unmatched, review. Not sure → hand-off, reason the requester isn't sure whether Dummy Name is an LF project.
  • F3 is a review, not a skip. lf_not_in_pcc now routes to review with proposedAction = human_review, reason "Dummy Name is described as an LF project, but it isn't in the foundation project list yet". New review case not_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 canAsk option (computed once in classifyCatalogRow from the provenance and the requester) so that rows that cannot be asked keep today's non_lf_new_project resolution, trace node and alert.

Closes linuxfoundation/lfx-cdp-insights-ops#815

Test plan

  • pnpm tsc-check, pnpm lint --deny-warnings
  • Unit tests: resolver (question, answers, no question when LF status is stated or the name is missing), routing (F3 → review), classification (bot row asks, discovery row evaluates, both answers), review card, thread reply, hand-off reason (438 tests)
  • Prod, after deploying api and projects-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 → Reject
    • same with "Yes, it's an LF project" → card "Not in the foundation project list" with Mark as done / Reject
    • same with "Not sure, ask the CDP team" → status with the CDP team: the requester isn't sure whether Dummy Name is an LF project
    • onboard Dummy Name, LF project, https://github.com/<free repo> → review card directly, no question (was a skip)
    • /crowd onboard-project or discovery row with an unknown name → evaluation as before, no question

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 16, 2026 13:46
@ulemons ulemons self-assigned this Oct 16, 2026
@cursor

cursor Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes onboarding classification and routing for unknown LF projects and Slack bot flows; mis-routing could send requests to evaluation vs manual review incorrectly, but behavior is gated by provenance and covered by extensive unit tests.

Overview
Adds an lf_confirm Slack bot question when a project name is missing from PCC and LF status is unstated, so requesters choose LF vs non-LF before evaluation (only when canAsk is true: slack-bot provenance with a requester).

lf_not_in_pcc is no longer skipped: it routes to review with human_review, a new not_in_pcc review card/thread copy (PCC check + CDP setup), and updated classification mapping. Answer hints (declaredLf / treatAsNew) drive re-resolution on the next pass; discovery/API rows keep prior behavior without prompting.

Reviewed by Cursor Bugbot for commit 0a370c6. Bugbot is set up for automated code reviews on this repo. Configure here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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>
Copilot AI balanced review requested due to automatic review settings October 16, 2026 13:59
@ulemons
ulemons force-pushed the feat/issue-815-lf-confirm-question branch from 532dfef to 0a370c6 Compare October 16, 2026 13:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The changes reuse existing question and manual-review flows, with focused regression coverage and no identified blocking issues.

0 open findings

🧠 Review effort: Balanced

@ulemons
ulemons merged commit 5c00b78 into main Oct 16, 2026
15 checks passed
@ulemons
ulemons deleted the feat/issue-815-lf-confirm-question branch October 16, 2026 14:17
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