Skip to content

Conversation

@anandwana001
Copy link
Collaborator

@anandwana001 anandwana001 commented Dec 2, 2025

Fixes #3248 #3293 #3294

Conditional tasks were not updating correctly when their dependencies were part of a chain. Specifically, if Task C depended on Task B, and Task B depended on Task A:

User selects value in A -> B becomes visible.
User selects value in B -> C becomes visible.
User changes A -> B becomes hidden.
Issue: Task C remained visible because it was still evaluating its condition against Task B's stale data, ignoring the fact that Task B was now hidden/invalid.

Updated TaskSequenceHandler.generateValidTasksList() to iteratively build the list of valid tasks.

When evaluating if a task is valid, the system now only considers data from tasks that have already been determined to be valid in the current sequence.
This ensures that hidden tasks are treated as having no data, correctly propagating the "hidden" state down the dependency chain.

Verified with a local reproduction test case (TaskSequenceHandlerReproTest) simulating the A->B->C dependency chain.

@rfontanarosa @shobhitagarwal1612 PTAL?

@auto-assign auto-assign bot requested a review from scolsen December 2, 2025 18:33
@codecov
Copy link

codecov bot commented Dec 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.99%. Comparing base (d36f894) to head (dc10d40).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3383      +/-   ##
============================================
+ Coverage     68.96%   68.99%   +0.02%     
- Complexity     1568     1570       +2     
============================================
  Files           311      311              
  Lines          8427     8434       +7     
  Branches        932      934       +2     
============================================
+ Hits           5812     5819       +7     
  Misses         2044     2044              
  Partials        571      571              
Files with missing lines Coverage Δ
...m/android/ui/datacollection/TaskSequenceHandler.kt 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@anandwana001
Copy link
Collaborator Author

Hi @rfontanarosa If you could help us here in testing this with the exact bug you were facing, it will be quicky.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conditional tasks not working properly

1 participant