Skip to content

fix: change the model connection, readiness, and version atomically (WI-1803) - #428

Merged
stefan-ernst merged 1 commit into
mainfrom
wi-1803-agent
Nov 2, 2026
Merged

stefan-ernst merged 1 commit into
mainfrom
wi-1803-agent

Conversation

@stefan-ernst

Copy link
Copy Markdown
Contributor

UpdateAgentConfig rewrote instructions (Draft + version bump) and then changed the LLM connection in a separate write that touched neither. A concurrent ActivateStudioProfile could validate the old connection and mark the profile Ready before the new connection was stored, leaving an unvalidated model Ready.

Change

  • Write the instructions, connection, and runner image in one statement with a single Draft/version transition.
  • Guard activation on the profile version that was validated: a change during validation now yields ErrAgentProfileVersionConflict instead of marking the changed definition Ready.

Tests

Windshiftapp/core-tests-internal#29 — a validation captured before a model change is rejected and the profile stays Draft; a validation of the current definition still activates.

…ically (WI-1803)

UpdateAgentConfig rewrote instructions (Draft + version bump) and then changed
the LLM connection in a separate write that touched neither. A concurrent
ActivateStudioProfile could validate the old connection and mark the profile
Ready before the new connection was stored, leaving an unvalidated model Ready.

Write the instructions, connection, and runner image in one statement with a
single Draft/version transition, and guard activation on the profile version
that was validated: a change during validation now yields a version conflict
instead of marking the changed definition Ready.
@stefan-ernst
stefan-ernst merged commit b9c24e0 into main Nov 2, 2026
23 of 24 checks passed
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.

1 participant