Repository navigation
fix(e2e): start ponytail under a unit name the image cannot already own - #1112
Conversation
#1108 starts gnome-ponytail-daemon with systemd-run --user --unit=gnome-ponytail-daemon. On dakota:testing that fails before any test runs: "Unit gnome-ponytail-daemon.service was already loaded or has a fragment file." Every GUI and lifecycle shard on main now fails at "Install gnome-ponytail-daemon" (run 42124147912: smoke-a, smoke-b, smoke-firefox, lifecycle), which is what keeps v1 held (#1087). Use the unit name testsuite-ponytail-daemon instead, and fall back to the previous nohup start if the user manager refuses the transient unit for any other reason. The bus-name wait that follows is unchanged. Refs #1087, #1108 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SnzFs53Qcer1xDySyxv1Vj Signed-off-by: Danathar <berths-purger-0g@icloud.com>
d727584
ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blockedHive flagged this PR (author @Danathar, head
Hive did not add the |
|
@Danathar this PR is back in your court ( Failing checks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (4 waiting): fixes are handed out before new work as soon as you have capacity. |
There was a problem hiding this comment.
Summary: This change fixes the desktop test runs that have been failing since this afternoon, by starting the screen-reading helper under a name of our own and quietly falling back to the old start method if that fails. The code change does what it says. One problem: the operator guide that this afternoon's change (#1108) wrote says explicitly to fail hard and never use the old fallback, so the guide now contradicts the workflow. Two smaller notes on the fallback being silent and on the image possibly already running its own copy of the helper.
What I need from you: Update the guide sentence (or drop the fallback) so the two agree.
docs-currency
docs/skills/ci-ops/e2e-workflow/SKILL.md:243(added by #1108, unchanged at d6074d1) still says: "Fail setup if the service cannot start; do not fall back tonohupin the SSH session." The PR adds exactly that fallback at.github/workflows/e2e.yml:1414-1416. Either the doc or the workflow must change; since the PR body argues for the fallback, suggested doc edit:
**`gnome-ponytail-daemon` is built at runtime** — the workflow compiles it from source in a `debian:bookworm` container on the runner and SCPs the binary into the VM. The image does NOT need to ship `gnome-ponytail-daemon`. (See step 20 above.) Start it as a transient `systemd --user` service (`--unit=testsuite-ponytail-daemon`, not `gnome-ponytail-daemon`, which images that ship ponytail already own) sourcing `/tmp/session.env`: with `KillUserProcesses=yes`, logind kills SSH-session processes when ControlMaster expires, leaving the runner with a stale D-Bus owner. If `systemd-run` refuses the transient unit, the step falls back to `nohup` in the SSH session; a run that took that path is exposed to the stale-owner flake and should be treated as suspect.
correctness
.github/workflows/e2e.yml:1414-1416— the fallback is silent. When it fires, the run is back on the exact code path #1108 removed (SSH-scoped process, killable by logind), but nothing in the log says so, so a later stale-D-Bus-owner flake will be hard to attribute. Low severity; suggest marking it:
if ! systemd-run --user --quiet --collect --unit=testsuite-ponytail-daemon \
-- /bin/bash -c 'source /tmp/session.env; exec \$HOME/.local/libexec/gnome-ponytail-daemon >/tmp/ponytail-daemon.log 2>&1'; then
echo 'WARNING: systemd-run refused the transient unit; starting gnome-ponytail-daemon with nohup inside the SSH session (subject to logind KillUserProcesses)'
nohup \$HOME/.local/libexec/gnome-ponytail-daemon >/tmp/ponytail-daemon.log 2>&1 &
fi
- Open question, not a defect: the error text ("already loaded or has a fragment file") means dakota ships its own
gnome-ponytail-daemon.service(projectbluefin/dakotaelements/bluefin/gnome-ponytail-daemon.bst, built with libei). If that unit is active when this step runs, the image's daemon already ownsorg.gnome.Ponytail, the runtime-built no-libei binary started ate2e.yml:1414loses the name and exits, and the wait loop ate2e.yml:1417-1423passes anyway. Tests would then run against the image's daemon, not the one the workflow built. Worth asystemctl --user is-active gnome-ponytail-daemon || trueline before the start so the re-run you plan shows which daemon served the tests.
No findings from: security, intent-alignment, style.
Confidence: 3/5 (needs attention) — 1 medium finding; 1 perspective requested changes
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
The e2e skill doc requires setup to fail when the transient user unit cannot start: a nohup'd daemon in the SSH session is killed by logind when the ControlMaster connection expires, leaving a stale D-Bus owner. Keep the unit rename and let systemd-run failures fail setup again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SnzFs53Qcer1xDySyxv1Vj Signed-off-by: Danathar <berths-purger-0g@icloud.com>
Summary: Since this afternoon's change to how the desktop tests start their screen-reading helper (#1108), every desktop and lifecycle test run on main fails before any test starts. The helper is now started under a fixed system name, and the Dakota image already uses that name. This gives it a name of our own, and keeps the old way of starting it as a fallback. Until it lands, the v1 tag that every image repo tests against has to stay where it is (#1087).
What I need from you: Review and merge it by hand (it edits
e2e.yml).What broke
#1108 replaced
nohup … &withsystemd-run --user --unit=gnome-ponytail-daemon. Onghcr.io/projectbluefin/dakota@sha256:e9918fd7…(dakota:testing), the "Install gnome-ponytail-daemon" step fails with:In run 42124147912 (
manual.ymlon main 39e1c2b, tests at main), smoke-a, smoke-b, smoke-firefox and lifecycle all fail at that step. common-a and common-b pass. Run 42124153048 fails the same way: it uses the samee2e.ymlwith the tests at v1, so it is not a real baseline.Fix
testsuite-ponytail-daemon. That name can't collide with a unit the image ships or has loaded.systemd-runstill refuses, fall back to the previousnohupstart.org.gnome.Ponytailon the session bus is unchanged.Tests
tests/orscripts/pins the old unit name.manual.ymlon main with smoke, common and lifecycle against the same pinned Dakota digest, before v1 is moved.Refs #1087, #1108
🤖 Generated with Claude Code
https://claude.ai/code/session_01SnzFs53Qcer1xDySyxv1Vj