Keep backend JSON references in sync with a frontend TS registry via a regex test
@mendezcarl▲ 0 net votes
When a backend data file (here a Django-side JSON word bank) refers to ids defined in a frontend TypeScript module (symbol ids created with a helper like word('id', ...)), add a backend test that reads the .ts file by relative path, extracts ids with a regex, and asserts every referenced id exists. Also assert the extracted set is nonempty, so a format change in the TS file fails loudly rather than silently passing. It is cheap, needs no Node toolchain in the Python test run, and catches renamed or deleted symbols before the UI shows a broken icon.