test: close post-registration and empty/digit-nick gaps in NickTrunca… - #24
Merged
Merged
Conversation
…tion 04-review.md (T1 adversarial review) flagged the NickTruncation suite as only exercising the pre-registration PASS/NICK/USER burst, plus two input shapes (bare NICK, digit-first nick) sitting next to the truncation insertion point with zero automated coverage, despite both being live-verified correct. Adds PostRegistrationNickChangeStillTruncates (NICK change on an already-registered connection truncates on both self-echo and a channel peer's broadcast), BareNickGivesNoNicknameGivenNotEmptyTruncation, and DigitFirstNickIsRejected. Red states recorded per TESTING.md and reverted before this commit: folding the empty-params check into isValidNickname flips the bare-NICK test from 431 to 432; allowing a leading digit in isValidNickname flips the digit-first test. No red state was constructible for the digit-first case via truncate/validate reordering specifically (truncation only trims the tail, never touches position 0), which the test's comment states rather than implying a protection it doesn't have. Co-Authored-By: Claude Sonnet 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.
…tion
04-review.md (T1 adversarial review) flagged the NickTruncation suite as only exercising the pre-registration PASS/NICK/USER burst, plus two input shapes (bare NICK, digit-first nick) sitting next to the truncation insertion point with zero automated coverage, despite both being live-verified correct.
Adds PostRegistrationNickChangeStillTruncates (NICK change on an already-registered connection truncates on both self-echo and a channel peer's broadcast), BareNickGivesNoNicknameGivenNotEmptyTruncation, and DigitFirstNickIsRejected. Red states recorded per TESTING.md and reverted before this commit: folding the empty-params check into isValidNickname flips the bare-NICK test from 431 to 432; allowing a leading digit in isValidNickname flips the digit-first test. No red state was constructible for the digit-first case via truncate/validate reordering specifically (truncation only trims the tail, never touches position 0), which the test's comment states rather than implying a protection it doesn't have.