Skip to content

fix(scrabble): guard initialise() against re-running on repeat calls - #895

Merged
martin-henz merged 1 commit into
masterfrom
fix/scrabble-initialise-idempotent
Aug 8, 2026
Merged

fix(scrabble): guard initialise() against re-running on repeat calls#895
martin-henz merged 1 commit into
masterfrom
fix/scrabble-initialise-idempotent

Conversation

@martin-henz

Copy link
Copy Markdown
Member

Summary

  • initialise() wasn't idempotent: a second call re-ran the Promise.all (rebuilding all four Conductor arrays, ~246ms for ~173,000 words) and re-pushed all four exports onto exports again.
  • Adds a whole-method __initialised guard (including the super.initialise() call), same shape as the csg fix for Migrate CSG Module to Conductor #826, since BaseModulePlugin.initialise() isn't idempotent either.

Fixes #829

Test plan

  • yarn tsc --noEmit — no new errors
  • yarn eslint src/bundles/scrabble/src/index.ts — clean
  • Existing scrabble bundle test suite passes (ran automatically via pre-push hook)

A second call previously rebuilt all four Conductor arrays (~246ms of
array_set calls for ~173,000 words) and re-pushed every export, since
super.initialise() isn't idempotent either. Same guard shape as the
csg fix for #826.

Fixes #829
@martin-henz
martin-henz merged commit 90b7319 into master Aug 8, 2026
12 checks passed
@martin-henz
martin-henz deleted the fix/scrabble-initialise-idempotent branch August 8, 2026 00:00
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.

scrabble: initialise() not idempotent - rebuilds ~173,000 words on every call

1 participant