Currently, the Recommendation API considers a section suggestion valid and returns is as a recommendation, only it if has at least one missing section.
Similarly, if the size filter is present, a section suggestion is required to have at least one missing section that falls within the requested size range, in order to be considered valid.
This task proposes to only consider non-appendix missing sections when validating the section suggestions in Recommendation API, so that we do not suggest to the user section suggestions that only have appendix sections missing, or suggest section suggestions with only appendix easy sections when easy section suggestions are requested.
Derived Requirement
Update the Recommendation API to exclude appendix sections when validating section suggestions. The API should only consider non-appendix missing sections as valid suggestions.
If all missing sections are appendix sections, they should not be returned as valid recommendations, regardless of size filter or difficulty level (e.g., “easy” sections).
Test Steps
Test Case 1: Ensure appendix-only section suggestions are not returned
- Access the Recommendation API endpoint on beta wiki.
- Request section suggestions for an article that only has missing appendix sections (e.g., “References”, “Bibliography”, “External links”).
- ✅❓❌⬜ AC1: Confirm that the API does not return any section suggestions for appendix-only sections.
Test Case 2: Ensure non-appendix section suggestions are still returned
- Access the Recommendation API endpoint.
- Request section suggestions for an article that has missing non-appendix sections (e.g., “History”, “Geography”).
- ✅❓❌⬜ AC2: Confirm that valid section suggestions are returned for non-appendix sections.
Test Case 3: Ensure appendix sections are excluded when size filter is applied
- Access the Recommendation API endpoint with a size filter applied (e.g., medium).
- Request section suggestions for an article with both appendix and non-appendix missing sections.
- ✅❓❌⬜ AC3: Confirm that only non-appendix missing sections within the requested size range are included in the results.
Test Case 4: Ensure appendix sections are excluded for “easy” section suggestions
- Access the Recommendation API endpoint with the difficulty filter set to “easy”.
- Request section suggestions for an article with only appendix sections labeled as “easy”.
- ✅❓❌⬜ AC4: Confirm that no “easy” appendix sections are returned as valid suggestions.
QA Results - TestWiki
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T403976#11251943 |
| 2 | ✅ | T403976#11251943 |
| 3 | ✅ | T403976#11251943 |
| 4 | ✅ | T403976#11251943 |



