Repository navigation
Elsa agents: keep references to deleted agents saveable; refuse saves to deleted agents - #235
Merged
Merged
Conversation
… to deleted agents - A reference to an agent deleted after it was saved still reads as that agent's name, but saving the name back resolved only non-deleted agents, so strict reference validation rejected any edit of the referencing agent. Names now also resolve through the agent's current references. - UpdateAsync on a deleted or archived agent saved a version that the marker kept invisible, so the edit vanished. It now throws, as Elsa's EF Core store does; restoring stays explicit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RYFktRCcspUcnjegpt54xF
This was referenced Oct 21, 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.
Self-review of #233 (
Aster.Elsa.Agents, program #58). The review found two defects, both reproduced against the real store.Changes
reference-target-missing).ReadNamesAsync. A reference to a deleted agent now saves as it reads. The validator only checks that the target exists, so a soft-deleted target is valid.UpdateAsyncsaved and activated a new version, but the marker kept it invisible.InvalidOperationException, as Elsa's EF Core store throws on a deleted row. Bringing an agent back stays an explicitIResourceLifecycleRestoreServicecall.UpdateAsyncrow, reference resolution order).Tests
Updating_a_deleted_agent_throws_and_keeps_it_deletedAn_agent_that_references_a_deleted_agent_saves_as_it_readsmainand pass with the fix.Aster.Elsa.Agents.Tests: 114 passed, 1 skipped (benchmark) on each of net8.0, net9.0 and net10.0.Rest of the self-review
Generated by Claude Code
Summary by CodeRabbit
Bug Fixes
Documentation