Cleanup unused feature flags on testing/production
Closes: https://github.com/internetarchive/openlibrary/issues/12946
Problem
The only feature flag still used is debug. The rest have been removed as part of https://github.com/internetarchive/openlibrary/issues/12946
We should remove them and just generally make sure our config is somewhat in sync across local/testing/prod.
Breakdown
Implementation Details (for maintainers)
Requirements Checklist
- [ ]
Related files
Stakeholders
Instructions for Contributors
- Please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.
⚠️ Contributors, this issue requires access to the testing server's deployment configuration (not in the public repo). It can only be resolved by a maintainer or staff member with access to the testing environment.
Context
- PR #12888 (merged Jun 2026) removed 6 unused feature flags from
conf/openlibrary.ymlin the repo — this issue is the natural follow-up for the testing server config. - All 4 flags (
corrections,loanstats,my_books_dropper,multi_commit_edits) are confirmed absent fromconf/openlibrary.ymlon master, and none are referenced viafeatures.is_enabled()anywhere in the Python or HTML codebase. my_books_dropperwas previously inconf/openlibrary.ymlbut was removed in commit0114546e1(Nov 2023, #8539) when the legacy dropper code was removed; the functionality is now unconditionally available as a FastAPI partial at/partials/MyBooksDropperLists.json.loanstatsexists as a module (openlibrary/views/loanstats.py) but is not a feature flag gate anywhere — it's referenced by import, not viais_enabled('loanstats').correctionsandmulti_commit_editshave no references in the codebase at all.
Issue Assessment
Needs: Breakdown is appropriate — the issue doesn't specify which file(s) hold the testing server config or the process for updating it. The breakdown should clarify:
- [x] Identify and document the location of the testing-environment config file
- [ ] Remove the 4 listed flags from the testing config
- [ ] Optionally: ensure prod config parity as well (confirm these flags aren't in prod config either)
Full triage checklist (maintainers / Richy)
- [x] Triage —
Affects: Admin/Maintenanceadded; existing labels preserved - [x] Problem / opportunity — clear: 4 dead flags on testing create maintenance confusion
- [x] Scope — well-scoped; the 4 specific flags are named
- [x] Justification — config drift; aligns with ongoing flag cleanup work (#12888)
- [ ] Success & testing criteria — not stated; success is
features.is_enabled(flag)returning false on testing for each of the 4 flags - [ ] Proposal & breakdown — placeholder only; needs the testing config file path and update procedure
- [ ] Richy context — codebase confirms all 4 flags are unused; prior cleanup PR #12888 is the predecessor work
- [ ] References — PR #12888 should be linked in the issue body
[!NOTE] This comment was automatically generated by Richy, via PAM, Open Library's Project AI Manager, on behalf of @mekarpeles. Richy is designed to provide status visibility, perform basic project management functions and relevant codebase research, and provide actionable feedback so contributors aren't left waiting.
For context here's a map of all the feature flags across the envs:
| Feature | Local | Testing | Production | Diff between environments? |
|---|---|---|---|---|
| admin | — | admin | admin | Yes — missing in local |
| cache_most_recent | — | — | enabled | Yes — production only |
| corrections | — | admin | admin | Yes — missing in local |
| debug | enabled | — | filter: queryparamname: debugvalue: "XXXX" | Yes — all differ |
| dev | enabled | — | — | Yes — local only |
| history_v2 | admin | admin | filter: usergroupusergroup: /usergroup/librarians | Yes — production differs |
| inlibrary | — | — | enabled | Yes — production only |
| lending_v2 | — | — | enabled | Yes — production only |
| lending_v3 | — | — | admin | Yes — production only |
| lists | enabled | enabled | enabled | No |
| loanstats | — | enabled | enabled | Yes — missing in local |
| merge-authors | filter: usergroupusergroup: /usergroup/librarians | filter: usergroupusergroup: /usergroup/librarians | filter: usergroupusergroup: /usergroup/librarians | No |
| merge-editions | — | — | admin | Yes — production only |
| multi_commit_edits | — | enabled | enabled | Yes — missing in local |
| my_books_dropper | — | enabled | — | Yes — testing only |
| publishers | enabled | enabled | enabled | No |
| recentchanges_v2 | enabled | enabled | enabled | No |
| stats | enabled | enabled | enabled | No |
| stats-header | enabled | enabled | enabled | No |
| superfast | enabled | enabled | enabled | No |
| support | — | — | admin | Yes — production only |
| undo | enabled | filter: usergroupusergroup: /usergroup/super-librarians | filter: usergroupusergroup: /usergroup/super-librarians | Yes — local differs |
| upstream | — | — | enabled | Yes — production only |
@cdrini can you do this (or we can plan to on our next call)
Today @cdrini did the cleanup on testing to comment out all feature flags but debug. Hopefully next week we can delete those and then do the same for production (which is in olsystem)