Skip to content

fix(e2e): start ponytail under a unit name the image cannot already own - #1112

Merged
Danathar merged 2 commits into
mainfrom
fix/ponytail-unit-name
Nov 6, 2026
Merged

Danathar merged 2 commits into
mainfrom
fix/ponytail-unit-name

Conversation

@Danathar

@Danathar Danathar commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

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 … & with systemd-run --user --unit=gnome-ponytail-daemon. On ghcr.io/projectbluefin/dakota@sha256:e9918fd7… (dakota:testing), the "Install gnome-ponytail-daemon" step fails with:

Failed to start transient service unit: Unit gnome-ponytail-daemon.service was already loaded or has a fragment file.

In run 42124147912 (manual.yml on 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 same e2e.yml with the tests at v1, so it is not a real baseline.

Fix

  • Start the daemon as testsuite-ponytail-daemon. That name can't collide with a unit the image ships or has loaded.
  • If systemd-run still refuses, fall back to the previous nohup start.
  • The existing wait for org.gnome.Ponytail on the session bus is unchanged.

Tests

  • Nothing in tests/ or scripts/ pins the old unit name.
  • After this merges, I'll re-run manual.yml on 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

#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>
@hivecommons-hive

hivecommons-hive Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor
d727584

ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blocked

Hive flagged this PR (author @Danathar, head d727584b79fc) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation — a maintainer should confirm the change is intended before it merges.

  • sensitive_path — changes 1 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • .github/workflows/e2e.yml

Hive did not add the sentinel-alert label because this author is trusted. The finding remains recorded for audit and the dashboard Security tab; set sentinel.trusted_authors_block: true to require the blocking label for trusted authors too.

@hivecommons-hive hivecommons-hive Bot added author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 5, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@Danathar this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Failing checks:

  • test / GNOME 50 — lifecycle

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.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 to nohup in 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/dakota elements/bluefin/gnome-ponytail-daemon.bst, built with libei). If that unit is active when this step runs, the image's daemon already owns org.gnome.Ponytail, the runtime-built no-libei binary started at e2e.yml:1414 loses the name and exits, and the wait loop at e2e.yml:1417-1423 passes anyway. Tests would then run against the image's daemon, not the one the workflow built. Worth a systemctl --user is-active gnome-ponytail-daemon || true line 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>
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act labels Nov 6, 2026
@Danathar
Danathar merged commit 8260744 into main Nov 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant