fix: fix: replace cron with while-true loop and gosu in agents entrypoint (#379) #389
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
in-progress
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#389
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-379"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #379
Changes
AI Review
Summary
The core fix — swapping
cronfor awhile trueloop and usinggosuinstead ofsu— is correct and an improvement. Startup functions (configure_git_creds,configure_tea_login,init_state_dir) are well-structured and the privilege-drop approach is sound. However there are two bugs worth fixing before merge.Issues
high
docker/agents/entrypoint.sh:153-180: Multi-project loop missing. The oldinstall_project_crons()explicitly iterated over every TOML inprojects/and created a separate cron entry per project. The new code passes a raw glob as a single argument:Both
review-poll.shanddev-poll.shonly consume$1— all other TOML paths are silently dropped. With three example project configs inprojects/(disinto, harb, versi), only the first shell-sorted match is ever polled. Fix: wrap the poll invocations in afor toml in ...loop, the same way the old cron installer did.low
docker/agents/entrypoint.sh:156-169: Stagger logic is a no-op.review_timeanddev_timeare computed as elapsed seconds since container start (e.g.300,420), then compared againstnowwhich is a Unix epoch timestamp (~1.7 billion). The condition is always true, so the intended 2-minute dev offset never takes effect. In a synchronous loop the sequential execution already naturally offsets the two agents, but the variables, comment, and log lines are misleading dead weight.trivial
docker/agents/entrypoint.sh:130: Header comment says24 iterations * 5 minfor the gardener interval; the code correctly uses 72 iterations (72 × 300 s = 21 600 s = 6 h). Update the comment to match.Verdict
REQUEST_CHANGES — Multi-project support regressed: new entrypoint drops the per-TOML loop, so only the first project TOML is ever polled
Reviewed at
c4e0ea6| AGENTS.mdAI Review: REQUEST_CHANGES — Multi-project support regressed: new entrypoint drops the per-TOML loop, so only the first project TOML is ever polled
c4e0ea66ddto47b07665cfView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.