Found while investigating dead-Appium-session error masking (see PR fixing that, #506).
_alloc_time_for_strategy (used by StrategyManager.assert_presence, common/strategies.py) divides the total timeout evenly across applicable strategies. When timeout=1 and there are 2+ applicable strategies, integer/float flooring allocates 0 seconds to each strategy — so assert_presence silently asserts nothing instead of erroring or falling back to a sane minimum per-strategy budget.
Ask: floor each strategy's allocation at some sane minimum (e.g. never below ~0.5s), or raise a clear configuration error when the requested timeout can't be meaningfully divided across the number of applicable strategies, instead of silently no-op'ing the assertion.
Not independently reproduced end-to-end in this pass — flagging from source-level analysis for someone to verify against a real assertion call with a short timeout.
Found while investigating dead-Appium-session error masking (see PR fixing that, #506).
_alloc_time_for_strategy(used byStrategyManager.assert_presence,common/strategies.py) divides the total timeout evenly across applicable strategies. Whentimeout=1and there are 2+ applicable strategies, integer/float flooring allocates0seconds to each strategy — soassert_presencesilently asserts nothing instead of erroring or falling back to a sane minimum per-strategy budget.Ask: floor each strategy's allocation at some sane minimum (e.g. never below ~0.5s), or raise a clear configuration error when the requested timeout can't be meaningfully divided across the number of applicable strategies, instead of silently no-op'ing the assertion.
Not independently reproduced end-to-end in this pass — flagging from source-level analysis for someone to verify against a real assertion call with a short timeout.