fix(edit_asset): converge attribute set into one self-healing op - #87
Merged
Conversation
MieszkoWasniowski
approved these changes
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 What does this PR do?
What
set_attributereplacesupdate_attributefor normal single-valued attributes — it creates the value if absent, updates it if present.add_attributeis now scoped to appending values to multi-valued attributes.update_attributestays as a silent, unadvertised back-compat alias.Why
The agent had to choose
addvsupdatewithout knowing whether the attribute already had a value, so it guessed wrong about half the time — failing the first call with an error, then retrying. chip already fetches the asset's attributes, soset_attributedecides create-vs-patch from state it already has: one call, correct regardless of which tool the agent picks.Tests
update_attributealias, and mixed create+patch in one call — all single-call, no duplicates.✅ Checklist
My code follows the style guidelines of this project.
I have performed a self-review of my own code.
I have commented my code, particularly in hard-to-understand areas.
I have made corresponding changes to the documentation (if needed).
My commit messages follow the Conventional Commits standard.
🤖 Generated with Claude Code