ci: Fix model change detection script and registry parsing logic - #169
Merged
Conversation
added 4 commits
April 14, 2026 20:47
…tructure classification
Performance Comparison
|
|
The author of this PR, tadani3, is not an activated member of this organization on Codecov. |
Contributor
There was a problem hiding this comment.
Pull request overview
Improve CI scoping by making the “affected model” detection smarter for component/task changes and by enhancing registry parsing to discover model registrations defined via a declarative _REGISTRATIONS dict.
Changes:
- Update
classify_file()to treatsrc/mobius/components/andsrc/mobius/tasks/as “traceable” rather than always forcingrun_all. - Extend
_build_registry_class_to_types()to parse declarative_REGISTRATIONS = {...}registrations insrc/mobius/_registry.py. - Expand/update unit and integration-style tests to cover traceable behavior and the new registry parsing pattern.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| scripts/detect_affected_models.py | Adds traceable classification and import-graph-based impact tracing; updates registry parsing to support _REGISTRATIONS dict pattern. |
| scripts/detect_affected_models_test.py | Updates classification expectations and adds/adjusts tests for traceable behavior and registry parsing. |
justinchuby
reviewed
Apr 14, 2026
justinchuby
reviewed
Apr 14, 2026
justinchuby
approved these changes
Apr 14, 2026
added 4 commits
April 15, 2026 16:53
tadani3
enabled auto-merge (squash)
April 15, 2026 17:06
tadani3
disabled auto-merge
April 15, 2026 17:17
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.
This pull request significantly improves the logic for detecting which models are affected by changes in the codebase, particularly for changes to component and task files. Instead of always triggering a full rebuild/test (
run_all) when these files change, the script now traces their impact via the import graph to determine exactly which models are affected. The registry parsing is also enhanced to support a new declarative registration pattern. Comprehensive tests have been added and updated to validate these behaviors.Improvements to affected model detection:
src/mobius/components/andsrc/mobius/tasks/) are now classified as"traceable"instead of"shared_infra", and their impact is determined by tracing the import graph to find affected models, rather than always triggeringrun_all. (scripts/detect_affected_models.py,scripts/detect_affected_models_test.py) [1] [2] [3] [4] [5] [6]run_all. (scripts/detect_affected_models.py,scripts/detect_affected_models_test.py) [1] [2]Enhancements to registry parsing:
_REGISTRATIONS = {"name": ModelRegistration(ClassName, ...)}), ensuring all registered models are correctly discovered. (scripts/detect_affected_models.py) [1] [2] [3]Test coverage and validation:
scripts/detect_affected_models_test.py) [1] [2]scripts/detect_affected_models_test.py)These changes make the affected model detection more accurate and efficient, reducing unnecessary full runs and providing better granularity for CI/CD workflows.