Skip to content

fix(edit_asset): converge attribute set into one self-healing op - #87

Merged
bobby-smedley merged 1 commit into
mainfrom
fix/edit-asset-attribute-self-heal
Jul 1, 2026
Merged

fix(edit_asset): converge attribute set into one self-healing op#87
bobby-smedley merged 1 commit into
mainfrom
fix/edit-asset-attribute-self-heal

Conversation

@bobby-smedley

@bobby-smedley bobby-smedley commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

🎯 What does this PR do?

What

set_attribute replaces update_attribute for normal single-valued attributes — it creates the value if absent, updates it if present. add_attribute is now scoped to appending values to multi-valued attributes. update_attribute stays as a silent, unadvertised back-compat alias.

Why

The agent had to choose add vs update without 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, so set_attribute decides create-vs-patch from state it already has: one call, correct regardless of which tool the agent picks.

Tests

  • Unit: set creates when absent / patches when present (+ existing suite green).
  • Live: bulk create, bulk patch, update_attribute alias, 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

@bobby-smedley
bobby-smedley requested a review from a team as a code owner June 30, 2026 18:07
@bobby-smedley
bobby-smedley merged commit 664ab65 into main Jul 1, 2026
1 check passed
@bobby-smedley
bobby-smedley deleted the fix/edit-asset-attribute-self-heal branch July 1, 2026 14:28
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