feat(router): resolve issues #638 #643 #644 #645 — validation, tests,… and structural cleanup#702
Open
thelux134 wants to merge 4 commits into
Open
feat(router): resolve issues #638 #643 #644 #645 — validation, tests,… and structural cleanup#702thelux134 wants to merge 4 commits into
thelux134 wants to merge 4 commits into
Conversation
…inn#644 Maki-Zeninn#645 — validation, tests, and structural cleanup Maki-Zeninn#638 — validate_window_seconds: configure_route already rejects window_seconds=0 when max_calls_per_window>0; adds explicit tests confirming the guard. Maki-Zeninn#643 — rate limit counter persistence: add tests for per-call increment, boundary condition (exactly-at-max then rejected), per-caller independence, and counter reset + re-accumulation across windows. Maki-Zeninn#644 — constraint parsing edge cases: add tests for whitespace-only, mixed operator (~=), negative number (>=-1), equals-prefix (=3), exact numeric match, > and <= operators; fix any_constraint_match never being set to true so AllVersionsDeprecated is returned correctly. Maki-Zeninn#645 — remove_route alias cleanup: add tests for multiple-alias removal, unrelated-alias preservation, double-removal error, re-registration without resurrecting old aliases, and alias-count consistency. Structural fixes (all three files had merge-conflict artifacts): - router-middleware: add missing closing } on CallLogState; remove duplicate test function names (get_call_log_length_* appeared twice). - router-registry: deduplicate DataKey variants; remove duplicate deprecation_reason field on ContractEntry; fix register() duplicate AddressIndex write and duplicate struct-field init; fix deprecate_one() duplicate definition and duplicate field assignment; fix get_entry_by_address() duplicate storage lookup; reconstruct seven broken test functions whose bodies were interleaved by a bad merge. - router-core: close unclosed test_get_all_routes_no_duplicates_after_ multiple_operations function; fix test_metadata_updated_event_includes_ metadata decoding (String, bool) instead of (String, Option<RouteMetadata>).
- Add missing blank line between total_calls() and get_call_log() - Collapse duplicated description in get_call_log_length() docblock (two versions of the same sentence were merged inline without resolution)
|
@thelux134 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
validate_window_seconds: configure_route already rejects window_seconds=0 when max_calls_per_window>0; adds explicit tests confirming the guard.
rate limit counter persistence: add tests for per-call increment, boundary condition (exactly-at-max then rejected), per-caller independence, and counter reset + re-accumulation across windows.
constraint parsing edge cases: add tests for whitespace-only, mixed operator (~=), negative number (>=-1), equals-prefix (=3), exact numeric match, > and <= operators; fix any_constraint_match never being set to true so AllVersionsDeprecated is returned correctly.
remove_route alias cleanup: add tests for multiple-alias removal, unrelated-alias preservation, double-removal error, re-registration without resurrecting old aliases, and alias-count consistency.
Structural fixes (all three files had merge-conflict artifacts):
closes #638
closes #644