Repository navigation
Conversation
melonamin
force-pushed
the
fix/linux-structured-control-logging
branch
from
September 3, 2026 01:56
539e917 to
de70918
Compare
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.
What
Give the Linux control-socket lifecycle the same queryable diagnostics that upstream macOS gained in umputun#442.
ControlServernow emits GLib structured notice records with a stableagtermjournal identifier andControlServerdomain. On journal-connected desktops they are filterable with:journalctl --user -t agterm GLIB_DOMAIN=ControlServer --since "30 minutes ago"GLib keeps its standard-stream fallback when no journal is connected.
Cause
The Linux server wrote only its successful bind and two ownership messages directly to stderr. The path-length,
socket(),bind(), andlisten()failure guards returned silently, so the app correctly stayed open but left no reason for a missing control socket.The ad-hoc stderr lines also had no structured category equivalent to upstream's
os.Logger(subsystem:category:)filtering.Minimal reproduction
AGTERM_STATE_DIRwhose resultingagterm.sockpath exceedssockaddr_un.sun_path.The same silent return existed for
socket(),bind(), andlisten()failures.Expected: the app still launches, and the exact failure is available under the
ControlServerlog domain.Change
Commit
539e917(fix(linux): add structured control socket logging):LinuxStructuredLoggeradapter overg_log_structured_array;MESSAGE,PRIORITY=5,GLIB_DOMAIN=ControlServer, andSYSLOG_IDENTIFIER=agtermin one synchronous call;errnotext before cleanup syscalls, split bind/listen handling, and unlink the bound path after a listen failure;No direct libsystemd dependency or custom journal writer is added.
Scope note
This is a Linux host-adapter change only. It does not change:
agtermCore;agtermctl;CLAUDE.mdorCHANGELOG.md.CLAUDE.mdremains upstream-owned project guidance and is intentionally untouched.Keep-in-sync
Testing
All builds and tests ran inside
swift:6.3.2-nobleDocker containers; none ran on the host.Full CI-shaped Docker validation:
scripts/check-linux-core-boundary.sh v0.24.0— passed;scripts/check-linux-cli-drift.sh— passed;scripts/test-linux-architecture.sh— passed;scripts/test-linux-resources.sh— passed;scripts/verify-linux-vendor-cache.sh— passed;cd agterm-linux && swift test— 334 tests in 48 suites passed;cd agterm-linux && swift build— passed;cd agterm-linux && swift build -c release— passed;swiftlint lint --strict --quiet— passed;scripts/stage-linux.sh— passed;scripts/test-linux-ui.sh— full GTK AT-SPI smoke suite passed;ControlServer-Messagestderr prefix.After the final warning-only cleanup, a fresh Docker compile ran:
swift test --filter LinuxStructuredLoggerTests— 2 tests, including 9 message cases, passed;swift build --product AgtermLinux— passed with no warning from the new logger.Independent code review reported no findings.
GitHub Actions run 33247003684 is green: Detect changes, SwiftLint (Linux), Unit tests (Linux), and Build app (Linux GTK) passed; Cookbook checks were skipped by the path filter.
Related upstream
b2351ca1d7e7871cdb0f0e0a97f386ec63133f6bFiles
agterm-linux/Sources/AgtermLinux/ControlServer.swift— modifiedagterm-linux/Sources/AgtermLinux/LinuxStructuredLogger.swift— addedagterm-linux/Tests/AgtermLinuxTests/LinuxStructuredLoggerTests.swift— addeddocs/troubleshooting.md— modifiedplugins/agterm/skills/agterm/troubleshooting.md— modified136 insertions, 14 deletions across 5 files.