Skip to content

Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors

Rust

fix(ci): avoid tmpfiles chown on non-root runners

AkitaOnRailsb530c2b65b5d
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4453af79..36d212b6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,8 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Fixed
-- Native packaging CI now supports `systemd-tmpfiles` versions that do not
- provide `--dry-run`, while still operating only inside a temporary alternate
+- Native packaging CI now supports non-root runners whose `systemd-tmpfiles`
+ lacks `--dry-run`, while still operating only inside a temporary alternate
root.
## [0.3.2] - 2026-05-27
diff --git a/scripts/check-native-packaging.sh b/scripts/check-native-packaging.sh
index e114f800..05cf9c3a 100755
--- a/scripts/check-native-packaging.sh
+++ b/scripts/check-native-packaging.sh
@@ -130,10 +130,16 @@ main() {
*"/var/lib/ai-memory"*) ;;
*) fail "tmpfiles dry-run did not plan /var/lib/ai-memory: ${tmpfiles_output}" ;;
esac
- else
+ elif [ "$(id -u)" = "0" ]; then
systemd-tmpfiles --root="${TMP_ROOT}" --create "${TMP_ROOT}/usr/lib/tmpfiles.d/ai-memory.conf" >/dev/null
test -d "${TMP_ROOT}/var/lib/ai-memory" || fail "tmpfiles did not create /var/lib/ai-memory in alternate root"
test "$(stat -c '%a' "${TMP_ROOT}/var/lib/ai-memory")" = "750" || fail "tmpfiles created /var/lib/ai-memory with unexpected mode"
+ else
+ tmpfiles_output="$(systemd-tmpfiles --root="${TMP_ROOT}" --cat-config "${TMP_ROOT}/usr/lib/tmpfiles.d/ai-memory.conf" 2>&1)"
+ case "${tmpfiles_output}" in
+ *"/var/lib/ai-memory"*) ;;
+ *) fail "tmpfiles config parse did not include /var/lib/ai-memory: ${tmpfiles_output}" ;;
+ esac
fi
assert_contains packaging/tmpfiles/ai-memory.conf "d /var/lib/ai-memory 0750 ai-memory ai-memory -"