fix(evolution): keep skill contracts growth-safe - #9
Merged
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts evolution skill validation to be robust to growing corpora by removing brittle directory-name assertions, tying the ID index size check to the corpus manifest, and updating ROCm-related skill description triggers to reflect current project naming and scope. Flow diagram for evolution skill validation against corpus manifestflowchart TD
A[run validate.py] --> B[load_evolution_skill]
B --> C[load_corpus_manifest_yaml]
C --> D[get_runtime_id_index_size]
D --> E[compare_index_size_to_manifest]
E -->|sizes_match| F[validation_passes]
E -->|sizes_mismatch| G[raise_assertion]
%% Previously: required every repo directory name in description
B -. removed .-> H[assert_all_repo_directories_in_skill_description]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In
test_get_page_scope_and_index, consider guarding access tomanifest['counts']['unique_page_ids'](e.g., withgetor an explicit assertion on manifest structure) so a malformed or evolving manifest format fails with a clearer error than aKeyError. - Since
corpus-manifest.yamlis read on every invocation oftest_get_page_scope_and_index, you might want to cache the parsed manifest (e.g., via a fixture) to avoid repeated disk I/O if more tests start depending on it.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `test_get_page_scope_and_index`, consider guarding access to `manifest['counts']['unique_page_ids']` (e.g., with `get` or an explicit assertion on manifest structure) so a malformed or evolving manifest format fails with a clearer error than a `KeyError`.
- Since `corpus-manifest.yaml` is read on every invocation of `test_get_page_scope_and_index`, you might want to cache the parsed manifest (e.g., via a fixture) to avoid repeated disk I/O if more tests start depending on it.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
Summary
corpus-manifest.yamlinstead of hardcoding 7,542Verification
python3 tests/test_validate.pypython3 tests/test_evolution.pypython3 scripts/validate.pygit diff --checkFound by the live rolling PR #6: automatically harvesting the 7,543rd page correctly updated the corpus manifest, but two legacy assertions still assumed a permanently fixed corpus and blocked CI.
Summary by Sourcery
Align validation and skill metadata with a dynamically growing corpus and updated ROCm kernel optimization sources.
Bug Fixes:
Enhancements: