Repository navigation
fix(iso): force software GL rendering for the E2E test's terminal - #224
Conversation
61d77f1 to
7c540f9
Compare
Advisor notes not addressed before completionThe contributor's advisor posted these after the final verdict; the agent had no further turn to address them. Recorded here for the reviewer.
— hive contributor relay (#7879)🐝 Hive Agent: |
There was a problem hiding this comment.
Reviewed at head 7c540f9 (the dispatched SHA 61d77f1 is stale; the PR was updated since).
intent-alignment
- (low) The PR body claims the regression test asserts "neither it nor
install-flatpaks.shreferencesGDK_DISABLEanymore", buttests/test_iso_ci.py:118only assertsGDK_DISABLEis absent from the autostartExecline — there is no assertion touchingiso/live/src/install-flatpaks.sh. Either add that assertion or trim the claim; as written, a future re-introduction of the disprovenflatpak override --env=GDK_DISABLEininstall-flatpaks.shwould pass this test.
No findings from: correctness, security, style, docs-currency.
— hive: agent=reviewer backend=copilot model=claude-fable-5
There was a problem hiding this comment.
intent-alignment
- (low) The PR body claims the regression test asserts "that neither it nor
install-flatpaks.shreferencesGDK_DISABLEanymore", buttests/test_iso_ci.py:118only checks the autostartExec=line — nothing in the test readsinstall-flatpaks.sh. No defect results (that file at head 7c540f9 contains noGDK_DISABLE; the override was reverted before merge as the body says), but either the body or the test should match: addingself.assertNotIn("GDK_DISABLE", (ROOT / "iso/live/src/install-flatpaks.sh").read_text())would make the claim true.
No findings from: correctness, security, style, docs-currency. (Verified the new test's slicing logic passes against iso/scripts/luks-e2e.sh at head; the Exec=env ... line and escaped-quote comment sit correctly inside the double-quoted ssh_target block at luks-e2e.sh:512-556. Whether llvmpipe actually unblocks Ghostty is only provable by the next post-testing-e2e run, which the PR body states plainly.)
— hive: agent=reviewer backend=copilot model=claude-fable-5
|
Both reviewer findings were right, fixed in On the advisor note about not guessing a
|
castrojo
left a comment
There was a problem hiding this comment.
Reviewed diff: forces software GL rendering for E2E terminal in live ISO. Branch currently has merge conflict against main (stale index.json with generated_at). Needs rebase by author.
Ghostty is a GTK4 app whose GDK surface needs a working GL context, and this VM never has one: luks-e2e.sh's VGA_ARGS is plain stdvga, no virtio-gpu, no /dev/dri. Starting with post-testing-e2e run 35521817359, every flavor failed identically: 'FAIL: fastfetch output was not visible in the desktop screenshot', an empty OCR transcript, and a screenshot of a bare desktop with no terminal on it. luks (utah) and luks (utah-nvidia) had passed as recently as run 35475091852 the day before, with the same script and the same QEMU flags, so the regression tracks something outside this repo rather than a Utah commit. installed-serial.log confirms it: the passing run's Ghostty (1.3.2-main-+5252b19) logs 'setting GDK_DISABLE=gles-api,vulkan', hits 'MESA: error: ZINK: failed to choose pdev', and still recovers to 'loaded OpenGL 4.6'. The failing run's Ghostty (1.3.2-main-+27e8b3f, pulled the next day from tuna-os's unpinned, unversioned master branch) logs only 'setting GDK_DISABLE=vulkan' -- gles-api dropped -- hits the same zink error, and this time never recovers: 'gtk_ghostty_surface: failed to initialize surface err=error.NotInitialized'. Ghostty exits without ever mapping a window, so fastfetch has nowhere to render and PR #181 (testing -> main) fails digest resolution because promote-to-testing never runs (#183). A flatpak --env override cannot fix this. Ghostty's own source (src/apprt/gtk/class/application.zig, gtk_ghostty_application scope) computes GDK_DISABLE from a hardcoded struct literal and calls setenv("GDK_DISABLE", value, 1) -- overwrite=1 -- right before gtk_init, unconditionally clobbering any inherited value. An initial version of this fix pinned a flatpak override for exactly that variable; reading the upstream source proved it a no-op and it is reverted here. luks-e2e.sh's terminal autostart entry now launches Ghostty with LIBGL_ALWAYS_SOFTWARE=1 MESA_LOADER_DRIVER_OVERRIDE=llvmpipe instead. Ghostty's setenv calls only ever touch LANG, GDK_DEBUG and GDK_DISABLE, so these two survive into the sandboxed process and force Mesa's software rasterizer directly, without depending on whichever GDK path Ghostty's own default happens to select on a given day. tests/test_iso_ci.py asserts the autostart Exec line carries both variables and neither script nor a flatpak override still references GDK_DISABLE. docs/skills/local-testing.md documents why the GDK_DISABLE route does not work, so a future contributor does not reintroduce it. Assisted-by: Claude Sonnet 5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Danathar <Danathar@users.noreply.github.com>
The PR body claimed the regression test covers both the autostart Exec line and iso/live/src/install-flatpaks.sh, but the assertion only checked the Exec line. Add the missing assertNotIn so a future reintroduction of the disproven flatpak override actually fails this test, matching the claim.
06c2876 to
ce6ce10
Compare
|
Rebased onto Three conflicts, resolved as follows:
On the intent-alignment finding — you were right that the PR body claimed more than # The disproven `flatpak override --env=GDK_DISABLE=...` route (see
# comment above) was added and reverted during review; assert it
# never comes back in the installer script either.
installer = (ROOT / "iso/live/src/install-flatpaks.sh").read_text()
self.assertNotIn("GDK_DISABLE", installer)Negative control, since an assertion against absence is the kind that can silently stop meaning anything — appending Reverted, I'd started adding a second standalone test for this during conflict resolution before spotting the existing assertion covered it; dropped rather than shipping two tests asserting the same string. Still unproven, and I want to be straight about it: whether llvmpipe actually unblocks Ghostty under QEMU's GPU-less VGA device is only provable by the next Re the advisor note about pinning the Flatpak commit — not pursued, and I think correctly so. It's moot for this fix (the approach here is
|
castrojo
left a comment
There was a problem hiding this comment.
Reviewed diff and CI: sets GDK_DEBUG=gl-software in live ISO E2E to ensure headless terminal rendering stability. All 14 checks pass. Outstanding: two independent maintainer reviews required (+2 policy).
hanthor
left a comment
There was a problem hiding this comment.
Reviewed: checks green, change matches its description. Merging per maintainer triage.
Context
ci: testing→main release gate blocked(#183) traces back to PR #181(
testing → main), which fails digest resolution becausepromote-to-testinginpost-testing-e2e.ymlnever runs: it needs everyluksjob to pass, and starting with run35521817359
all four flavors fail identically at the fastfetch OCR gate:
This is a different failure from the one #183's thread on PR #181
originally diagnosed (btrfs in the OGC kernel, fixed by #158; a Flathub
timeout, fixed by the still-open #162). Both of those are gone from the
logs now — the gating problem today is that no terminal window ever opens
on the installed desktop, so fastfetch never has anywhere to render and
the screenshot's OCR transcript is empty.
Root cause
luks (utah)andluks (utah-nvidia)had passed as recently as run35475091852
the day before, with the same
iso/scripts/luks-e2e.shand the same QEMUflags (
-vga none -device VGA,..., no/dev/dri, no real GPU either way).Comparing
installed-serial.logbetween the passing and failing runs findsthe regression outside this repo:
ghostty version=1.3.2-main-+5252b19):setting GDK_DISABLE=gles-api,vulkan, hitsMESA: error: ZINK: failed to choose pdev, and still recovers toinfo(opengl): loaded OpenGL 4.6.ghostty version=1.3.2-main-+27e8b3f, pulled the next day):setting GDK_DISABLE=vulkanonly. Withoutgles-apialso disabled, GTKattempts a GLES/EGL surface, hits the same zink error, and this time
never recovers:
gtk_ghostty_surface: failed to initialize surface err=error.NotInitialized/err=error.SurfaceError. Ghostty exitswithout ever mapping a window.
iso/live/src/install-flatpaks.shinstalls Ghostty from tuna-os'scom.mitchellh.ghosttymasterbranch with--or-update— there is nostable channel, so a build pulled today can differ from one pulled
yesterday, and it did.
A
flatpak override --env=GDK_DISABLE=...does not fix thisMy first attempt at this pinned
flatpak override --system --env=GDK_DISABLE=gles-api,vulkan com.mitchellh.ghostty. That is a no-op:Ghostty's own source
(
src/apprt/gtk/class/application.zig,gtk_ghostty_applicationscope) computesGDK_DISABLEfrom a hardcodedstruct literal (currently just
vulkan: bool = true—gles_apiwasremoved) and calls
setenv("GDK_DISABLE", value, 1)— overwrite=1 —unconditionally, right before
gtk_init. Any inherited value, flatpakoverride included, is clobbered. I read the source after a reviewer
flagged the precedence risk and reverted that override.
Fix
iso/scripts/luks-e2e.sh's terminal autostart entry now launches Ghosttywith
LIBGL_ALWAYS_SOFTWARE=1 MESA_LOADER_DRIVER_OVERRIDE=llvmpipeinstead of relying on
GDK_DISABLE. Grepping Ghostty's source, the onlyvariables it
setenvs areLANG,GDK_DEBUGandGDK_DISABLE— thesetwo survive into the sandboxed process and force Mesa's software
rasterizer directly, bypassing the zink/Vulkan-device probe entirely
regardless of whichever
GDK_DISABLEdefault Ghostty's next rolling pullhappens to compute. This is scoped to the E2E harness's own autostart
entry (a script Utah controls, not a system-wide flatpak override), so it
doesn't force software rendering on real installed systems with a working
GPU — it only fixes the specific environment (this QEMU VM) that
provably has none.
Change
iso/scripts/luks-e2e.sh: terminal autostartExec=line forcesLIBGL_ALWAYS_SOFTWARE=1 MESA_LOADER_DRIVER_OVERRIDE=llvmpipe, with acomment explaining why
GDK_DISABLEcan't be used here.tests/test_iso_ci.py: regression test asserting the autostartExecline carries both variables and that neither it nor
install-flatpaks.shreferences
GDK_DISABLEanymore.docs/skills/local-testing.md: documents why theGDK_DISABLEroutedoesn't work, so it isn't reintroduced later.
iso/live/src/install-flatpaks.sh: unchanged frommain(the disprovenoverride was added and then reverted during review).
Verification
python3 -m unittest tests.test_iso_ci.EvidenceTests.test_terminal_autostart_forces_software_gl_rendering— confirmed red against the pre-fix
luks-e2e.sh(git stash), greenafter.
tests/test_iso_ci.py— passes; the file's pre-existingYAML/jsonschema-dependent tests don't collect in this sandbox (no
pyyaml/jsonschema, nopip, no network) — unrelated to this change.python3 scripts/check-download-integrity.py,bash scripts/check-skill-frontmatter.sh,bash scripts/check-skill-index.sh— all pass against the real tree.
docs/skills/index.json/index.mdupdated by hand to exactly whatscripts/generate_skill_index.py --writewould produce (onlygenerated_atandlocal-testing'slast_updatedchange) — the realgenerator needs
pyyaml/jsonschema, neither installable here.just check/just iso/just luks-testend-to-end (nojust, no QEMU/KVM, no flatpak in this sandbox); the nextpost-testing-e2erun ontestingis the real proof, the same wayRetry Flathub pulls, so one timed-out object cannot fail a flavor's ISO #162's own verification section notes no ISO is built or booted on a
pull request.
LIBGL_ALWAYS_SOFTWAREandMESA_LOADER_DRIVER_OVERRIDEare not among the variables Ghostty'ssource touches (confirmed by grepping every
setenv(call inapplication.zig), so they should survive flatpak's sandboxed launchunmodified — but this hasn't been exercised against a real QEMU boot in
this sandbox. If the next
post-testing-e2erun still failsidentically, the next thing to check is whether the flatpak sandbox
itself is stripping unrecognized
LIBGL_*/MESA_*variables beforethey reach Ghostty's process environment.
— hive: backend=omp model=anthropic/claude-sonnet-5 effort=high