fix(cli): keepiq ssh-agent stays in the foreground under systemd - #1144
Merged
Merged
Conversation
Under systemd the agent's stdout is the journal, not a terminal, so it took the eval path (#1022): it started a background copy and its main process exited 0. systemd then stopped the unit and killed the copy with the cgroup, so the README's service never kept running. Found by the macOS CI lane (#1142). --foreground keeps the agent in the process systemd started; the README unit uses it. The detach decision is now shouldDetach(), pinned by a test.
Contributor
Quality Report — ConductionNL/keepiq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| test-l10n | ✅ | ||||
| format | ✅ | ||||
| check-l10n-js | ✅ | ||||
| check-schema-l10n | ✅ | ||||
| composer | ✅ | ✅ 114/114 | |||
| npm | ✅ | ✅ 660/660 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ✅ | ||||
| lockfile sync | ✅ | ||||
| PHPUnit | ⏭️ not run for this diff — no file in this diff matches the code globs, and none carries a source extension — the heavy tier has nothing to decide about it. | ||||
| Newman | ❌ | ||||
| Playwright | ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development. |
||||
| Hydra gates | ✅ |
Quality workflow — 2026-10-04 14:42 UTC
Download the full PDF report from the workflow artifacts.
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.
The systemd user unit in
cli/README.mdnever kept the agent running. Under systemd, stdout is the journal rather than a terminal, sokeepiq ssh-agenttook theevalpath from #1022: it started a background copy and its own process exited 0. systemd then stopped the unit and killed that copy along with the rest of its cgroup. launchd was not affected, because it gives the agent /dev/null, which counts as a terminal for this check. Lane K found this while building the macOS job (#1142).--foregroundkeeps the agent in the process the service manager started. The README unit now uses it, and the option is documented.shouldDetach(), pinned byTestTheAgentDetachesOnlyForEvalNotUnderAServiceManager, which did not build before the fix.go vetandgo test ./...pass in cli/ (golang:1.25) and gofmt is clean.--foreground, the main process exited 0 and the agent detached.Not run under a real systemd.