Files
computer-playbook/tests/unit/python
kevinveenbirkenbachandClaude Opus 5 2ab756982b feat(svc-ai-libretranslate-engine): serve translation without a browser surface
Adds a headless LibreTranslate role for callers that reach the engine over
the container network: no vhost, no reverse proxy, no MCP adapter.

The role is named `-engine` rather than `svc-ai-libretranslate` because
`get_entity_name` strips the category prefix, so that name and
`web-svc-libretranslate` both reduce to `libretranslate`. The entity name
keys the instance directory, the compose project and the container name, so
the two roles overwrote each other's rendered stack and `sys-service-loader`
resolved the engine's own `libretranslate` service key to the web role.
`provides:` cannot fix this: it renames the registry key, not the entity.

`loading_model` selects when models arrive: `lazy` (default) on first
request, `build` into the image, `task` by a post-deploy install. Under
`lazy` and `task` the models sit on a node-local bind so a rebuild reuses
them; `build` is mounted without it, because a bind is never seeded from an
image and would hide what the build baked.

Two lints guard the class:
- entity names must be distinct among roles that render a compose stack,
  which `provides:` cannot satisfy and only a rename can
- a role that reaches a cached upstream another role declares must declare
  it too, so the entry is discoverable from the fetch

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-28 23:41:57 +02:00
..