Skip to content

feat: map received_quantity_multiplier and sample_rotation (proto drift 24587531) - #111

Merged
HandyS11 merged 1 commit into
developfrom
feat/proto-drift-24587531
Aug 7, 2026
Merged

feat: map received_quantity_multiplier and sample_rotation (proto drift 24587531)#111
HandyS11 merged 1 commit into
developfrom
feat/proto-drift-24587531

Conversation

@HandyS11

@HandyS11 HandyS11 commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Closes #110.

The ProtoRefresh drift gate flagged two new optional fields on the August 2026 Rust dedicated server (build 24587531). Both are purely additive — no renames or removals — so the wire format stays compatible; they were simply dropped before reaching the public DTOs.

Proto New field Surfaced as
AppMarker.SellOrder optional float received_quantity_multiplier = 11 VendingMachineItem.ReceivedQuantityMultiplier
AppCameraRays optional Vector3 sample_rotation = 9 CameraFrame.SampleRotation (inherited by CameraRaysEventArg)

Changes

  • RustPlusContracts.proto — adopt both fields as reported by the diff.
  • VendingMachineItem / CameraFrame — nullable properties following the existing PriceMultiplier / CameraRotation idiom (absent on the wire → null).
  • AppMarkerToModel.ToVendingMachineItemShouldSerializeReceivedQuantityMultiplier() presence fork.
  • AppCameraToModel — mapped in both ToCameraFrame and ToCameraRaysEvent.
  • docs/articles/cameras.mdCameraFrame field list kept in sync.

Not changed

CameraRenderer needs nothing: sample placement comes from the fixed 1337-seeded shuffle buffer indexed by SampleOffset, so sample_rotation (the orientation the rays were sampled with) is pass-through data for consumers, not a render input. The golden render fixture is unaffected.

Tests

Written first, watched fail on the missing members, then implemented:

  • MarkerMapperTests — set/unset pair for ReceivedQuantityMultiplier.
  • CameraModelMapperTests — set/unset for SampleRotation across both mappers.

dotnet test RustPlusApi.sln -f net10.0 → 463 passed. The net8.0 host (netstandard2.0 asset) wasn't runnable locally — that runtime isn't installed on this machine — so CI covers that half; the netstandard2.0 target compiles clean in the full solution build. Coverage on the net10.0 run keeps AppMarkerToModel and AppCameraToModel at 100% line/branch.

🤖 Generated with Claude Code

The August 2026 Rust server (build 24587531) added two optional fields to the
Companion contracts, reported by the ProtoRefresh drift gate:

- AppMarker.SellOrder.received_quantity_multiplier = 11
- AppCameraRays.sample_rotation = 9

Both are additive, so the wire stays compatible; they were simply dropped
before reaching the public DTOs. Adopt them in the committed proto and surface
them as VendingMachineItem.ReceivedQuantityMultiplier and
CameraFrame.SampleRotation (inherited by CameraRaysEventArg), following the
existing presence-fork idiom.

CameraRenderer needs no change: sample placement comes from the fixed
1337-seeded shuffle buffer indexed by SampleOffset, so sample_rotation is
pass-through data for consumers.

Closes #110

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 7, 2026 00:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Surfaces two newly-added optional protobuf fields from Rust dedicated server build 24587531 into the public DTO layer, keeping the RustPlusApi models/mappers and camera docs aligned with the latest wire contract drift gate.

Changes:

  • Add received_quantity_multiplier to AppMarker.SellOrder and map it to VendingMachineItem.ReceivedQuantityMultiplier using a protobuf-net presence fork (ShouldSerialize…()null when absent).
  • Add sample_rotation to AppCameraRays and map it to CameraFrame.SampleRotation (and therefore CameraRaysEventArg) in both camera mappers.
  • Extend unit tests and camera documentation to cover/describe the new nullable DTO fields.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/RustPlusApi.UnitTests/MarkerMapperTests.cs Adds set/unset tests to lock the new sell-order presence fork behavior.
tests/RustPlusApi.UnitTests/CameraModelMapperTests.cs Adds set/unset tests for SampleRotation across both camera mappers.
src/RustPlusApi/Protobuf/RustPlusContracts.proto Introduces the two new optional fields matching the reported server drift.
src/RustPlusApi/Extensions/AppMarkerToModel.cs Maps ReceivedQuantityMultiplier with presence semantics (absent → null).
src/RustPlusApi/Extensions/AppCameraToModel.cs Maps SampleRotation into both ToCameraFrame and ToCameraRaysEvent.
src/RustPlusApi/Data/VendingMachineItem.cs Adds nullable DTO property ReceivedQuantityMultiplier with XML doc.
src/RustPlusApi/Data/Cameras/CameraFrame.cs Adds nullable DTO property SampleRotation with XML doc.
docs/articles/cameras.md Updates CameraFrame field list to include SampleRotation.

@HandyS11
HandyS11 merged commit 3c4037a into develop Aug 7, 2026
6 checks passed
@HandyS11
HandyS11 deleted the feat/proto-drift-24587531 branch August 7, 2026 18:04
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.

Proto drift detected (server build 24587531)

2 participants