Repository navigation
Conversation
There was a problem hiding this comment.
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
| try: | ||
| main() | ||
| except Exception: | ||
| except BaseException as exc: |
There was a problem hiding this comment.
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: |
|
|
||
| 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({})] |
There was a problem hiding this comment.
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>
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
This pull request contributes the latest changes from the
web-elite/AutoZcoderfork.Validation
The changes were tested by the fork maintainer and reported to work as expected.
Changed areas
gui_main.pyscripts/packaging/exe_version.txtzcode_gateway/__init__.pytests/test_tls_config_audit.pytests/test_windows_startup_fixes.pydocs/releases/2.1.2.mddocs/releases/2.1.3.mdThanks 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_urlopenbypasses system proxies for loopback probes while preserving scoped TLS certificate and hostname verification for configured HTTPS gateway origins.Release and tests
Written for commit 8b2e7e2. Summary will update on new commits.