Improve CLI error handling, validation edge cases, and resource paths - #3
Merged
Merged
Conversation
Member
Author
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
force-pushed
the
2-27-26-edge-cases
branch
from
March 2, 2026 07:17
6c3ac77 to
75d8d96
Compare
johnpryan
approved these changes
Mar 2, 2026
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.
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
resourcesfield to accept local relative file paths in addition to URLs.Key changes include:
BaseSkillCommandandSkillParamsto allow theresourceslist to take both URLs and relative file paths, improving local testing and generation workflows.GeminiServiceand API interactions to gracefully handle errors, empty responses, and malformed JSON payloads.GenerateSkillCommandandValidateSkillCommandto detect and gracefully log generic exceptions and empty content fetches instead of failing silently or crashing.generate_skills_test.dart,validate_skills_test.dart, andgemini_service_test.dartto explicitly cover invalid API responses, missing metadata fallbacks, and retry logic.README.mdto reflect the refined parameters, new resource path capabilities, and handling logic.