🔄 fix: Update Agent Versioning to Include agent_ids
#7762
Merged
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.
Summary
This PR updates the Agent model to properly track changes to the
agent_ids
field in the versioning system. Previously, changes toagent_ids
were ignored when determining if a new version should be created, which could lead to lost history when agents were added or removed from the chain.It was falsely identifying a new agent chain as a duplicate version.
Change Type
Checklist
Copilot Summary
This pull request introduces changes to the
Agent
model and its associated tests, focusing on the inclusion of theagent_ids
field in version detection and handling. The updates ensure that changes to theagent_ids
field are properly tracked, creating new versions when necessary, and include comprehensive test cases to validate this behavior.Changes to
Agent
model:agent_ids
field from version comparison, allowing updates to this field to trigger new versions. (api/models/Agent.js
)Updates to
Agent
tests:Agent
model within multiple test suites to ensure proper setup. (api/models/Agent.spec.js
) [1] [2] [3] [4]agent_ids
create new versions.agent_ids
remains unchanged.agent_ids
updates alongside other fields.agent_ids
in version history.agent_ids
arrays and agents without theagent_ids
field.