Skip to content

Add builder register helper methods that take &mut self#79

Merged
virajmehta merged 1 commit intomainfrom
aaron/register-mut-self
Mar 12, 2026
Merged

Add builder register helper methods that take &mut self#79
virajmehta merged 1 commit intomainfrom
aaron/register-mut-self

Conversation

@Aaron1011
Copy link
Member

@Aaron1011 Aaron1011 commented Mar 11, 2026

This will make it easier to register things in tensorzero/tensorzero


Note

Low Risk
Low risk API addition confined to builder ergonomics; behavior is unchanged aside from routing existing register_instance through the new shared implementation.

Overview
Adds DurableBuilder::register_mut and DurableBuilder::register_instance_mut so tasks can be registered using &mut self instead of the consuming builder pattern.

Refactors register_instance to delegate to the new mutable helper, keeping the same duplicate-name validation and registry insertion logic while returning Self for chaining.

Written by Cursor Bugbot for commit ffa42c4. This will update automatically on new commits. Configure here.

This will make it easier to register things in tensorzero/tensorzero
@virajmehta virajmehta added this pull request to the merge queue Mar 12, 2026
Merged via the queue into main with commit d122e6c Mar 12, 2026
2 checks passed
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