Skip to content

fix: AscrPacket leading-blank field (20.0.2)#460

Merged
erwan-joly merged 1 commit intomasterfrom
feat/21.0.0-ascr-leadingblank
Apr 24, 2026
Merged

fix: AscrPacket leading-blank field (20.0.2)#460
erwan-joly merged 1 commit intomasterfrom
feat/21.0.0-ascr-leadingblank

Conversation

@erwan-joly
Copy link
Copy Markdown
Contributor

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

Summary

Same fix pattern as NsTeST 20.0.1 and SqstPacket: vanosilla's UiPacketExtension emits ascr <CurrentKill> … with a literal double space after the header. Without a LeadingBlank field modeled at index 0, the deserializer can't parse the empty token and the serializer emits - instead.

  • Add public string LeadingBlank { get; set; } = string.Empty; at [PacketIndex(0)].
  • Shift every other field +1 (CurrentKill → 1 … Type → 9).

No in-tree consumer uses AscrPacket, so this ships as a patch (20.0.2) rather than a major bump.

Test plan

  • dotnet test — 113/113 passing

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores

    • Package version updated to 20.0.2.
  • Refactor

    • UI packet layout changed by inserting a new leading field, shifting the order of existing fields. This is a breaking change that requires client-side updates to remain compatible.

@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: 1b32f037-1605-499b-8d1b-ba76a7cdad00

📥 Commits

Reviewing files that changed from the base of the PR and between 1ffeed0 and 4770283.

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

Walkthrough

The NosCore.Packets NuGet package version is bumped from 20.0.1 to 20.0.2. In the AscrPacket class, a new LeadingBlank string property is introduced at packet index 0, causing existing packet field indices to shift by +1 (including Type moved from index 8 → 9).

Changes

Cohort / File(s) Summary
Project Version
src/NosCore.Packets/NosCore.Packets.csproj
Package version updated from 20.0.1 to 20.0.2.
Packet Structure Update
src/NosCore.Packets/ServerPackets/UI/AscrPacket.cs
Added string LeadingBlank { get; set; } with [PacketIndex(0)] (default string.Empty). Existing numeric/string packet properties (CurrentKill, CurrentDie, CurrentTc, ArenaKill, ArenaDie, ArenaTc, KillGroup, DieGroup) had their [PacketIndex] incremented by 1; Type moved from [PacketIndex(8)] to [PacketIndex(9)].

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: a version bump to 21.0.0 and the addition of a leading-blank field to AscrPacket.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 feat/21.0.0-ascr-leadingblank

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

vanosilla UiPacketExtension emits `ascr  <CurrentKill> ...` with a
literal double space after the header. Adds a LeadingBlank field
(non-nullable, defaults to empty string) at index 0 and shifts all
other indices by +1. Same fix pattern as NsTeSTPacket (20.0.1) and
SqstPacket. No in-tree consumer uses AscrPacket, so this ships as a
patch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@erwan-joly erwan-joly force-pushed the feat/21.0.0-ascr-leadingblank branch from 1ffeed0 to 4770283 Compare April 24, 2026 15:09
@erwan-joly erwan-joly changed the title feat!: 21.0.0 - AscrPacket leading-blank field fix: AscrPacket leading-blank field (20.0.2) Apr 24, 2026
@erwan-joly erwan-joly merged commit 41cf996 into master Apr 24, 2026
1 check passed
@erwan-joly erwan-joly deleted the feat/21.0.0-ascr-leadingblank branch April 24, 2026 15: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.

1 participant