Repository navigation
75 citations were being counted as zero, and all 15 affected studies are South Asia - #13
Merged
Merged
Conversation
…ck out countReferences() matched "References", "Sources" and "Bibliography". 189 of the 204 studies use the first of those. The 15 written to the later, longer template head their citations "Further Reading", and that set is almost exactly South Asia: six India studies, two Bangladesh, two Nepal, Pakistan, Sri Lanka, Bhutan, the Maldives and a regional stunting study. The function returned 0 for all fifteen. They carry five full academic citations each: Imbert and Papp in AEJ: Applied 2015, Dreze and Khera in World Development 2017, Sukhtankar in the India Policy Forum, Narayanan and Das in EPW. So the library reported 867 references where it holds 942. The --check run printed "no parseable References section" for each of them, which reads as a content gap and was in fact a heading the regex did not know. Acting on the warning as written would have meant adding citations to studies that already have them. No study carries both headings, verified across all 204, so widening the regex counts nothing twice. One consequence worth recording rather than patching. evidenceTier() returns "strong" when refs >= 4, and every one of the 204 studies has four or five references, so after this fix the function returns "strong" for all of them and the moderate and emerging branches are unreachable. Before the fix eight studies read "emerging", and all eight were among the fifteen whose references were not being counted: the tier was reporting the parser bug rather than the evidence. What counts as strong evidence is an editorial judgement about the library, not a bug to fix here, so CLAUDE.md states the position and the options and leaves the threshold alone. Separately, the lychee link check moves out of ci.yml into its own daily workflow. It carried fail: false on pull requests, so a contributor got a result they could neither act on nor be blocked by, and it shared a workflow run with the data validation, where a job cancelled by its own timeout cancels the whole run and a slow third-party host could have taken the validation with it. On the schedule it fails, because external link rot needs no commit. Adds CLAUDE.md, which this repository did not have. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MrvR2NXsJFVRCeJZFCPuNL
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.
The bug
countReferences()inscripts/build.mjsmatched:/## (?:References|Sources|Bibliography)\s*\n.../i189 of the 204 studies head their citations
## References. The 15 written to the later, longer template head them## Further Reading. The function returned0for all fifteen.They are not missing citations. Each carries five, properly formatted:
The library reported 867 references where it holds 942.
The affected set is not random
Six India studies (MGNREGA, UPI, DBT/JAM, Kerala model, PLI, Swachh Bharat), two Bangladesh (BRAC, garments), two Nepal (community forestry, remittances), Pakistan (BISP), Sri Lanka (2022 crisis), Bhutan (GNH), the Maldives (climate), and a regional stunting study.
That is essentially the whole South Asia set, reading as uncited on a site whose README calls it an evidence library.
The warning pointed the wrong way
npm run validateprinted, for each of them:That reads as a content gap. It was a heading the regex did not know. Acting on the warning as written would have meant adding citations to studies that already have them. This is why I checked one of the files before touching the parser.
Verified across all 204: no study carries both headings, so widening the regex counts nothing twice.
Result
⚠warnings on--checkAll 15 move from
refs: 0torefs: 5.master-list.json,stats.jsonandsitemap.xmlregenerated.One finding recorded, not patched
Fixing the count exposes something about the
evidencefield that is worth stating plainly.evidenceTier()returnsstrongwhenrefs >= 4. The reference distribution across all 204 studies is:Nothing has fewer than four. So after this fix the function returns
strongfor all 204, and themoderateandemergingbranches are unreachable. ThehasRCTandhasMetatests are short-circuited by therefs >= 4branch before they matter.Before the fix, 8 studies read
emerging. All 8 were among the 15 whose references were not being counted. The tier was reporting the parser bug, not the evidence.I have not changed it. What counts as strong evidence is an editorial judgement about this library, not a bug to patch on someone's behalf. The honest options:
hasRCT/hasMetarather than lettingrefs >= 4short-circuit them.CLAUDE.mdstates the position and the options so it is not rediscovered as a surprise.Also in this PR
The link check moves out of
ci.ymlinto its own dailylink-check.yml. Two reasons: it carriedfail: falseon pull requests, so a contributor got a result they could neither act on nor be blocked by; and it shared a workflow run with the data validation, where a job cancelled by its owntimeout-minutescancels the whole run — a slow third-party host could have taken the validation down with it. On the schedule it fails, because external link rot needs no commit to happen.Adds
CLAUDE.md, which this repository did not have. It records the two-template split, the sitemap's query-string URLs (a path-based comparison reports all 204 as missing pages), and that the absent lockfile is correct:package.jsondeclares no dependencies at all.Checks
No warnings, where there were 15.
🤖 Generated with Claude Code
https://claude.ai/code/session_01MrvR2NXsJFVRCeJZFCPuNL
Generated by Claude Code