Skip to content

feat(router): resolve issues #638 #643 #644 #645 — validation, tests,… and structural cleanup#702

Open
thelux134 wants to merge 4 commits into
Maki-Zeninn:mainfrom
thelux134:feat/issues-638-643-644-645
Open

feat(router): resolve issues #638 #643 #644 #645 — validation, tests,… and structural cleanup#702
thelux134 wants to merge 4 commits into
Maki-Zeninn:mainfrom
thelux134:feat/issues-638-643-644-645

Conversation

@thelux134

@thelux134 thelux134 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

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):

  • 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).

closes #638
closes #644

…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)
@drips-wave

drips-wave Bot commented Jun 26, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant