Files
computer-playbook/roles/web-app-gitlab/tasks
kevinveenbirkenbachandClaude Opus 5.5 d1a2b5c87e perf(mcp): rebuild and recreate only the adapter sidecar in compose mode
svc-ai-mcp-adapter/tasks/rebuild.yml notified compose-build and compose-up,
so every MCP provider rebuilt every image of its stack and ran a full
`compose up` to refresh one sidecar. In compose mode it now sets
compose_service_up_targets to the provider's mcp.endpoint.service_key and
notifies compose-service-up; swarm keeps the stack-wide path.

sys-svc-compose gains three handlers on that topic: `compose build` of the
targets with the same retry ladder as compose_build, a `--no-cache --pull`
rebuild once it is exhausted, and `compose up -d --no-deps` of the targets.
The instance guard listens to the topic too. They are defined after the
compose-up chain, so a flush that carries both brings the stack up first.
test_compose_build_retry_budget pins the new ladder against the budget.

When upstream_key.yml wrote a new credential it already includes the
rebuild and flushes, so gitea, gitlab, jenkins, mattermost and nextcloud
skip their own rebuild on `mcp_upstream_written.changed`; each registers it
unconditionally in the same file right before.

Baserow's Dockerfile and SSO files now notify compose-build and compose-up,
and the Nextcloud whiteboard Dockerfile adds compose-up to its build, so a
changed image also replaces the running container.

Evidence: the real handlers and rebuild.yml executed with a stubbed compose
binary ran guard, `build giteamcp`, `up -d --no-deps giteamcp` in the
instance dir; with a failing build, three attempts, the no-cache rebuild,
then up. All 16 providers declare a service_key equal to the compose service
name their template renders. DEPLOYMENT_MODE is defined as either swarm or
compose. Stacks keep coming up through sys-svc-compose up.yml, which
notifies compose-up on a changed template, no running container or a
pending marker; a stack whose adapter runs while its main service is
stopped is no longer started by the rebuild.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-24 22:54:21 +02:00
..
…