Generate eligibility check aliases automatically - #511
Merged
Merged
Conversation
The fallback copied setting values into the alias text, so the alias went stale when settings were edited later. Now, when Gemini is unavailable or fails, the check is added without an alias (its original name is shown) and the builder shows a message. Regenerating from the alias editor returns 503 and shows the existing error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dialog used to close right away and errors were only logged, so a failed add (for example a 400 for missing settings) quietly lost what the user entered. The dialog now waits for the request and shows an error if it fails. A failed add of a check with no settings shows a toast. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generated aliases include setting values, so editing a setting could leave the alias out of date. CheckConfig now records whether its alias is generated. When settings change, a generated alias is regenerated. If that fails, the alias is cleared so the original name shows, and the user is told. Hand-written aliases are never changed. An alias saved from the editor counts as generated only if it wasn't edited after generating. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The e2e suite located selected checks by the "Original: ..." line, which only renders when an alias was generated, so it failed in CI where no GEMINI_API_KEY is set. Selected checks now carry a test id instead. Locally, a configured key made every add-check call Gemini, and slow responses pushed the test past its timeout. Add an alias-generation.enabled setting, turn it off in bin/run-e2e-tests, and cover the Gemini path in unit tests instead: the service now runs against a local fake server via a configurable base URL, and the alias dialog's failure state is tested. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Tests
Closes #510