Skip to content

fix(e2e): keep desktop test controls working - #1108

Merged
Danathar merged 1 commit into
projectbluefin:mainfrom
Karibhou:fix/1059-daemon-lifetime
Nov 5, 2026
Merged

Danathar merged 1 commit into
projectbluefin:mainfrom
Karibhou:fix/1059-daemon-lifetime

Conversation

@Karibhou

@Karibhou Karibhou commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary: Desktop tests can lose the service that sends clicks and keystrokes when their remote connection expires. This change keeps that service running for the duration of the tests, so later checks can still interact with the desktop.


Why

Dakota terminates processes in the SSH session when its ControlMaster expires. The input daemon must run in the user service manager instead. The service sources the desktop session environment before starting; setup fails if the service cannot be submitted rather than silently reverting to the vulnerable SSH session.

The workflow skill documents the lifetime requirement. PR #1037 also touches the workflow and skill file and will need its conflicts resolved when integrating.

Validation

  • Workflow YAML parsed and the rendered daemon installation step passed bash -n.
  • Exercised the extracted SSH startup block with a simulated user service manager: verified the session environment reached the daemon, registration succeeded, and service submission failure stopped setup.
  • ruff check tests/ --select E,F,W --ignore E501 passed.
  • python3 -m pytest tests/unit/ -q: 2602 passed, 4 subtests passed.
  • python3 scripts/validate_docs.py, python3 scripts/generate_skill_index.py --check, and just list-stubs passed.
  • A real Dakota VM smoke run was not available locally; /dev/kvm is absent.

Refs #1059 — the digest-pinned Dakota smoke run and the remaining Power status color image issue still need verification or resolution.

— hive: backend=omp model=openai-codex/gpt-6.1-terra


🐝 Hive Agent: contributor | SHA: 59544ee1

Run the input daemon under the user service manager so it survives SSH session cleanup.

Hive-Run: projectbluefin#1059

Hive-Plan: issue 1059 approved workflow change

Hive-Spec: issue-1059#daemon-lifetime

Assisted-by: openai-codex/gpt-6.1-terra via omp

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Karibhou <Karibhou@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor

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

Review asks:

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.

Your relay session received this as a fix-pr task; your current task is parked (claim kept alive) until this PR is green.

@Karibhou

Karibhou commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Removed the closing keyword from the PR description; #1059 remains referenced as partial work. No code change was needed.


🐝 Hive Agent: contributor | SHA: unknown

@hivecommons-hive

Copy link
Copy Markdown
Contributor
59544ee

⚠️ Sentinel alert — maintainer review required

Hive flagged this PR (author @Karibhou, head 59544ee16663) 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 added the sentinel-alert label. While it is present, Hive will not approve this PR, apply LGTM/approval labels, or merge it through any auto-merge lane. Remove the label once reviewed; Hive will not re-apply it unless new commits are pushed. Tune paths and behaviors under sentinel in hive.yaml or the dashboard Security tab.

@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 moves the small helper that sends clicks and keystrokes to the desktop under test out of the remote login session and into the user's background service manager, so it survives when that login connection expires. I read the change and the surrounding setup step and it does what it says. One low-priority note: the fixed service name chosen here is the same one the upstream project installs, so the day the disk image ships that helper natively, this step would refuse to start.


correctness

  • .github/workflows/e2e.yml:1311 — --unit=gnome-ponytail-daemon claims a fixed unit name. The build at .github/workflows/e2e.yml:1264 passes -Dsystemd_user_unit_dir=/usr/lib/systemd/user, i.e. upstream installs its own user unit. If the image starts shipping the daemon (tracked by PR #618 per the comment at :1248; scripts/guest_preflight.py:67-69 already looks for /usr/libexec/gnome-ponytail-daemon), systemd-run fails with "Unit … already exists" and, under set -e at :1296, aborts setup — no fallback. A name that cannot collide with a packaged unit avoids that:
            systemd-run --user --quiet --collect --unit=e2e-ponytail-daemon \

Verified by reading: \$HOME escaping resolves correctly (runner double-quote → remote single-quote → inner bash -c), source /tmp/session.env inside the unit gives the daemon the Wayland/D-Bus env, and a systemd-run failure stops the step as the PR body states. Not verified: the logind/ControlMaster kill mechanism itself — no VM run was possible here either, as the body notes.

No findings from: security, intent-alignment, style, docs-currency.

Confidence: 5/5 (safe)

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Needs a decision, not a merge:

  • a sentinel alert is open on this PR
  • the PR edits CI workflow / action files: awaiting owner approval — a hive owner / trusted merger's GitHub Approve review on the current head (or a /hive decision approve reply, typed on the PR or from the dashboard) releases the fence and the hive merges it; approval on an earlier head does not count, so re-approve after a push

Head: verdict approved @59544ee, 6/6 checks green, sentinel alert, soak 14m0s of 30m0s.

What to do:

  • a trusted merger approves this head (59544ee) with a GitHub Approve review (or a /hive decision approve reply, typed here or from the dashboard), which releases the CI workflow-file fence, and the hive merges the PR once the other gates clear; approval on an earlier head does not count, and a /hive approve reply does not release the fence.
  • resolve the sentinel alert and have a maintainer clear its label.

Clear the cause and the hive re-evaluates on its next pass; the stage moves to stage/090-ready-for-human-merge, stage/095-pre-merge-soak or the merge queue on its own. Approval does not bypass CI, hold labels or other merge gates.

@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 stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue labels Nov 5, 2026

@Danathar Danathar 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.

Sentinel reviewed (sensitive_path only). e2e.yml now starts gnome-ponytail-daemon under systemd-run --user instead of nohup, so logind no longer kills it when the SSH session closes. This is the fix testsuite#1059 asks for.

@Danathar
Danathar merged commit d870059 into projectbluefin:main Nov 5, 2026
6 checks passed
Danathar added a commit that referenced this pull request Nov 6, 2026
…wn (#1112)

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

#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>

* fix(e2e): drop the nohup fallback for the ponytail daemon

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>

---------

Signed-off-by: Danathar <berths-purger-0g@icloud.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@Karibhou
Karibhou deleted the fix/1059-daemon-lifetime branch November 15, 2026 11:07
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 stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants