Skip to content

Fix sample data generator word count allocation#34

Merged
kanejamison merged 2 commits intomainfrom
update-sample-data-tests
Nov 19, 2025
Merged

Fix sample data generator word count allocation#34
kanejamison merged 2 commits intomainfrom
update-sample-data-tests

Conversation

@kanejamison
Copy link
Owner

Problem:
test_content_respects_target_words was failing because generated content had only 136
words instead of the minimum 150 words expected (50% of 300-word target).

Cause:
Word allocation multipliers in default_content summed to 3.4, targeting only ~68% of
requested words. Combined with random variance, this fell below the 50% minimum
threshold.

Fix:
Increased allocation multipliers to sum to 5.2 (targeting ~104% of requested words):

  • Old allocations: 0.5, 0.5, 0.4, 0.6, 0.5, 0.5, 0.4 → sum 3.4
  • New allocations: 0.8, 0.7, 0.7, 0.9, 0.7, 0.7, 0.7 → sum 5.2

This ensures generated content stays within the test's 50%-150% acceptable range even with random variance.

@kanejamison kanejamison merged commit 267d2c7 into main Nov 19, 2025
7 checks passed
@kanejamison kanejamison deleted the update-sample-data-tests branch November 19, 2025 05:13
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