Repository navigation
fix(ci): stop two tests from assuming Linux - #40
Merged
Merged
Conversation
CI is green on Linux and red on the macOS and Windows runners, and neither
failure is in the code under test — both are tests encoding this machine's
layout as if it were every machine's.
`TestConfigPathFallsBackToUserConfigDir` pointed XDG_CONFIG_HOME at a temp
directory and expected configPath to return it. That is only how Linux
answers: macOS resolves the user config directory to ~/Library/Application
Support and Windows to %AppData%, so the runners compared a real path against
a temp one and failed. The expectation now comes from os.UserConfigDir() —
the same function configPath consults — which keeps the assertion ("the user
config dir, plus pylon/pylon.yaml") without encoding one platform's layout.
Nothing is written, so the test needs no sandbox to be safe.
The last branch of configPath — no home directory at all, fall back to the
bare filename — had no test at all. It has one now, skipped on any OS that
still reports a config dir once the environment is cleared.
Also bring pylon-ui/go.mod's go directive to 1.26.3, matching the root. The
GUI is a separate module so nothing kept them together, and they had drifted
three minor versions apart. CI installs the daemon's Go from go.mod and the
GUI's from pylon-ui/go.mod, so the two jobs were building on different
toolchains — while the release workflow builds both with the root's. The GUI
that ships was compiled by a toolchain CI never tested it on.
Verified locally: go build/vet/test, macOS + Windows cross-compile, and the
GUI module builds, vets and tests under the new directive with go.sum
untouched. The cross-platform part can only be proven by CI itself.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The last of the three red jobs. The macOS runner failed every test that
stands up the fake daemon:
listen unix /var/folders/df/…/T/TestGoogleStatusPassesDaemonAnswerThroughconnected…/001/s:
bind: invalid argument
The helper already knew a Unix socket path is capped near 104 bytes — it
shortened the *filename* to "s" for exactly that reason. But the budget is
spent by the directory: t.TempDir() names its directory after the test, so a
long test name inside macOS's long $TMPDIR overruns the cap no matter how
short the file is called. Linux and Windows have room to spare, which is why
only one of the three runners noticed.
A plain temp directory keeps the path short whatever the test is named.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
YCistak
added a commit
that referenced
this pull request
Aug 10, 2026
* fix(ci): stop two tests from assuming Linux
CI is green on Linux and red on the macOS and Windows runners, and neither
failure is in the code under test — both are tests encoding this machine's
layout as if it were every machine's.
`TestConfigPathFallsBackToUserConfigDir` pointed XDG_CONFIG_HOME at a temp
directory and expected configPath to return it. That is only how Linux
answers: macOS resolves the user config directory to ~/Library/Application
Support and Windows to %AppData%, so the runners compared a real path against
a temp one and failed. The expectation now comes from os.UserConfigDir() —
the same function configPath consults — which keeps the assertion ("the user
config dir, plus pylon/pylon.yaml") without encoding one platform's layout.
Nothing is written, so the test needs no sandbox to be safe.
The last branch of configPath — no home directory at all, fall back to the
bare filename — had no test at all. It has one now, skipped on any OS that
still reports a config dir once the environment is cleared.
Also bring pylon-ui/go.mod's go directive to 1.26.3, matching the root. The
GUI is a separate module so nothing kept them together, and they had drifted
three minor versions apart. CI installs the daemon's Go from go.mod and the
GUI's from pylon-ui/go.mod, so the two jobs were building on different
toolchains — while the release workflow builds both with the root's. The GUI
that ships was compiled by a toolchain CI never tested it on.
Verified locally: go build/vet/test, macOS + Windows cross-compile, and the
GUI module builds, vets and tests under the new directive with go.sum
untouched. The cross-platform part can only be proven by CI itself.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* fix(gui): keep the fake daemon's socket path inside macOS's limit
The last of the three red jobs. The macOS runner failed every test that
stands up the fake daemon:
listen unix /var/folders/df/…/T/TestGoogleStatusPassesDaemonAnswerThroughconnected…/001/s:
bind: invalid argument
The helper already knew a Unix socket path is capped near 104 bytes — it
shortened the *filename* to "s" for exactly that reason. But the budget is
spent by the directory: t.TempDir() names its directory after the test, so a
long test name inside macOS's long $TMPDIR overruns the cap no matter how
short the file is called. Linux and Windows have room to spare, which is why
only one of the three runners noticed.
A plain temp directory keeps the path short whatever the test is named.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: YCistak <YCistak@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.
CI'ın kırmızı olmasının sebebi fatura değil — daha önce öyle sanıyorduk, o engel kalkmış. Altı job'un üçü gerçek test hatasıyla düşüyor ve ikisi de testin kendi varsayımı, üretim kodu doğru.
Ne değişti
TestConfigPathFallsBackToUserConfigDir—XDG_CONFIG_HOME'u geçici bir dizine kurup onu bekliyordu. Bu yalnızca Linux'un cevabı: macOS~/Library/Application Support, Windows%AppData%diyor. Beklenti artıkconfigPath'in danıştığıos.UserConfigDir()'den geliyor — iddia aynı kalıyor ("kullanıcı config dizini +pylon/pylon.yaml"), tek bir platformun düzeni kodlanmıyor. Test hiçbir şey yazmadığı için kum havuzuna da gerek yok.configPath'in son dalı (ev dizini hiç yokken çıplak dosya adına düşmesi) hiç test edilmiyordu.pylon-ui/go.mod→go 1.26.3(kök modülle aynı). GUI ayrı bir modül olduğu için ikisini bir arada tutan hiçbir şey yoktu ve üç minor sürüm ayrılmışlardı. CItestjob'unago.mod'dan,guijob'unapylon-ui/go.mod'dan Go kuruyor — yani iki job iki farklı toolchain'le derliyordu; release workflow'u ise ikisini de kökünkiyle derliyor. Yayınlanan GUI, CI'ın hiç test etmediği bir toolchain'le derlenmiş oluyordu.Kalan macOS hatası #38'de
gui (macos)job'upylon-ui/app_test.go'daki soket yolu uzunluğu yüzünden de düşüyordu. O dosyayı #38 zaten baştan yazıyor, düzeltme oraya kondu (134f20f). Master tamamen yeşile ancak bu PR ve #38 birlikte girince döner.Doğrulama
go build/vet/make test, macOS + Windows çapraz derleme, GUI modülünün yeni direktifle derlenip test edilmesi (go.sumdeğişmedi) — hepsi temiz. Çapraz platform kısmının tek gerçek kanıtı bu PR'ın CI'ı.🤖 Generated with Claude Code