Skip to content

Release 2.1.3: Windows startup fixes and TLS configuration audit - #5

Open
web-elite wants to merge 5 commits into
B3hnamR:masterfrom
web-elite:master
Open

web-elite wants to merge 5 commits into
B3hnamR:masterfrom
web-elite:master

Conversation

@web-elite

@web-elite web-elite commented Nov 25, 2026 •

Copy link
Copy Markdown

Summary

This pull request contributes the latest changes from the web-elite/AutoZcoder fork.

  • Add release notes for versions 2.1.2 and 2.1.3.
  • Improve the Windows GUI startup flow.
  • Update the packaged executable version metadata.
  • Adjust TLS configuration audit tests.
  • Add and update Windows startup regression coverage.

Validation

The changes were tested by the fork maintainer and reported to work as expected.

Changed areas

  • gui_main.py
  • scripts/packaging/exe_version.txt
  • zcode_gateway/__init__.py
  • tests/test_tls_config_audit.py
  • tests/test_windows_startup_fixes.py
  • docs/releases/2.1.2.md
  • docs/releases/2.1.3.md

Thanks for maintaining AutoZcoder and reviewing this contribution.


Summary by cubic

Merges the latest fork changes for release 2.1.3, fixing Windows desktop startup so inherited system proxy settings can no longer intercept local gateway health probes and cause the launcher to shut down a healthy server after the readiness timeout. Readiness checking now stays on a direct loopback connection and startup diagnostics are more detailed.

Windows startup

  • _gateway_urlopen bypasses system proxies for loopback probes while preserving scoped TLS certificate and hostname verification for configured HTTPS gateway origins.
  • Readiness logging records probe count, last connection error, and server and worker state; worker crashes and fatal launcher exceptions include full tracebacks.
  • The same direct-connection helper is used for existing-instance checks and local generator shutdown requests.

Release and tests

  • Bumps the app version and executable metadata to 2.1.3 and adds release notes for 2.1.2 and 2.1.3.
  • Updates tests to mock the new URL opener, adding coverage for proxy bypass, TLS context passthrough, timeout error capture, and worker crash logging.

Written for commit 8b2e7e2. Summary will update on new commits.

View guided diff

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 7 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="gui_main.py">

<violation number="1" location="gui_main.py:92">
P2: `_gateway_urlopen` disables proxies for every gateway URL, not only loopback listeners. Preserve the system proxy for non-loopback `child_origin` values, or remote/corporate deployments can fail readiness and shutdown despite the configured origin being reachable through that proxy.</violation>

<violation number="2" location="gui_main.py:416">
P2: The new `BaseException` handler converts argparse’s normal `SystemExit(0)` for `--help` into exit code 1 and labels it fatal. Re-raise `SystemExit` before the fatal handler.</violation>
</file>

Reply to a comment to ask cubic a question or push back. It learns from your replies.

View guided diff | Re-trigger cubic

Comment thread gui_main.py
try:
main()
except Exception:
except BaseException as exc:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The new BaseException handler converts argparse’s normal SystemExit(0) for --help into exit code 1 and labels it fatal. Re-raise SystemExit before the fatal handler.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At gui_main.py, line 416:

<comment>The new `BaseException` handler converts argparse’s normal `SystemExit(0)` for `--help` into exit code 1 and labels it fatal. Re-raise `SystemExit` before the fatal handler.</comment>

<file context>
@@ -370,7 +413,13 @@ def _shutdown_generator() -> None:
     try:
         main()
-    except Exception:
+    except BaseException as exc:
         import traceback
-        sys.stderr.write(traceback.format_exc()[-1200:] + "\n")
</file context>
Suggested change
except BaseException as exc:
except SystemExit:
raise
except BaseException as exc:

Comment thread gui_main.py

def _gateway_urlopen(request, *, timeout: float, context: ssl.SSLContext | None = None):
"""Open our own listener directly; system HTTP proxies must not intercept loopback probes."""
handlers = [urllib.request.ProxyHandler({})]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: _gateway_urlopen disables proxies for every gateway URL, not only loopback listeners. Preserve the system proxy for non-loopback child_origin values, or remote/corporate deployments can fail readiness and shutdown despite the configured origin being reachable through that proxy.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At gui_main.py, line 92:

<comment>`_gateway_urlopen` disables proxies for every gateway URL, not only loopback listeners. Preserve the system proxy for non-loopback `child_origin` values, or remote/corporate deployments can fail readiness and shutdown despite the configured origin being reachable through that proxy.</comment>

<file context>
@@ -66,20 +67,33 @@ def _notify(message: str) -> None:
+
+def _gateway_urlopen(request, *, timeout: float, context: ssl.SSLContext | None = None):
+    """Open our own listener directly; system HTTP proxies must not intercept loopback probes."""
+    handlers = [urllib.request.ProxyHandler({})]
+    if context is not None:
+        handlers.append(urllib.request.HTTPSHandler(context=context))
</file context>

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.

1 participant