Skip to content

Conversation

dvush
Copy link
Contributor

@dvush dvush commented Oct 14, 2025

📝 Summary

  • raw bundle has new optional bundle_hash field that is set by the sender to uniquely identify bundle
  • bundle has this new hash in the external_hash field

💡 Motivation and Context

This allows ingress service to set bundle hash that is returned to the user.

✅ I have completed the following steps:

  • Run make lint
  • Run make test
  • Added tests (if applicable)

@Copilot Copilot AI review requested due to automatic review settings October 14, 2025 09:40
@dvush dvush requested a review from ZanCorDX as a code owner October 14, 2025 09:40
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds support for an externally provided unique identifier for bundles.

  • Introduces external_hash: Option on Bundle and bundle_hash: Option on RawBundleMetadata.
  • Wires encode/decode so RawBundleMetadata.bundle_hash maps to Bundle.external_hash.
  • Updates logic to prefer the external hash where appropriate (redistribution and blocks processor) and adjusts tests/test helpers.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
crates/rbuilder-primitives/src/lib.rs Adds external_hash field to Bundle with documentation.
crates/rbuilder-primitives/src/serialize.rs Adds bundle_hash to RawBundleMetadata and maps to/from Bundle.external_hash.
crates/rbuilder-primitives/src/order_builder.rs Initializes external_hash: None in BundleBuilder.
crates/rbuilder-primitives/src/test_data_generator.rs Initializes external_hash: None in test data helpers.
crates/rbuilder/src/backtest/redistribute/mod.rs Uses external_hash.unwrap_or(hash) when tracking bundle hashes.
crates/rbuilder-operator/src/blocks_processor.rs Prefers external_hash over hash when reporting bundle_hash; updates test metadata.
crates/rbuilder/src/backtest/build_block/synthetic_orders.rs Initializes external_hash: None in synthetic bundle creation.
crates/rbuilder/src/backtest/restore_landed_orders/find_landed_orders.rs Updates tests to set external_hash: None.
crates/rbuilder/src/building/builders/parallel_builder/conflict_resolvers.rs Updates tests to set external_hash: None.
crates/rbuilder/src/backtest/store.rs Populates bundle_hash: None in RawBundleMetadata in tests.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Copilot Copilot AI review requested due to automatic review settings October 14, 2025 09:57
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@dvush dvush merged commit a21de88 into develop Oct 14, 2025
3 checks passed
@dvush dvush deleted the external_bundle_hash branch October 14, 2025 13:59
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.

2 participants