Page MenuHomePhabricator

Consider omitting section suggestion when the only sections left to translate are appendix
Closed, ResolvedPublic1 Estimated Story Points

Description

Derived Requirement

Ensure that when generating section translation suggestions via the API:

  • The API does not return a section suggestion if the only remaining untranslated sections of an article are appendix sections.
  • Appendix sections are excluded from suggestion results when no other content sections remain.
  • If at least one non-appendix section remains untranslated, the API returns a suggestion for a non-appendix section.
Test Steps

Preconditions:

  • User is authenticated (if required by the endpoint).
  • An article exists where only appendix sections (e.g., References, External links, See also) remain untranslated.
  • An article exists where at least one non-appendix section remains untranslated.
  • Access to execute API requests (e.g., via browser dev tools, curl, or API console).

Test Case 1: Ensure API omits suggestion when only appendix sections remain

  1. Identify an article where all main content sections are translated and only appendix sections remain.
  2. Call the section suggestion API endpoint for that article with the relevant source and target language parameters.
  3. Inspect the JSON response.
  4. ✅❓❌⬜ AC1: The API response does not include any section suggestion.

QA Results - API

ACStatusDetails
1T409482#11642164

Event Timeline

Nikerabbit triaged this task as Medium priority.Nov 13 2025, 8:50 AM
Nikerabbit moved this task from Needs Triage to Dashboard on the ContentTranslation board.

Is this a duplicate of T403976: Section suggestions: Appendix sections should not be considered as valid suggestions for sections? The filtering based on the existence of non-appendix missing sections was implemented (initial patch) but is now broken following the latest changes. We need to return None if not_appendix_missing list is empty.

Change #1230387 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[research/recommendation-api@master] Section suggestions: Restore validation of non-appendix sections

https://gerrit.wikimedia.org/r/1230387

ngkountas moved this task from Backlog to Needs Code Review on the LPL Hypothesis board.
ngkountas set the point value for this task to 1.

Change #1230387 merged by jenkins-bot:

[research/recommendation-api@master] Section suggestions: Restore validation of non-appendix sections

https://gerrit.wikimedia.org/r/1230387

Change #1240464 had a related patch set uploaded (by KartikMistry; author: KartikMistry):

[operations/deployment-charts@master] Update Recommendation API to 2026-02-10-184357-production

https://gerrit.wikimedia.org/r/1240464

Change #1240464 merged by jenkins-bot:

[operations/deployment-charts@master] Update Recommendation API to 2026-02-10-184357-production

https://gerrit.wikimedia.org/r/1240464

Mentioned in SAL (#wikimedia-operations) [2026-02-19T14:17:45Z] <kart_> Updated Recommendation API to 2026-02-10-184357-production (T409482)

@ngkountas Confirmed no suggestion when the only sections left to translate are the appendix, as seen in the video below. I will move this to Sign-off. Thanks for all your work!

Test Result - API

Status: ✅ PASS
Environment: API
OS: macOS Tahoe 26.3
Browser: Chrome 143
Device: MBA
Emulated Device: NA

Test Artifact(s): Section suggestion UI in CX dashboard or suggestion panel
https://api.wikimedia.org/service/lw/recommendation/api/v1/translation/sections?source=en&target=fr&count=20&search_algorithm=mostpopular

Test Steps

Preconditions:

  • User is authenticated (if required by the endpoint).
  • An article exists where only appendix sections (e.g., References, External links, See also) remain untranslated.
  • An article exists where at least one non-appendix section remains untranslated.
  • Access to execute API requests (e.g., via browser dev tools, curl, or API console).

Test Case 1: Ensure API omits suggestion when only appendix sections remain

  1. Identify an article where all main content sections are translated and only appendix sections remain.
  2. Call the section suggestion API endpoint for that article with the relevant source and target language parameters.
  3. Inspect the JSON response.
  4. AC1: The API response does not include any section suggestion.

GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF moved this task from Needs QA to Design Signoff on the LPL Hypothesis board.

@ngkountas Confirmed no suggestion when the only sections left to translate are the appendix, as seen in the video below. I will move this to Sign-off. Thanks for all your work!

Test Result - API

Status: ✅ PASS
Environment: API
OS: macOS Tahoe 26.3
Browser: Chrome 143
Device: MBA
Emulated Device: NA

Test Artifact(s): Section suggestion UI in CX dashboard or suggestion panel
https://api.wikimedia.org/service/lw/recommendation/api/v1/translation/sections?source=en&target=fr&count=20&search_algorithm=mostpopular

Test Steps

Preconditions:

  • User is authenticated (if required by the endpoint).
  • An article exists where only appendix sections (e.g., References, External links, See also) remain untranslated.
  • An article exists where at least one non-appendix section remains untranslated.
  • Access to execute API requests (e.g., via browser dev tools, curl, or API console).

Test Case 1: Ensure API omits suggestion when only appendix sections remain

  1. Identify an article where all main content sections are translated and only appendix sections remain.
  2. Call the section suggestion API endpoint for that article with the relevant source and target language parameters.
  3. Inspect the JSON response.
  4. AC1: The API response does not include any section suggestion.

Hi @GMikesell-WMF I checked a couple of articles from English to Hindi where only appendix section (see also) is suggested. Wondering are there still some scenarios where this is happening.

Screenshot 2026-03-03 at 11.44.47 AM.png (1×1 px, 208 KB)

Hi @GMikesell-WMF I checked a couple of articles from English to Hindi where only appendix section (see also) is suggested. Wondering are there still some scenarios where this is happening.

Hey @SGautam_WMF, thanks for clarifying in an earlier meeting how you tested and ended up with this example, I'll write it down here so it's documented. The purpose of this ticket is to prevent the recommendation API from returning suggestions that only have appendix sections to translate. That is, making sure that these suggestions do not get listed on the dashboard, and the extend of the dev and the QA for this task was limited to not displaying such suggestions on the dashboard.

From our previous conversation, you shared the way you ended up with the example above was by searching for "Paulissa Siddhanta" directly via the search bar (of course please correct me if I'm wrong). So you uncovered an angle I don't think we had thought about, yet I think it's a different scenario and that it goes beyond the scope of this ticket. I'm not sure what the right action should be when searching via the search bar, we should create a new ticket if want to look into that further.

Nikerabbit moved this task from Design Signoff to Product Signoff on the LPL Hypothesis board.
Nikerabbit subscribed.

To me this behavior seems fine if one has specifically chosen an article. If not, let's create a ticket.