Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@terwey
Copy link
Collaborator

@terwey terwey commented Nov 6, 2025

Summary

  • add a venue-aware OrderIdentifier struct to capture venue, wallet, and order ID
  • expose calculateVenuePositions that groups net fills by (venue, wallet) instead of copying an arbitrary order ID
  • exercise the grouping logic with a focused unit test for the fill tracker

Fixes #84


https://chatgpt.com/codex/tasks/task_e_690bf61fd7a48326b7ea3abcb5df69c7

@terwey terwey marked this pull request as ready for review November 6, 2025 06:28
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 739 to +743
return OrderSnapshot{
OrderId: o.oid,
OrderId: o.oid,
Identifier: recomma.OrderIdentifier{
OrderId: o.oid,
},

Choose a reason for hiding this comment

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

P1 Badge Populate OrderIdentifier with venue and wallet data

The new calculateVenuePositions groups positions by OrderSnapshot.Identifier.VenueID and Wallet, but orderState.snapshot only fills the identifier with the legacy OrderId value. The service never records venue or wallet information when tracking orders, so every snapshot produced in production will carry empty VenueID/Wallet fields, causing any call to calculateVenuePositions to collapse all fills into a single default key instead of per-venue buckets. Consider persisting the venue/wallet when events or statuses are applied and populating them here so the aggregation can return meaningful results.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug 84: Venue Position Calculation Returns Arbitrary OrderId

2 participants