You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: CI installs pullgate as the README says and runs a full loop under the real units #27
v0.1.0 passed CI and then failed in its first real install in two ways (#19, #20). The end-to-end test (test/e2e/e2e_test.go) runs root and the listener as the same user, outside systemd, so it never crossed the two lines where the bugs were: the user boundary between root and pullgate, and the unit sandbox (RestrictSUIDSGID, CapabilityBoundingSet). The unit check (systemd-analyze verify) does not treat a missing [Install] as an error, and nothing ran the README commands as written. v0.1.1 added "first run under the units" (#21); this issue makes that the whole path a user takes.
Proposal
A CI job on the GitHub runner (it has systemd and root through sudo) that does the README install as written and one full loop:
Build the binary; install it as install.sh would (or run install.sh against a local fake release, as its tests do).
Run the README "Install" commands taken from README.md itself (for example between marker comments), not a copy in the workflow, so the README cannot drift from what CI tests: the users, the directories, the units, systemctl enable --now ….
A local bare repo as the remote (over ssh:// to a local sshd, or file:// if the config allows it for tests), a fake Telegram server (the one from the tests) as the listener's API URL.
Push a commit → the run asks → the fake server taps Apply → the apply runs under pullgate-apply@ → pullgate status shows it applied.
Push a commit whose apply fails → rollback, and the notice reaches the fake server.
systemctl is-enabled for every unit the README enables; restart the listener and check it comes back.
After a release: the same job runs once against the published release with install.sh --version X.Y.Z (a separate workflow on release: published), so the shipped artefacts are tested too.
Done when
A CI job runs steps 1–6 on each PR and on main, with root and the listener as different users, under the real units from contrib/systemd/.
The README install commands come from README.md (a test fails if the README block changes and the job does not run it).
The job fails if any message that root writes cannot be read by the listener, or if any README-enabled unit is not enabled.
A workflow on release: published runs the install from the release itself.
Done in #40 (squash commit cc21e75). Evidence for each box:
CI job, steps 1–6, root and listener as different users, real units. Job install-loop ("README install and a full loop under the units") in .github/workflows/ci.yml, on each pull request and on main. It runs test/units/full-loop.sh: README install, a good commit (run asks with check and summary as the check user → fake Telegram taps Apply → listener as user pullgate writes the approval → pullgate-apply@ applies → pullgate status shows it), a listener restart, a failing commit (rollback, and the notice reaches the fake Telegram). Green on test: CI installs pullgate as the README says and runs a full loop under the real units #40.
README commands come from README.md. The install blocks are marked <!-- install-test:binary|setup|start -->; full-loop.sh runs them as written. test/units/readme-block.sh --check (in job example units) fails when a block is missing or an install command is in an unmarked block.
Fails on a message the listener cannot read, or a unit not enabled. After each loop: the outbox must be empty, the listener must log no WARN/ERROR (and must have log lines), and no "could not be read" notice. Step 8: systemctl is-enabled and is-active for every unit of the README start block.
Workflow on release: published..github/workflows/install-release.yml: installs the release with the tag's own install.sh --version X.Y.Z, then full-loop.sh --installed X.Y.Z. Also called by release.yml after publish (a release published with GITHUB_TOKEN starts no release event), and by hand.
DESIGN.md section 14 describes the job and the workflow.
Reviews: security review and a correctness review on the diff; fixed a timer race, the version check, and a wider README check.
Activity
groupsky commentedon Nov 17, 2026
Done in #40 (squash commit cc21e75). Evidence for each box:
install-loop("README install and a full loop under the units") in.github/workflows/ci.yml, on each pull request and onmain. It runstest/units/full-loop.sh: README install, a good commit (run asks with check and summary as the check user → fake Telegram taps Apply → listener as userpullgatewrites the approval →pullgate-apply@applies →pullgate statusshows it), a listener restart, a failing commit (rollback, and the notice reaches the fake Telegram). Green on test: CI installs pullgate as the README says and runs a full loop under the real units #40.<!-- install-test:binary|setup|start -->;full-loop.shruns them as written.test/units/readme-block.sh --check(in jobexample units) fails when a block is missing or an install command is in an unmarked block.systemctl is-enabledandis-activefor every unit of the READMEstartblock.release: published..github/workflows/install-release.yml: installs the release with the tag's owninstall.sh --version X.Y.Z, thenfull-loop.sh --installed X.Y.Z. Also called byrelease.ymlafter publish (a release published withGITHUB_TOKENstarts noreleaseevent), and by hand.Reviews: security review and a correctness review on the diff; fixed a timer race, the version check, and a wider README check.