Add match_stability: pre-match settle gating + match persistence#395
Merged
Conversation
Matching mid-animation is a top flakiness source; wait_until_screen_stable gates a live loop with a boolean and can't score an injectable frame sequence or check a match held steady. region_stability scores consecutive-frame SSIM; match_persistence confirms a template is found in every frame with the centres agreeing within agree_px. Reuses ssim + visual_match + grounding_consensus.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 25 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
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.



摘要
新增
region_stability/match_persistence— 比對前安定閘與命中跨幀穩定性,作用於注入幀。在動畫進行中比對是主要不穩定來源;smart_waits.wait_until_screen_stable以布林閘控即時輪詢迴圈,無法對可注入幀序列評分穩定度,也無法檢查某命中是否跨幀維持。region_stability以相鄰幀 SSIM 評分序列安定度({stable, mean_ssim, min_ssim});match_persistence確認 template 在每一幀都找到且命中中心於agree_px內一致({persisted, n_hits, jitter},jitter=0 穩如磐石)。重用ssim.ssim_compare+visual_match.match_template+grounding_consensus.consensus_point,不新增比對程式。幀可注入。Qt-free。五層
utils/match_stability/—region_stability、match_persistence。AC_region_stability+AC_match_persistence/ MCPac_region_stability+ac_match_persistence/ Script Builder(Image)。測試
test_match_stability_batch.py— 相同幀穩定、移動元素不穩定、單幀 trivially stable、命中跨幀維持、缺幀不維持、wiring + facade。7 passed。ruff / bandit / radon / float-scan / Qt-free 全乾淨。