From 7ee4f1ec9037b5a133b16972195c37e828bc8d2d Mon Sep 17 00:00:00 2001 From: CleverThis Date: Thu, 9 Apr 2026 06:32:49 +0000 Subject: [PATCH] docs(changelog): add plan action arguments upsert fix to [Unreleased] Document the fix from PR #4197: plan use no longer crashes with UNIQUE constraint violation when action arguments are already registered. ISSUES CLOSED: #4174 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 012ccee16..883f7f6c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -202,6 +202,12 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - **`product-builder` Missing Supervisors**: Added missing `pr-fix-pool-supervisor` and `pr-merge-pool-supervisor` to the product-builder's supervisor launch list (18 total supervisors). Updated all numeric references, pre-flight checklists, and validation logic. +- **Plan action arguments UNIQUE constraint**: `agents plan use` no longer crashes with + `sqlite3.IntegrityError: UNIQUE constraint failed: action_arguments.action_name, name` + when an action has arguments already registered via `action create`. Root cause was + `ActionRepository.update()` using SQLAlchemy's `.clear()` + `.append()` pattern, which + deferred the DELETE and processed the INSERT first. Fixed by using an explicit upsert + (delete-then-insert) strategy. (#4174) - `ActionRepository.update()` now uses explicit bulk `sa_delete()` + `session.flush()` before re-inserting child rows for `action_arguments` and `action_invariants`, fixing -- 2.52.0