Repository navigation
chore(middlewareNode): remove dead lesson FEN data from lessons.js (Issue 11) - #261
Open
Deepesh-Katudia wants to merge 2 commits into
Open
Deepesh-Katudia wants to merge 2 commits into
Deepesh-Katudia wants to merge 2 commits into
Conversation
…ssue 11) Lines 610-861 sat after `module.exports = router;` and assigned a legacy array of lesson end-FEN positions to `list` with no let/const, which leaked a global variable every time the file loaded. Nothing reads it; the only mention is inside commented-out code in the /stick handler. It came in with the July 5 Stockfish Chat Framework merge. No behavior change: same routes, same exports. Only the global `list` leak goes away.
ToldYO
self-requested a review
October 7, 2026 14:36
ToldYO
approved these changes
Oct 7, 2026
ToldYO
left a comment
Collaborator
There was a problem hiding this comment.
merge approved. good job removing dead code and an accidental global variable leak.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Issue 11, step D2.1: delete the dead data at the bottom of
middlewareNode/src/routes/lessons.js.Lines 610–861 came after
module.exports = router;. They assigned a legacy array of lesson end-FEN positions tolistwith nolet/const, so loading the file created a global variable. Nothing reads it. The only mention is inside commented-out code in the/stickhandler (lines 55–56). It came in with the July 5 Stockfish Chat Framework merge.The file goes from 861 lines to 609. Nothing else changes.
Type of Change
Behavior
Routes, status codes, response shapes and exports are all unchanged. The only runtime difference is that the global
listno longer leaks:Conflicts
None expected. No open branch touches this part of the file. Puzzle-Themes edits line 39 (
getDb), andfeature/currency-ledger-infraedits about line 296.Testing
npm testinmiddlewareNode: