Add popup/interrupt watchdog for unattended automation#215
Closed
JE-Chen wants to merge 1 commit into
Closed
Conversation
Add a concurrent guard thread that watches for registered popups and dismisses them independently of the main flow — the #1 unattended-run failure cause per the practitioner-pain research. Generic matcher+action rules (window-title convenience builders + injectable custom rules); a failing rule is logged and skipped so the loop never dies. Wired through facade (PopupWatchdog / WatchdogRule / default_popup_watchdog), AC_watchdog_add/start/stop/list executor commands, ac_watchdog_* MCP tools, Script Builder entries, fake-driven headless tests, and v8 docs / README sections.
|
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 53 |
| 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.



Summary
The practitioner pain-point research flagged this as the #1 cause of
unattended-automation failure: an unexpected dialog the script was never
coded for (UAC, "session expiring", Windows Update, a modal). The popup
watchdog runs a concurrent guard thread that watches for registered
patterns and dismisses them independently of the main step sequence, so
a long run keeps going.
What's added (full five-layer wiring)
PopupWatchdog/WatchdogRule: genericmatcher+action rules, window-title convenience builders
(
action="close"or a key to press), a background poll thread, and ahitslog. A failing rule is logged and skipped — one bad rule neverkills the guard loop.
PopupWatchdog,WatchdogRule,default_popup_watchdog.AC_watchdog_add/AC_watchdog_start/AC_watchdog_stop/AC_watchdog_list.ac_watchdog_*. Script Builder: "Flow" entries.Testing
covering dismissal, error-swallowing resilience, start/stop lifecycle,
and the executor/MCP/builder wiring.
ruff/radon/banditclean;import je_auto_controlstaysQt-free; no orphan Script Builder commands.