Skip to content

Do not read an allocation ratio as a sample size - #83

Merged
fosterwei merged 1 commit into
mainfrom
fix/sample-size-ratios
Sep 30, 2026
Merged

fosterwei merged 1 commit into
mainfrom
fix/sample-size-ratios

Conversation

@fosterwei

Copy link
Copy Markdown
Owner

The screening-count fix that shipped with the retatrutide page reordered the sample-size patterns. That reordering fixed four rows and broke five. This corrects it.

The regression

Moving the noun pattern below the bare verb pattern let randomized 1:1 win, because randomi[sz]ed\s+(\d+) matches the allocation ratio.

Record Was Became Source phrase
kisspeptin 62 1 "randomized 1:1"
survodutide 387 1 "randomised 1:1:1:1:1"
thymosin-alpha-1 194 1 "randomized 1:1"
semax 43 2
tesamorelin 152 3

None reached a record, because the drafter never regenerates a record that has guide sections. The next re-draft would have written them.

The fix

The noun pattern goes back above the verb pattern, with assignment phrasing still ahead of both so CONSORT abstracts read correctly. A number immediately followed by a colon is refused.

Both context checks now look at what follows the captured number rather than the whole match. Anchoring to the match end rejected the very case the change existed to fix: ASSIGNED ends after "randomly assigned", and the next character in assigned: 134 to retatrutide 4 mg is a colon.

Two more genuine corrections

Source Abstract Was Now
pmid-40609566 534 screened, 281 enrolled 534 281
pmid-41160422 367 screened, 146 randomised 367 146

The site-wide re-check, and why it is not a fix list

All 223 stored sample sizes were re-read against their abstracts. 64 disagree with the reader, but 55 of those disagree with the pre-existing reader too, which means they were corrected by hand at some point and must not be overwritten. The audit cannot distinguish a drafter bug from a human correction, so it is evidence, not a patch.

The 9 rows this change actually moved were each checked against their abstract by hand: 4 genuine screening counts, all on retatrutide, and the 5 regressions above.

Tests

36 drafter tests, up from 29. New cases cover allocation ratios of both 1:1 and 1:1:1:1:1, the colon that follows an assignment verb, and both phrasings of a screening count.

🤖 Generated with Claude Code

The screening-count fix shipped with the retatrutide page reordered the
sample-size patterns, and that reordering broke five rows while fixing
four. Moving the noun pattern below the bare verb pattern let
"randomized 1:1" win: kisspeptin went from 62 to 1, survodutide from 387
to 1, thymosin-alpha-1 from 194 to 1, semax from 43 to 2 and tesamorelin
from 152 to 3. None of those reached a record, because the drafter never
regenerates a record that has guide sections, but the next re-draft
would have written them.

The noun pattern goes back above the verb pattern, keeping the ordering
that was right before, with assignment phrasing still ahead of both so
CONSORT abstracts read correctly. A number immediately followed by a
colon is refused outright.

Both context checks now look at what follows the captured number rather
than the whole match. Anchoring them to the match end rejected the very
case the change existed to fix, because ASSIGNED ends after "randomly
assigned" and the next character in "assigned: 134 to retatrutide 4 mg"
is a colon.

Two more screening counts corrected on retatrutide: the body-composition
substudy stored 534 where 534 were screened and 281 enrolled, and the
cardiovascular trial stored 367 where 367 were screened and 146
randomised.

A full re-check of all 223 stored sample sizes says this class is now
closed. Of 64 rows where the reader disagrees with what is stored, 55
disagree with the pre-existing reader too, which means they were
corrected by hand and must not be overwritten; the audit cannot tell a
drafter bug from a human correction, so it is not a list of fixes to
apply. The 9 rows this change moved were each checked against their
abstract: 4 were genuine screening counts, all on retatrutide, and 5
were the regressions above.

36 drafter tests, up from 29.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
research-reference Ready Ready Preview Sep 30, 2026 4:37am UTC

@fosterwei
fosterwei merged commit ff41838 into main Sep 30, 2026
5 checks passed
@fosterwei
fosterwei deleted the fix/sample-size-ratios branch September 30, 2026 04:38

This branch was successfully deployed

1 active deployment
Preview — 024e3165 Deployed Sep 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant