Skip to content

fix(gateway): surface bootstrap failures to stderr (salvage #21157) - #21278

Merged
teknium1 merged 2 commits into
mainfrom
salvage/pr-21157
May 7, 2026
Merged

fix(gateway): surface bootstrap failures to stderr (salvage #21157)#21278
teknium1 merged 2 commits into
mainfrom
salvage/pr-21157

Conversation

@teknium1

@teknium1 teknium1 commented May 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Three gateway bootstrap try/except blocks (IPv4 preference application, config-structure validation, deprecated-cwd warning) now surface failures to stderr instead of silently swallowing them. These run before setup_logging() has initialized file logging (L14803) and before the module-level logger is defined (L543), so print(..., file=sys.stderr) is the correct mechanism at this phase of boot.

Changes

  • gateway/run.py: replace except Exception: pass with print(f" Warning: ...: {exc}", file=sys.stderr) in three pre-logger bootstrap blocks.

Improvements during salvage

Original patch emitted a bare "Warning: X failed" with no exception text. Added the exception string so operators can actually diagnose what went wrong.

Validation

Compile check passes. Logic is unchanged — the three blocks still can't crash gateway boot if one of the validators fails.

Closes #21157 via salvage. Co-authored by @wabrent.

wabrent and others added 2 commits May 7, 2026 06:25
Follow-up to the salvaged warning. Without the exception string,
operators see "config validation failed" with no hint why.
@teknium1
teknium1 merged commit 4d32f40 into main May 7, 2026
5 checks passed
@teknium1
teknium1 deleted the salvage/pr-21157 branch May 7, 2026 13:26
@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: salvage/pr-21157 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 7531 on HEAD, 7531 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 3953 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery labels May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants