Repository navigation
lfx-url: accept program URLs from the new LFX Mentorship site - #2142
Conversation
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>
There was a problem hiding this comment.
🟢 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
|
I think we'll need to update lfx-proposal-approvals.yml as well, it also references the old URL. This is the mentoring/.github/workflows/lfx-proposal-approvals.yml Lines 479 to 481 in 97525d8 |
nate-double-u
left a comment
There was a problem hiding this comment.
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 inescapeLinkLabelstill holds; andcsv.js/readme.jsonly echolfx_urlverbatim, 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.jscomment 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>
|
Thanks @nate-double-u, both points are in 3576d8b:
Agreed on the lfx-url tests: 83 pass. |
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
left a comment
There was a problem hiding this comment.
Thanks for this @mlehotskylf!
@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 underhttps://mentorship.lfx.linuxfoundation.org/project/<uuid>, and legacy links redirect to the new pages.Change
lib/lfx-url.js:LFX_PROGRAM_URL_REaccepts 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-urldescription 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 onmainbefore this change and unrelated to/lfx-url.🤖 Generated with Claude Code