Skip to content

lfx-url: accept program URLs from the new LFX Mentorship site - #2142

Merged
nate-double-u merged 2 commits into
cncf:mainfrom
mlehotskylf:lfx-url-new-shape
Oct 28, 2026
Merged

nate-double-u merged 2 commits into
cncf:mainfrom
mlehotskylf:lfx-url-new-shape

Conversation

@mlehotskylf

Copy link
Copy Markdown
Contributor

@nate-double-u as discussed on Slack: LFX Mentorship moves to a new platform in late October 2026, and program pages there look like https://mentorship.linuxfoundation.org/programs/<uuid>. The UUID is the same one the legacy site used under https://mentorship.lfx.linuxfoundation.org/project/<uuid>, and legacy links redirect to the new pages.

Change

  • lib/lfx-url.js: LFX_PROGRAM_URL_RE accepts both shapes. Everything already recorded in previous terms keeps passing.
  • test/lfx-url.test.js: a new-shape URL passes; a legacy host with the new path, or the new host with the legacy path, is rejected.
  • ADMIN_GUIDE.md: the /lfx-url description names both shapes.

Nothing else in the automation parses the URL; the export and the README generator reuse the recorded string as is.

Testing

node --test test/lfx-url.test.js: 83 pass. The full suite has 6 failures that are present on main before this change and unrelated to /lfx-url.

🤖 Generated with Claude Code

LFX Mentorship moves to https://mentorship.linuxfoundation.org in late
October 2026. Program pages there are /programs/<uuid>, with the same
UUID the legacy site used under /project/<uuid>, and legacy links
redirect to the new pages. Accept both shapes in /lfx-url so recorded
URLs from the new site pass the check; everything already recorded
keeps passing.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>

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 narrow validator change preserves legacy compatibility, includes focused regression coverage, and has no identified blocking issues.

No open issues 🎉

What changed in this PR

Updates the /lfx-url validator to accept program URLs from the new LFX Mentorship site while preserving support for legacy links.

Changes:

  • Accepts both supported host/path combinations with the existing UUID validation.
  • Adds regression tests for new-site URLs and rejects mismatched host/path combinations.
  • Documents both URL formats in the administrator guide.
File Description
programs/​lfx-mentorship/​automation/​test/​lfx-url.test.js Tests new-site acceptance and mismatched host/path rejection.
programs/​lfx-mentorship/​automation/​lib/​lfx-url.js Extends URL validation to support both site formats.
programs/​lfx-mentorship/​automation/​ADMIN_GUIDE.md Documents both accepted program URL formats.

Review effort: Balanced

@nate-double-u

nate-double-u commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

I think we'll need to update lfx-proposal-approvals.yml as well, it also references the old URL. This is the /lfx-url rejection message:

await reply('❌',
'That isn\'t an LFX Mentorship program URL. ' +
'Expected `https://mentorship.lfx.linuxfoundation.org/project/<id>`.');

@nate-double-u nate-double-u left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for this @mlehotskylf! I appreciate you making the updates.

I put my agent on a review, it sometimes does better than online-copilot. Here's what it came up with:

A few more notes from going over this:

Verified: the new test fails against main's validator and passes with the change; the regex stays anchored and pairs each host with its path, so the "URLs are validated upstream" assumption in escapeLinkLabel still holds; and csv.js / readme.js only echo lfx_url verbatim, so recording as-given (no normalization) is the right call.

Follow-up, not for this PR: lfx-proposal-validate.yml (the LFID verification stub, ~L436) also points to the legacy host. Not coupled to the URL check and still resolves today, so a separate PR at cutover is fine.

Nit: the lfx-url.js comment opens with "The exact shape of an LFX Mentorship program URL. Two shapes are accepted"; singular then two. "The exact shapes of…" or drop "exact".

So I think the only real update we need is the one I pointed out above.

…ording

The /lfx-url rejection message still expected only the legacy
/project/<id> shape, so after the switch an admin who pastes a wrong URL
would be pointed at the old site. It now names the new shape first and
the legacy one second. Also reword the comment above the regex.

Addresses review feedback from @nate-double-u.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
@mlehotskylf

Copy link
Copy Markdown
Contributor Author

Thanks @nate-double-u, both points are in 3576d8b:

  • Rejection message in lfx-proposal-approvals.yml: it now expects https://mentorship.linuxfoundation.org/programs/<id> and mentions the legacy /project/<id> shape as the alternative.
  • Comment wording in lfx-url.js: "The accepted shapes of an LFX Mentorship program URL. There are two:"

Agreed on the lfx-proposal-validate.yml verification link: I'll send that one-line PR on the day we switch, so the new address doesn't go out on proposal issues before launch. Until then the old link keeps working, as it redirects after the switch.

lfx-url tests: 83 pass.

mlehotskylf added a commit to linuxfoundation/lfx-mentorship that referenced this pull request Oct 27, 2026
Address review comments from copilot-pull-request-reviewer:

- docs/rewrite/10-release-plan.md: Tuesday's reminder ran after the
  allowlist was removed (7:20 AM), so it reached real users; the record
  said testers only.
- docs/rewrite/10-release-plan.md: the LaunchDarkly cleanup removes every
  reader of mentorship-enabled (the guard and SidebarNavService), deploys,
  then deletes the flag, so Mentorship stays in the sidebar.
- docs/rewrite/10-release-plan.md: the CNCF bot item is still open after
  go-live; ask Nate to merge cncf/mentoring#2142 now.
- docs/rewrite/10-release-plan.md: add an after-release check that the
  approver roster was restored after the import.

Resolves 9 review threads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
@nate-double-u
nate-double-u requested a balanced review from Copilot October 28, 2026 16:29

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

No active review issues remain for the update supporting both new-platform and legacy LFX program URLs.

No open issues 🎉

Review effort: Balanced

@nate-double-u nate-double-u left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for this @mlehotskylf!

@nate-double-u
nate-double-u merged commit 7b5acb0 into cncf:main Oct 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

3 participants