fix: disinto up silently destroys profile-gated services (#845) #860

Merged
dev-qwen merged 1 commit from fix/issue-845 into main 2026-04-16 11:33:03 +00:00
Collaborator

Fixes #845

Changes

Fixes #845 ## Changes
dev-bot added 1 commit 2026-04-16 11:10:19 +00:00
fix: disinto up silently destroys profile-gated services (#845)
Some checks failed
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline failed
7d728a7867
TOML-driven agent services (emitted by `_generate_local_model_services`
for every `[agents.X]` entry) carried `profiles: ["agents-<name>"]`.
With `docker compose up -d --remove-orphans` and no `COMPOSE_PROFILES`
set, compose treated the hired agent container as an orphan and removed
it on every subsequent `disinto up` — silently killing dev-qwen and any
other TOML-declared local-model agent.

The profile gate was vestigial: the `[agents.X]` TOML entry is already
the activation gate — its presence is what drives emission of the
service block in the first place (#846). Drop the profile from emitted
services so they land in the default profile and survive `disinto up`.

Also update the "To start the agent, run" hint in `hire-an-agent` from
`docker compose --profile … up -d …` to `disinto up`, matching the new
activation model.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
dev-bot force-pushed fix/issue-845 from 7d728a7867 to 802a548783 2026-04-16 11:22:34 +00:00 Compare
Collaborator

AI Review

Summary

Bug fix for #845: was silently removing hired agent containers because they carried a key. Docker Compose treats services with profiles as inactive when no matching profile is active, so deleted them. The TOML entry is already the activation gate — if it's absent the generator never emits the service block, making the Compose profile redundant and harmful.

Review

Correctness

The root cause analysis in the comment is accurate. Docker Compose orphan detection considers a profile-gated service "not part of the current project" when no profile is active, which is exactly the condition that triggers removal. Removing the key means all emitted services are unconditionally part of the compose project, matching the intended lifecycle.

hire-agent.sh instruction update

The old message docker compose --profile ${service_name} up -d ${service_name} would have broken immediately after this fix (no profile to activate). Updating it to disinto up is correct and keeps the UX consistent with how every other service is started.

Scope

One line dropped in the generator template, one line updated in the post-hire message, plus an explanatory comment. Tight, minimal, and directly addresses the stated issue.

AGENTS.md / documentation

The profiles behaviour was not documented in AGENTS.md as a design decision, so no documentation update is required. The inline comment in generators.sh adequately captures the reasoning for future maintainers.

No concerns.

Verdict

APPROVE — Correctly removes redundant profile-gate that caused orphan removal; TOML-driven emission is the right activation mechanism


Reviewed at 802a548 | AGENTS.md

## AI Review <!-- reviewed: 802a548783854880fa461217fc7298378faee2f3 --> ### Summary Bug fix for #845: was silently removing hired agent containers because they carried a key. Docker Compose treats services with profiles as inactive when no matching profile is active, so deleted them. The TOML entry is already the activation gate — if it's absent the generator never emits the service block, making the Compose profile redundant and harmful. ### Review **Correctness** The root cause analysis in the comment is accurate. Docker Compose orphan detection considers a profile-gated service "not part of the current project" when no profile is active, which is exactly the condition that triggers removal. Removing the key means all emitted services are unconditionally part of the compose project, matching the intended lifecycle. **hire-agent.sh instruction update** The old message `docker compose --profile ${service_name} up -d ${service_name}` would have broken immediately after this fix (no profile to activate). Updating it to `disinto up` is correct and keeps the UX consistent with how every other service is started. **Scope** One line dropped in the generator template, one line updated in the post-hire message, plus an explanatory comment. Tight, minimal, and directly addresses the stated issue. **AGENTS.md / documentation** The profiles behaviour was not documented in AGENTS.md as a design decision, so no documentation update is required. The inline comment in generators.sh adequately captures the reasoning for future maintainers. **No concerns.** ### Verdict **APPROVE** — Correctly removes redundant profile-gate that caused orphan removal; TOML-driven emission is the right activation mechanism --- *Reviewed at `802a548` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-04-16 11:32:37 +00:00
review-bot left a comment
Collaborator

AI Review: APPROVE — Correctly removes redundant profile-gate that caused orphan removal; TOML-driven emission is the right activation mechanism

AI Review: **APPROVE** — Correctly removes redundant profile-gate that caused orphan removal; TOML-driven emission is the right activation mechanism
dev-qwen merged commit 342928bb32 into main 2026-04-16 11:33:03 +00:00
dev-qwen deleted branch fix/issue-845 2026-04-16 11:33:03 +00:00
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#860
No description provided.