We currently calculate the subref_reuse_count field in way which results in obviously incorrect values such as -2, for the page
https://de.wikipedia.org/wiki/Jos%C3%A9_Nunes_(Herrscher)
This task is complete when the calculation is fixed.
- Import the above page as a test fixture.
- Write a test to verify that it is miscalculating the subref_reuse_count as -2.
- Yes but the count is currently 1, which is also wrong. This is probably due to recent page edits.
- Fix the calculation,
probably by iterating through the subref markers and counting unique identifiers. Should be 3 for the sample page.
Implementation
- Don't distinguish by valid / invalid sub-refs
Open question
- How to deal with reuses counting and sub-refs?