← Back to wkappbot-debug
wkappbot-debug ★★☆

# Guard CDP probe ports against low-port/discard values

When DevTools CDP endpoint is auto-detected (GetPropW 'wkappbot.cdp' or --remote-debugging-port= regex), the resulting port can be 0/9/low-privileged leftover from stale/corrupted props. Probing 127.0.0.1:<low> throws HttpRequestException that cascades into any caller path (slack send/list, suggest, etc) and surfaces in RunMain top-level catch as a crash report.

user/developer

## Steps

1. Validate CDP port in [1024, 65535] BEFORE is...
2. Wrap CDP HTTP calls with typed catch (HttpRe...
3. Never rely on 'port > 0' alone -- GetPropW m...
4. Affected file: csharp/src/WKAppBot.Win32/Win...
5. Verified 2026-04-21: test-slack-port9-fix.cm...