poll-ci v1.4.0
What's changed in v1.4.0
A reliability and hardening release, driven by an audit of poll-ci's production
status output on a busy watched repo plus a full code review.
Fixes
- Status posts retry on transient failures. A single dropped POST (network
blip, GitHub 5xx) left that contextpendingforever — observed in
production on a green, already-promoted commit. Posts now retry with backoff
and honorRetry-After; permanent failures (token permissions) still
surface immediately. - A still-running check can no longer be scored as passed.
docker start -areturning is no guarantee the container exited, and a running
container's inspect reports exit code 0. The outcome now comes from the
container state (plusdocker wait), so a broken attach stream can't
produce a false green that promotes untested code. - Crash/restart reconciliation. Runs persist an in-flight marker; on
startup, statuses strandedpendingby a mid-run kill (watchtower recreate,
reboot, OOM) are resolved asinterrupted by restartwhen the branch has
moved on. The startup sweep also removes containers and checkouts the dead
process orphaned (instance-scoped label; prune pre-v1.4 orphans once with
docker ps -aq -f label=poll-ci | xargs docker rm -f). - Short-circuit race fixed. A run that completed every step keeps its
results (and promotes) even if a newer tip's cancellation raced in at the
very end. - Force-push reverts re-run. Superseded SHAs are no longer marked
processed, so a branch force-pushed back to one re-tests it instead of
showing stalesuperseded bystatuses forever. - Heartbeat:
HEARTBEAT_MAX_LAGdefaults to0— with1, a failed
promotion affecting only the tip commit never alerted. The no-jq fallback
also extracted the wrong sha from the compare payload; fixed. Existing
installs keep their env file: setHEARTBEAT_MAX_LAG=0there to adopt the
new default. - Polish: invalid env values warn instead of being silently ignored,
scan.pathrejects.., and open-PR listing paginates past 100.
Security / hardening
- The git auth header is passed via environment (
GIT_CONFIG_*) instead of
argv, so it is no longer visible in process listings; log scrubbing also
redacts the base64 header form. Plain-binary deployments need git >= 2.31. - Optional resource limits for check/scan containers:
CHECK_MEMORY,
CHECK_CPUS,CHECK_PIDS. - Engine image base bumped to alpine:3.24 with
apk upgradeat build time.
Opt-in features (defaults preserve existing behavior)
MARK_SKIPPED=true— post a terminalcistatus (not tested — superseded by <sha>) on the intermediate commits a fast push skipped.CONCURRENCY=N— sweep multiple repos in parallel.IMAGE_REFRESH_HOURS=N— periodically re-pull present check images so
:latesttags don't freeze at first pull.- PR runs now short-circuit on force-push like branch runs do (under the
existingSHORT_CIRCUIT).
The state file migrates transparently from older versions, and is now pruned
after ~6 months (a branch's last result is always kept).
Install
docker pull ghcr.io/extremeshok/poll-ci:v1.4.0 # or :latest
go install github.com/extremeshok/poll-ci@v1.4.0Prebuilt binaries below (verify with poll-ci_v1.4.0_checksums.txt).