Skip to content

fix: prevent internal server error when saving expectations on ready repo#179

Open
joshjon wants to merge 1 commit into
mainfrom
verve/task-28
Open

fix: prevent internal server error when saving expectations on ready repo#179
joshjon wants to merge 1 commit into
mainfrom
verve/task-28

Conversation

@joshjon

@joshjon joshjon commented Mar 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes a bug where pressing 'Save & Complete' in the repo expectations settings dialog returned an internal server error if the repo was already in the ready state. The setup status transition validation rejected the ready → ready transition.

Changes

  • Add early return in UpdateRepoSetupStatus when the current status already matches the target status, treating it as a no-op instead of an invalid transition
  • Add test case TestUpdateSetup_MarkReadyWhenAlreadyReady to verify that editing expectations on an already-ready repo succeeds

…repo

When editing repo expectations from the settings dialog (repo already in
"ready" status), clicking "Save & Complete" attempted a ready→ready
status transition which was not in the valid transitions map, causing an
untagged error that mapped to 500. Now UpdateRepoSetupStatus treats
same-status transitions as a no-op.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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