Skip to content

fix: NsTeSTPacket.LeadingBlank defaults to empty string (20.0.1)#459

Merged
erwan-joly merged 1 commit intomasterfrom
fix/nstest-leadingblank-default-empty
Apr 24, 2026
Merged

fix: NsTeSTPacket.LeadingBlank defaults to empty string (20.0.1)#459
erwan-joly merged 1 commit intomasterfrom
fix/nstest-leadingblank-default-empty

Conversation

@erwan-joly
Copy link
Copy Markdown
Contributor

@erwan-joly erwan-joly commented Apr 24, 2026

Summary

Bug observed on NosCore's own login server: the wire came out as `NsTeST - 0 admin …` instead of the vanosilla `NsTeST 0 admin …` (literal double space). The serializer emits `-` for an unset/null string property, and `LeadingBlank` was `string?` with no default.

Make `LeadingBlank` non-nullable with an empty-string default so any consumer constructing an `NsTestPacket` automatically round-trips correctly without remembering to set it.

Test plan

  • `dotnet test` — 113/113 passing

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores

    • Released patch version 20.0.1 as part of ongoing maintenance and stability enhancement efforts
  • Bug Fixes

    • Improved data field handling by converting previously nullable packet data fields to non-nullable fields with appropriate default values, ensuring more robust packet processing, enhanced reliability, and prevention of potential null reference exceptions and data inconsistencies

The field models the literal double space vanosilla emits after the
`NsTeST` header; without a non-null default the serializer emits "-"
for an unset property, producing "NsTeST - 0 …" on the wire. Make the
property non-nullable with an empty-string default so consumers don't
have to remember to set it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 24, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5fdd2867-9b28-48c7-b08d-9c4f9d2eaff8

📥 Commits

Reviewing files that changed from the base of the PR and between ac57e46 and 4456f5f.

📒 Files selected for processing (2)
  • src/NosCore.Packets/NosCore.Packets.csproj
  • src/NosCore.Packets/ServerPackets/Login/NsTeSTPacket.cs

Walkthrough

The pull request updates the NosCore.Packets package version from 20.0.0 to 20.0.1 and modifies the NsTestPacket class to make the LeadingBlank property non-nullable with a default empty string value.

Changes

Cohort / File(s) Summary
Package Version Update
src/NosCore.Packets/NosCore.Packets.csproj
Version metadata incremented from 20.0.0 to 20.0.1.
Packet Property Modification
src/NosCore.Packets/ServerPackets/Login/NsTeSTPacket.cs
LeadingBlank property changed from nullable string (string?) to non-nullable string with default value of string.Empty.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/nstest-leadingblank-default-empty

Comment @coderabbitai help to get the list of available commands and usage tips.

@erwan-joly erwan-joly merged commit 375f70f into master Apr 24, 2026
1 of 3 checks passed
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.

1 participant