Confirm minimal AI call returns JSON with title

Created on 23 July 2025, about 1 month ago

User story:

As a migration developer, I want to prove a real provider can return a JSON object containing only the page title so that I know the foundation is feasible.

Acceptance Criteria

1. Script hits provider and gets { title": "…" }.

2. Failure/timeout path logged.

3. Automated test asserts JSON schema.

πŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States majorrobot

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @majorrobot
  • πŸ‡ΊπŸ‡ΈUnited States majorrobot

    Sry, somehow assigned this to the wrong person.

  • @majorrobot opened merge request.
  • πŸ‡ΊπŸ‡ΈUnited States majorrobot

    This is ready for review. Here's an easy way to QA:

    ddev drush php-eval "print_r(\Drupal::service('ai_migration.ai_migrator')->convert('https://example.com'));"

    Replace example.com with any url.

  • πŸ‡ΊπŸ‡ΈUnited States majorrobot

    Please note that I am aware of the PHPStan issues -- I did not use DI with the logger service in order to quickly get logging in. I can refactor this to DI later.

  • πŸ‡ΊπŸ‡ΈUnited States dmundra Eugene, OR

    Looking good @majorrobot and thank you for the easy to follow documentation. Left a few comments and here my tests:

    Working URL:

    dmundra in ~/workspace/community/ai_migration on branch 3537651-confirm-minimal-ai > ddev drush php-eval "print_r(\Drupal::service('ai_migration.ai_migrator')->convert('https://ndhurandhar.art/art/2025-06/artist-impression-rex'));"
    ```json
    {
      "title": "Artist impression of Rex"
    }
    ```%
    

    Non-existent URL:

    dmundra in ~/workspace/community/ai_migration on branch 3537651-confirm-minimal-ai > ddev drush php-eval "print_r(\Drupal::service('ai_migration.ai_migrator')->convert('https://ndhurandhar.com'));"
     [error]  Failed to fetch content from URL https://ndhurandhar.com: cURL error 6: Could not resolve host: ndhurandhar.com (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://ndhurandhar.com
    
  • πŸ‡ΊπŸ‡ΈUnited States majorrobot
  • πŸ‡ΊπŸ‡ΈUnited States majorrobot

    Thx @dmundra. Merged and marking as Fixed.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024