Compare commits

..

1 commit

Author SHA1 Message Date
Claude
802a548783 fix: disinto up silently destroys profile-gated services (#845)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline was successful
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>
2026-04-16 11:22:29 +00:00

View file

@ -102,6 +102,13 @@ _generate_local_model_services() {
# so we key the env-var lookup by forge_user (which hire-agent.sh # so we key the env-var lookup by forge_user (which hire-agent.sh
# writes as the Forgejo username). Apply the same tr 'a-z-' 'A-Z_' # writes as the Forgejo username). Apply the same tr 'a-z-' 'A-Z_'
# convention as hire-agent.sh Gap 1 so the names match. # convention as hire-agent.sh Gap 1 so the names match.
#
# NOTE (#845): the emitted block has NO `profiles:` key. The
# [agents.<name>] TOML entry is already the activation gate —
# its presence is what drives emission here. Profile-gating
# the service caused `disinto up` (without COMPOSE_PROFILES)
# to treat the hired container as an orphan and silently
# remove it via --remove-orphans.
local user_upper local user_upper
user_upper=$(echo "$forge_user" | tr 'a-z-' 'A-Z_') user_upper=$(echo "$forge_user" | tr 'a-z-' 'A-Z_')
cat >> "$temp_file" <<EOF cat >> "$temp_file" <<EOF
@ -155,11 +162,6 @@ _generate_local_model_services() {
condition: service_started condition: service_started
networks: networks:
- disinto-net - disinto-net
# No profiles: the [agents.${service_name}] TOML entry is the activation
# gate — its presence is what drove emission of this block in the first
# place. Profile-gating the service caused 'disinto up' (without
# COMPOSE_PROFILES set) to treat the container as an orphan and remove it,
# silently killing the hired agent (#845).
EOF EOF
has_services=true has_services=true