Repository navigation
Commit 4097572
Fix affected-model scoping for concrete model file changes (#528)
The CI model-impact detection was over-scoping file changes, so a diff
in one concrete model implementation could incorrectly trigger sibling
models in the same import graph. That widened the test matrix and made
the PR- and Windows-targeted CI behavior less precise than intended.
- Scope
- Model files are now treated as direct registrations first.
- Only shared/base modules without a direct registry mapping continue
through reverse-dependency tracing.
- This keeps broad import-graph impact analysis for infra changes
without cascading unrelated model types when a single model
implementation changes.
- Fix
- In `scripts/detect_affected_models.py`, the model-file path handling
now stops after adding the directly registered model types for that
module.
- Reverse-dependency expansion remains available for
non-directly-registered modules such as shared base classes, preserving
the existing dependency-based behavior where it is actually useful.
- Why this matters
- A change to `src/mobius/models/lfm2.py` no longer incorrectly includes
`lfm2_vl` just because both share common imports or a base
implementation.
- The affected-model list stays aligned with the actual registry
ownership of the file being changed, which is the right scope for CI
targeting.
```python
if module_name in registry_map:
affected.update(registry_map[module_name])
continue
```
This narrows the detection to the actual model registration boundary
while preserving import-graph tracing for shared infrastructure files.
<!-- START COPILOT CODING AGENT SUFFIX -->
- Fixes #527
---------
Signed-off-by: Justin Chu <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: justinchuby <[email protected]>
Co-authored-by: Justin Chu <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>1 parent ce1926f commit 4097572
1 file changed
Lines changed: 21 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
482 | 488 | | |
483 | 489 | | |
484 | 490 | | |
485 | | - | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
486 | 505 | | |
487 | 506 | | |
488 | 507 | | |
| |||
0 commit comments