Skip to content

Conversation

@webJose
Copy link
Contributor

@webJose webJose commented Nov 23, 2025

Closes #114.

@webJose webJose requested a review from Copilot November 23, 2025 22:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds runtime validation to ensure that defaultHash and hashMode configuration options are compatible with each other, preventing invalid combinations that could lead to unexpected behavior.

Key changes:

  • Added validation logic in setRoutingOptions that throws errors when incompatible hashMode/defaultHash combinations are detected
  • Added comprehensive test coverage for the validation logic and general setRoutingOptions behavior
  • Updated existing tests to use valid option combinations and more robust assertions

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/lib/kernel/options.ts Added runtime validation to throw errors when hashMode and defaultHash have incompatible values
src/lib/kernel/options.test.ts Added comprehensive tests for setRoutingOptions including validation scenarios and valid combinations
src/lib/kernel/initCore.test.ts Updated tests to use valid hashMode/defaultHash combinations and improved cleanup verification

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@webJose webJose merged commit 3d1780f into main Nov 23, 2025
1 check passed
@webJose webJose deleted the JP/defaultHash_rt_check branch November 23, 2025 22:09
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.

Potential Bug? After introducing defaultHash, runtime checks for hash value vs. hashMode might need revision

2 participants