Skip to content

Improve CLI error handling, validation edge cases, and resource paths - #3

Merged
johnpryan merged 1 commit into
flutter:mainfrom
jwren:2-27-26-edge-cases
Mar 2, 2026
Merged

Improve CLI error handling, validation edge cases, and resource paths#3
johnpryan merged 1 commit into
flutter:mainfrom
jwren:2-27-26-edge-cases

Conversation

@jwren

@jwren jwren commented Feb 27, 2026

Copy link
Copy Markdown
Member

Addresses several points of failure during the skill generation and validation lifecycle to prevent crashes and provide better error visibility. Additionally, it expands the capability of the resources field to accept local relative file paths in addition to URLs.

Key changes include:

  • Expanded Resource Support: Updated BaseSkillCommand and SkillParams to allow the resources list to take both URLs and relative file paths, improving local testing and generation workflows.
  • Service Robustness: Enhanced GeminiService and API interactions to gracefully handle errors, empty responses, and malformed JSON payloads.
  • Command Reliability: Updated GenerateSkillCommand and ValidateSkillCommand to detect and gracefully log generic exceptions and empty content fetches instead of failing silently or crashing.
  • HTML/Markdown Parsing: Broadened test coverage to cover conversions for tables, definition lists (dl/dt/dd), video sources, iframes, and details/summary HTML tags.
  • Comprehensive Testing: Added unit tests across generate_skills_test.dart, validate_skills_test.dart, and gemini_service_test.dart to explicitly cover invalid API responses, missing metadata fallbacks, and retry logic.
  • Documentation: Updated README.md to reflect the refined parameters, new resource path capabilities, and handling logic.

@jwren

jwren commented Feb 27, 2026

Copy link
Copy Markdown
Member Author

@johnpryan

Addresses several points of failure during the skill generation and validation lifecycle to prevent crashes and provide better error visibility. Additionally, it expands the capability of the `resources` field to accept local relative file paths in addition to URLs.
Key changes include:
- **Expanded Resource Support:** Updated `BaseSkillCommand` and `SkillParams` to allow the `resources` list to take both URLs and relative file paths, improving local testing and generation workflows.
- **Service Robustness:** Enhanced `GeminiService` and API interactions to gracefully handle errors, empty responses, and malformed JSON payloads.
- **Command Reliability:** Updated `GenerateSkillCommand` and `ValidateSkillCommand` to detect and gracefully log generic exceptions and empty content fetches instead of failing silently or crashing.
- **HTML/Markdown Parsing:** Broadened test coverage to cover conversions for tables, definition lists (dl/dt/dd), video sources, iframes, and details/summary HTML tags.
- **Comprehensive Testing:** Added unit tests across `generate_skills_test.dart`, `validate_skills_test.dart`, and `gemini_service_test.dart` to explicitly cover invalid API responses, missing metadata fallbacks, and retry logic.
- **Documentation:** Updated `README.md` to reflect the refined parameters, new resource path capabilities, and handling logic.
@jwren
jwren force-pushed the 2-27-26-edge-cases branch from 6c3ac77 to 75d8d96 Compare March 2, 2026 07:17
@jwren jwren changed the title Fix edge case tests for commands and markdown parsing Improve CLI error handling, validation edge cases, and resource paths Mar 2, 2026
@johnpryan
johnpryan merged commit fadc987 into flutter:main Mar 2, 2026
2 checks passed
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.

2 participants