Skip to content

Generate eligibility check aliases automatically - #511

Merged
prestoncabe merged 7 commits into
mainfrom
510-automatic-eligibility-check-aliases
Sep 23, 2026
Merged

prestoncabe merged 7 commits into
mainfrom
510-automatic-eligibility-check-aliases

Conversation

@prestoncabe

Copy link
Copy Markdown
Collaborator

Summary

  • collect and validate check parameters before adding parameterized checks
  • generate readable aliases with Gemini 3.5 Flash-Lite, with a deterministic fallback when Gemini is unavailable
  • allow generated aliases to be previewed, regenerated, manually edited, or cleared
  • pass the GEMINI_API_KEY repository secret to the production builder API deployment

Tests

  • builder API: 119 tests passed
  • builder frontend: 57 tests passed
  • production frontend build passed
  • targeted Playwright benefit configuration test passed

Closes #510

@prestoncabe prestoncabe linked an issue Sep 22, 2026 that may be closed by this pull request
prestoncabe and others added 4 commits September 23, 2026 13:48
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>
@prestoncabe
prestoncabe merged commit 8675edd into main Sep 23, 2026
4 checks passed
@prestoncabe
prestoncabe deleted the 510-automatic-eligibility-check-aliases branch September 23, 2026 18:45
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.

Automatic Eligibility Check Aliases

1 participant