Repository navigation
Fix: the undeclared-subscriber loader test clears every subscription word of its fixture - #2254
Merged
Merged
Conversation
…word of its fixture Repitch 0.2.2 also subscribes the in-use event (hook word 54), so clearing only word 4 left a subscription and the loader rightly accepted the package. Clearing every word from 4 up keeps the test about an undeclared subscriber whatever the fixture subscribes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fix: a loader test assumed Repitch subscribes to one site event only. Nothing changes for players; this unblocks the Repitch 0.2.2 release (#1866).
What works:
src/engine/elekloader/module-set.test.ts("refuses hook words a subscriber's manifest does not declare") now clears every subscription word of its fixture package, not only hook word 4. All 64 tests in the file pass on main, and the fixed test passes with Repitch 0.2.2's package (e3c37df6…), which the old test wrongly saw accepted.What is broken: nothing known.
Who must act: nobody; the owner asked for this fix on 26 November 2026, and it merges on green.
On a unit: not applicable, test-only.
Why
The test moves Repitch's hook word 4 into core handler 0 and clears word 4, expecting the loader to refuse a package whose manifest declares site events but which subscribes to none. Repitch 0.2.2 also subscribes the in-use event at hook word 54, so after clearing word 4 it still subscribes, and the loader (rightly) accepts it. The loader itself (
module-set.ts, the hook loop) is unchanged: any word from index 4 up that isn't0xffffffffcounts as a subscription. The test now sets every word from 4 to the package's hook count to0xffffffff.Checked:
npx vitest run src/engine/elekloader/module-set.test.tson this branch (64 passed) and the same test file copied onto module/repitch-0.2.2 (passed);npm run pr:readyReady.What the guides lacked: nothing; this was a fixture assumption, not a documentation gap.
🤖 Generated with Claude Code