Conversation
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
Reply with @codex fix comments to fix any unresolved comments.
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, or 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 fix this CI failure" or "@codex address that feedback".
src/partner.cpp
Outdated
| uint64_t incomingMask = counts_to_mask(info.toPartner); | ||
| uint64_t deliverMask = incomingMask & partnerNeedsMask.load(); | ||
| if (deliverMask != lastDeliveredMask) | ||
| { | ||
| if (deliverMask) | ||
| { | ||
| std::string deliverPieces = format_piece_counts(rootPos, info.toPartner, ~us, deliverMask); | ||
| if (!deliverPieces.empty()) | ||
| ptell("feed " + deliverPieces); | ||
| } | ||
| else if (lastDeliveredMask) | ||
| ptell("feed -"); | ||
|
|
||
| lastDeliveredMask = deliverMask; |
There was a problem hiding this comment.
[P1] Detect increases in delivered piece counts
The new piece-flow updater only sends a feed message when deliverMask changes, but deliverMask is a bitmask that loses the actual counts per piece type. If our partner requests two knights and we capture a second knight later, deliverMask remains the same and no new message is emitted, so the partner still believes only one knight is incoming. The logic should track counts (or the formatted string) rather than just the mask to ensure additional pieces of the same type trigger an update.
Useful? React with 👍 / 👎.
|
@codex fix comments |
|
Summary
Testing
|
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68d12fd4d9c083229503d7da01be9365