Skip to content

Conversation

@jerbaroo
Copy link

@jerbaroo jerbaroo commented Feb 5, 2026

Add stategic metadata as a parameter to insert_submission (which just passes it to insert_submission_chunks), and make the strategic metadata available in the submission results: SubmissionCompleted and SubmissionFailed.

@jerbaroo jerbaroo linked an issue Feb 5, 2026 that may be closed by this pull request
@jerbaroo jerbaroo changed the title Add stategic metadata to SubmissionCompleted andSubmissionFailed Add stategic metadata to insert_submission, SubmissionCompleted and SubmissionFailed Feb 9, 2026
@jerbaroo jerbaroo marked this pull request as ready for review February 9, 2026 08:31
@jerbaroo jerbaroo requested a review from Qqwy February 9, 2026 08:33
Copy link
Contributor

@Qqwy Qqwy left a comment

Choose a reason for hiding this comment

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

Hey Jeremy! A very nice PR so far. The one request I have is that you add a test for both of the cases (to the Python test suite).

@jerbaroo jerbaroo force-pushed the jerbaroo-42 branch 3 times, most recently from aa4f7ba to d5db03b Compare February 10, 2026 11:17
@jerbaroo jerbaroo requested a review from Qqwy February 10, 2026 11:47
@jerbaroo jerbaroo force-pushed the jerbaroo-42 branch 2 times, most recently from 42a9a61 to 8486574 Compare February 10, 2026 14:14
serialization_format: SerializationFormat = DEFAULT_SERIALIZATION_FORMAT,
metadata: None | bytes = None,
strategic_metadata: None | dict[str, str | int] = None,
strategic_metadata: None | dict[str, int] = None,
Copy link
Author

Choose a reason for hiding this comment

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

These were adjusted during testing, since attempting to pass something of type dict[str, str] produced the following run-time type error TypeError: argument 'strategic_metadata': 'str' object cannot be interpreted as an integer, which seems to stem from the underlying rust definition of strategic metadata which does not support strings as values:

pub type StrategicMetadataMap = FxHashMap<String, MetaStateVal>;

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. It's indeed the case that currently only ints are supported.

If it still gives you problems, I guess the actual appropriate Python type to use here would be Mapping[str, int] (the immutable version of dict), which matters because of variance.

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.

Support fetching a submission's metadata from the producer side

2 participants