CI: Introduce functional scripts dependencies in CI test selection - #3396
Merged
Conversation
Add functional script dependency support to the test selector so prerequisite scripts run first. Introduce `FUNC_SCRIPT_DEPENDENCIES` (including the 3D -> tensorflow single animal prerequisite), apply dependency-aware ordering with cycle detection, and keep provenance by tagging dependency-driven selections. Expand selector tests to cover ordering, deduplication, cycle errors, and 3D change-driven script selection.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds dependency-aware ordering for functional scripts selected by the CI test selector, ensuring prerequisite scripts run before dependents (notably for 3D pose estimation scripts), and extends the selector’s tests to cover ordering and cycle detection.
Changes:
- Introduce
FUNC_SCRIPT_DEPENDENCIESin the selector config to declare functional-script prerequisites. - Add
order_functional_scripts()to expand/resolve dependencies with cycle detection and apply dependency-aware ordering indecide(). - Extend selector decision tests to validate dependency ordering and cycle handling.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tools/test_selector.py | Adds dependency expansion + ordering for functional scripts and annotates dependency-driven provenance. |
| tools/test_selector_config.py | Defines the initial functional-script dependency mapping (3D script depends on TF single-animal script). |
| tests/tools/test_selector/test_selector_decision.py | Adds tests for dependency ordering, deduplication, cycle detection, and 3D change-driven selection ordering. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…dency:* reason. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Add `resolve_functional_scripts` to expand selected functional scripts with transitive dependencies, return dependency-ordered execution, and detect cycles explicitly. `decide()` now uses this resolver to collect dependency provenance for auto-added scripts, replacing the previous one-level dependency provenance logic and keeping output provenance formatting clearer and consistent.
C-Achard
marked this pull request as ready for review
July 15, 2026 10:16
deruyter92
approved these changes
Jul 15, 2026
MMathisLab
approved these changes
Jul 15, 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.
Add functional script dependency support to the test selector so prerequisite scripts run first.
FUNC_SCRIPT_DEPENDENCIES(including the 3D -> tensorflow single animal prerequisite)Fixes the current fast lane failures related to the 3D script running too early.