CLI: Embed checkup dictionary from API at build time

Summary

The CLI checkup command has a hardcoded list of check IDs and titles (CHECK_INFO). This needs to be updated to use the checkup dictionary from the API at build time, similar to how platform-ui handles this.

Problem

  • The hardcoded CHECK_INFO in lib/checkup.ts gets out of sync with the actual dictionary at https://postgres.ai/api/general/checkup_dictionary
  • When new checks are added to the API, the CLI doesn't reflect them

Solution

Implement build-time embedding following the platform-ui pattern:

  1. Create scripts/embed-checkup-dictionary.ts - fetches from API at build time
  2. Create lib/checkup-dictionary.ts - types and helper functions
  3. Generate lib/checkup-dictionary-embedded.ts at build time (in .gitignore)
  4. Update lib/checkup.ts to use the embedded dictionary

Benefits

  • No API calls at runtime
  • Always up-to-date with the canonical dictionary
  • Consistent with platform-ui implementation
Assignee Loading
Time tracking Loading