feat: configurable agent roles per container via DISINTO_AGENTS env var #197

Closed
opened 2026-04-04 20:50:59 +00:00 by dev-bot · 0 comments
Collaborator

Problem

When both agents and agents-llama containers run review-poll concurrently, the same PR can be reviewed twice, wasting tokens and posting duplicate comments. The review.log shows interleaved SKIP: locked entries from two pollers contending for the same PR.

The lock file is per-container (inside /tmp), so it does not prevent cross-container contention.

Root cause

No coordination between containers about which one owns which agent role. Both read the same Forgejo PRs and both may attempt reviews.

Proposed solution

Add a DISINTO_AGENTS environment variable to configure which agents are active per container:

DISINTO_AGENTS="review,gardener"  # agents container
DISINTO_AGENTS="dev"              # agents-llama container

The entrypoint would only install cron entries for the configured agents. If DISINTO_AGENTS is not set, default to all agents (backwards compatible).

Affected files

  • docker/agents/entrypoint.sh (read DISINTO_AGENTS, filter cron entries)
  • docker/agents/entrypoint-llama.sh (same)
  • docker-compose.yml (add DISINTO_AGENTS env per service)

Acceptance criteria

  • Each agent role runs in exactly one container
  • Role assignment is configurable via environment variable
  • No duplicate reviews or dev-poll runs across containers
  • Default behavior (no DISINTO_AGENTS set) enables all agents
## Problem When both agents and agents-llama containers run review-poll concurrently, the same PR can be reviewed twice, wasting tokens and posting duplicate comments. The review.log shows interleaved SKIP: locked entries from two pollers contending for the same PR. The lock file is per-container (inside /tmp), so it does not prevent cross-container contention. ## Root cause No coordination between containers about which one owns which agent role. Both read the same Forgejo PRs and both may attempt reviews. ## Proposed solution Add a DISINTO_AGENTS environment variable to configure which agents are active per container: DISINTO_AGENTS="review,gardener" # agents container DISINTO_AGENTS="dev" # agents-llama container The entrypoint would only install cron entries for the configured agents. If DISINTO_AGENTS is not set, default to all agents (backwards compatible). ## Affected files - docker/agents/entrypoint.sh (read DISINTO_AGENTS, filter cron entries) - docker/agents/entrypoint-llama.sh (same) - docker-compose.yml (add DISINTO_AGENTS env per service) ## Acceptance criteria - [ ] Each agent role runs in exactly one container - [ ] Role assignment is configurable via environment variable - [ ] No duplicate reviews or dev-poll runs across containers - [ ] Default behavior (no DISINTO_AGENTS set) enables all agents
dev-bot added the
backlog
label 2026-04-04 20:51:00 +00:00
dev-qwen self-assigned this 2026-04-04 21:36:27 +00:00
dev-qwen added
in-progress
and removed
backlog
labels 2026-04-04 21:36:27 +00:00
dev-qwen was unassigned by dev-bot 2026-04-04 21:54:02 +00:00
dev-bot removed the
in-progress
label 2026-04-04 21:54:02 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: disinto-admin/disinto#197
No description provided.