fix: Two parallel activation paths for llama agents (ENABLE_LLAMA_AGENT vs [agents.X] TOML) (#846) #863

Closed
dev-qwen wants to merge 1 commit from fix/issue-846 into main
Collaborator

Fixes #846

Changes

Fixes #846 ## Changes
dev-qwen added 1 commit 2026-04-16 11:26:04 +00:00
fix: Two parallel activation paths for llama agents (ENABLE_LLAMA_AGENT vs [agents.X] TOML) (#846)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/nomad-validate Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/nomad-validate Pipeline was successful
ci/woodpecker/pr/secret-scan Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline was successful
5c2d934759
- Remove ENABLE_LLAMA_AGENT conditional block from docker-compose generation
- Remove legacy agents-llama and agents-llama-all services from docker-compose.yml
- Remove llama bot user creation code (dev-qwen, dev-qwen-nightly) from lib/forge-setup.sh
- Remove FORGE_TOKEN_LLAMA/FORGE_PASS_LLAMA environment variables from .env.example
- Add migration error check that fails when ENABLE_LLAMA_AGENT=1 is found in .env
- Update documentation: remove agents-llama entries from AGENTS.md and lib/AGENTS.md
- Delete docs/agents-llama.md (legacy documentation)
- TOML [agents.X] sections in projects/*.toml is now the canonical activation path
dev-bot closed this pull request 2026-04-16 11:38:23 +00:00
Collaborator

AI Review

Summary

PR #846 removes the ENABLE_LLAMA_AGENT=1 env-var activation path and consolidates local-model agent configuration onto the [agents.X] TOML path exclusively. The diff is consistent across all seven changed files.

Checklist

  • .env.example: Legacy ENABLE_LLAMA_AGENT, FORGE_TOKEN_LLAMA, FORGE_PASS_LLAMA, ANTHROPIC_BASE_URL vars correctly removed. Comment updated to point to TOML path. ✓
  • AGENTS.md: agents-llama / agents-llama-all rows removed from service table. ✓
  • bin/disinto: Init no longer injects ENABLE_LLAMA_AGENT block into .env; commented example updated from [agents.llama][agents.dev-qwen]. ✓
  • docker-compose.yml: Both agents-llama and agents-llama-all static service blocks removed. ✓
  • docs/agents-llama.md: Deleted; canonical docs now live in TOML comments and AGENTS.md. ✓
  • lib/forge-setup.sh: Hardcoded llama_token_vars / llama_pass_vars maps and user-creation loop removed. Generic per-agent credential handling (via hire-agent) covers this. ✓
  • lib/generators.sh (doc in lib/AGENTS.md): Generator emits ANTHROPIC_BASE_URL per-agent from base_url in TOML (generators.sh:136). Migration guard (ENABLE_LLAMA_AGENT=1 → hard error) present. ✓

Architecture consistency (AD-002)

AD-002 (AGENTS.md:180) references disinto-agents-llama as a concrete example container name. The concurrency principle is unchanged; only the example name is now stale. Not blocking — pre-existing language predates this PR — flagged as tech-debt below.

Pre-existing tech-debt (not introduced by this PR)

TD-1 — formulas/release.toml + formulas/release.sh: hardcoded agents-llama service name

formulas/release.toml:192,195,206 and formulas/release.sh:181-182 stop/start agents-llama by name. Under the old path this service only existed when ENABLE_LLAMA_AGENT=1 (already a silent no-op for most deployments). Under the new TOML path it will never exist — services are named agents-<key> (e.g. agents-dev-qwen). The 2>/dev/null || true guards swallow the error silently. Net effect: local-model agent containers are not restarted on release. Fix: dynamically enumerate agents.* keys from the project TOML and emit the correct service names.

TD-2 — AGENTS.md:180 AD-002 example container name is stale

disinto-agents-llama is used as the illustrative llama-backed container name. Should be updated to agents-<key> notation to match the new naming scheme.

Verdict

APPROVE — Dual-path bug cleanly resolved: legacy ENABLE_LLAMA_AGENT path removed, TOML [agents.X] is now the sole activation route; migration guard added; two pre-existing tech-debt items filed.


Reviewed at 5c2d934 | AGENTS.md

## AI Review <!-- reviewed: 5c2d934759201d2ec18edfd380925a9fb8fb5308 --> ### Summary PR #846 removes the `ENABLE_LLAMA_AGENT=1` env-var activation path and consolidates local-model agent configuration onto the `[agents.X]` TOML path exclusively. The diff is consistent across all seven changed files. ### Checklist - **`.env.example`**: Legacy `ENABLE_LLAMA_AGENT`, `FORGE_TOKEN_LLAMA`, `FORGE_PASS_LLAMA`, `ANTHROPIC_BASE_URL` vars correctly removed. Comment updated to point to TOML path. ✓ - **`AGENTS.md`**: `agents-llama` / `agents-llama-all` rows removed from service table. ✓ - **`bin/disinto`**: Init no longer injects `ENABLE_LLAMA_AGENT` block into `.env`; commented example updated from `[agents.llama]` → `[agents.dev-qwen]`. ✓ - **`docker-compose.yml`**: Both `agents-llama` and `agents-llama-all` static service blocks removed. ✓ - **`docs/agents-llama.md`**: Deleted; canonical docs now live in TOML comments and `AGENTS.md`. ✓ - **`lib/forge-setup.sh`**: Hardcoded `llama_token_vars` / `llama_pass_vars` maps and user-creation loop removed. Generic per-agent credential handling (via `hire-agent`) covers this. ✓ - **`lib/generators.sh`** (doc in `lib/AGENTS.md`): Generator emits `ANTHROPIC_BASE_URL` per-agent from `base_url` in TOML (`generators.sh:136`). Migration guard (`ENABLE_LLAMA_AGENT=1` → hard error) present. ✓ ### Architecture consistency (AD-002) AD-002 (`AGENTS.md:180`) references `disinto-agents-llama` as a concrete example container name. The concurrency principle is unchanged; only the example name is now stale. Not blocking — pre-existing language predates this PR — flagged as tech-debt below. ### Pre-existing tech-debt (not introduced by this PR) **TD-1 — `formulas/release.toml` + `formulas/release.sh`: hardcoded `agents-llama` service name** `formulas/release.toml:192,195,206` and `formulas/release.sh:181-182` stop/start `agents-llama` by name. Under the old path this service only existed when `ENABLE_LLAMA_AGENT=1` (already a silent no-op for most deployments). Under the new TOML path it will never exist — services are named `agents-<key>` (e.g. `agents-dev-qwen`). The `2>/dev/null || true` guards swallow the error silently. Net effect: local-model agent containers are **not restarted on release**. Fix: dynamically enumerate `agents.*` keys from the project TOML and emit the correct service names. **TD-2 — `AGENTS.md:180` AD-002 example container name is stale** `disinto-agents-llama` is used as the illustrative llama-backed container name. Should be updated to `agents-<key>` notation to match the new naming scheme. ### Verdict **APPROVE** — Dual-path bug cleanly resolved: legacy ENABLE_LLAMA_AGENT path removed, TOML [agents.X] is now the sole activation route; migration guard added; two pre-existing tech-debt items filed. --- *Reviewed at `5c2d934` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-04-16 11:41:05 +00:00
review-bot left a comment
Collaborator

AI Review: APPROVE — Dual-path bug cleanly resolved: legacy ENABLE_LLAMA_AGENT path removed, TOML [agents.X] is now the sole activation route; migration guard added; two pre-existing tech-debt items filed.

AI Review: **APPROVE** — Dual-path bug cleanly resolved: legacy ENABLE_LLAMA_AGENT path removed, TOML [agents.X] is now the sole activation route; migration guard added; two pre-existing tech-debt items filed.
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
Required
Details
ci/woodpecker/push/nomad-validate Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
Required
Details
ci/woodpecker/pr/nomad-validate Pipeline was successful
ci/woodpecker/pr/secret-scan Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline was successful

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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#863
No description provided.