Commit Graph
1016 Commits
Author SHA1 Message Date
kevinveenbirkenbachandClaude Opus 5 f2fedfc677 Merge branch 'main' into feature/store-i18n
Fourteen real conflicts plus the 66 generated READMEs.

utils/cache/files.py and its test: both sides added a skip-dir rule, resolved
as a union so the root `build/` prune and the per-root walk key coexist.

plugins/lookup/database.py and postgres_libraries.py: main's added lookups kept,
with get_entity_name renamed to entity_name as this branch renamed it.

roles/web-app-{mailu,matrix}/meta/services.yml: main's `covers: [email]` and its
MAIL_PROVIDER-gated email entry, plus this branch's gitlab/jira/n8n/jitsi
consumers, which the merge base carried on neither side.

group_vars/all/17_resource.yml: this branch's lookup('resource', ...) refactor;
main's single added literal is already covered by _POSTGRES_MAX_LOCKS_PER_TRANSACTION.

docs/requirements/035-mcp-proxy-expansion.md: this branch moved the design into
ADR 0003, so the requirement keeps only the user story and the criteria. Main's
delta inside the moved block was two new roles, carried into the ADR audit:
web-app-stalwart as adapter_candidate, svc-net-tor-smtp as privileged_control_plane.
The no_surface total said 99 while its own subcategories summed to 112.

inventories/development/default.yml: biber keeps no explicit email. Both sides fixed
the same CI failure; this branch fixed it in _apply_account_defaults, which renders
biber@{{ DOMAIN_PRIMARY }} (utils/cache/users/__init__.py:68) — byte-identical to
the address main hardcoded, so the inventory line is a second copy of one fact.

roles/web-app-{gitlab,keycloak}/files/playwright/playwright.spec.js and
roles/web-app-gitlab/templates/playwright.env.j2: union of both import sets, with
requireDotenvValue kept over decodeDotenvQuotedValue for CANONICAL_DOMAIN because
an empty value must fail rather than match every substring.

The 66 role READMEs take this side: aceb5295ef moved Cosmos, Quick Setup and
Credits to the documentation build, and test_readme.py now rejects them in a
committed README. Main's prose edits inside them are carried over by hand (the
Mailu deprecation banner, Mailu -> Stalwart in erpnext and zammad), and the two
READMEs main added fresh are stripped of the three generated sections.
roles/web-app-sphinx/README.md stays deleted; 6eb9a59d14 merged that role into
web-app-docs. The root README's generated role table was regenerated from the
merged metadata.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-04 01:57:17 +02:00
kevinveenbirkenbachandClaude Opus 5 1138acf441 docs(exceptions): say how the matomo site id ends up empty
The entry described what an empty matomo_site_id causes and left unsaid how it gets that way, which 7309d50575 had meanwhile made non-obvious: resolve_site.yml starts from an empty id, skips the lookup entirely when no token resolved, and only enters the registration block when the answer is a 200 that is not a mapping, because a Matomo error arrives as a JSON object rather than the expected list.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-03 22:59:15 +02:00
kevinveenbirkenbachandClaude Opus 5 0d2fadce0c feat(cache): serve every checkout's own cache declarations
A checkout that declared a new cache host rendered the artefacts and reached nothing: the Nexus proxy repository, the frontend's leaf certificate and the nginx upstream map all live in the running stack, which only the owning checkout set up. cache-apply installs all three and reloads the frontend, and compose up runs it for a checkout that merely joins the network, so the manual call is left for a declaration changed between two bring-ups.

The map source is no longer selectable. INFINITO_CACHE_CONF_SOURCE existed to let a worktree read the primary checkout's map instead of its own, but the frontend mounts one map and the install replaces it, so the checkout that applied last wins either way: the knob chose which file to point at, never who prevailed. Dropping it also retires the git subprocess that resolved the owning checkout on every env build.

Two checkouts sharing a stack therefore overwrite each other's map, which the documentation now states instead of implying a selector could prevent it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-03 21:40:34 +02:00
kevinveenbirkenbachandClaude Opus 5 d937f23863 feat(web-app-discourse): render mermaid fences as diagrams
Discourse ships no mermaid plugin: the repository that name suggests does not exist, the one third-party plugin carrying it is archived, and the maintained artefact is discourse/discourse-mermaid-theme-component. A theme component installs through RemoteTheme.import_theme rather than a clone into the plugins directory, which the addon contract had no word for, so mechanism gains the value theme and the launcher config only clones addons whose mechanism is plugin.

The component is imported idempotently by remote_url, enabled, and attached as a child of the default theme; the task reads all four properties back and fails when one is missing, because a component that is installed but unattached leaves a fence rendering as plain source.

Unlike the neighbouring addons this one is pinned off in variant 1 instead of carrying the addons-variant-pinning waiver: their reason is that a plugin compiled into the image costs nothing to disable, which does not hold for an install step that runs after the deploy.

The Playwright spec publishes a topic through the session API and asserts the rendered result. It polls the text content of the post's SVGs rather than inspecting <text> nodes: current mermaid places labels in foreignObject HTML, and SVG nodes expose no innerText, so both narrower reads come back empty on a diagram that rendered correctly.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-03 21:12:11 +02:00
kevinveenbirkenbachandClaude Opus 5.5 42bdf4321f docs(roles): stop testing deprecated roles
lifecycle.md said a deprecated role is still covered by the test suite while the tested envelope already left it out. A deprecated role is now untested: the matrix-deploy MUST NOT exercise it and a failure in it MUST NOT block a release, while planned, pre-alpha and eol stay open to best-effort runs. The complexity legend says untested too.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-03 21:11:51 +02:00
kevinveenbirkenbachandClaude Opus 5.5 80082553c7 docs(roles): point the allowed lifecycle values at lifecycle.md
layout.md listed six of the nine lifecycle stages the layout lint accepts and left out rc, maintenance and eol. It now defers to the stages in lifecycle.md, which already define every value, deprecated included, with its criteria.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-03 21:11:50 +02:00
kevinveenbirkenbachandClaude Opus 5 ffd82294fc feat(translate): serve translation through one gateway with memory and a glossary
Requirement 040. web-svc-translate fronts the translation engines so a consumer talks to one endpoint instead of binding an engine. Its router picks per request and drops an engine after three consecutive failures until it recovers, and the strategy follows the deployment rather than a constant: with the S1 decider present it ranks by system-one judgement, otherwise by fixed preference.

Protected glossary terms travel into the engine instead of being checked afterwards, and an answer that mangles one is refused before it reaches the cache. Weblate supplies the translation memory and the glossary, and reads its admin API token out of the running instance into the token store rather than minting a second one.

svc-ai-ltengine builds LTEngine from source as a local engine. Discourse and WordPress consume the gateway as addons under the unified contract, each deriving its enabled flag from the service flag and shipping its own Playwright spec.

The decider moves out of svc-ai-litellm into roles/svc-ai-s1/files/python/infinito_decider so the gateway and the model router share one audited copy; litellm stages and mounts it with the same play that renders the hook importing it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-03 20:45:39 +02:00
kevinveenbirkenbachandClaude Opus 5.5 b1311c8f87 test(ci): pin every release tag to the subject the push workflow recognises
entry-push-latest.yml lets a push to main cancel the running pipeline only when its head commit starts with the release subject pkgmgr writes. The new integration test reads that prefix from the workflow and the tag schema from scripts/github/resolve/release/tag.sh, then requires every release tag from v13.0.0 on to sit on "Release version X.Y.Z". Six tags between v10.1.0 and v11.6.0 carry "Release X.Y.Z", so the check starts at the first tag of the uniform run.

call-test.yml now checks out with full history and tags, the pair detect-release already relies on; a depth-1 checkout carries no tags and would skip the test. Forks and tagless clones skip it on purpose.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-03 19:57:30 +02:00
kevinveenbirkenbachandClaude Opus 5.5 9281a17195 ci(push): let a release push on main supersede the running run and deploy every chunk
A push to main whose head commit starts with "Release version " (the subject pkgmgr writes for every release) now cancels the main run in progress, so the release starts at once instead of queueing behind it. Every other push to main still leaves the running pipeline alone.

When the pushed main commit carries a vX.Y.Z tag, the orchestrator runs with chunk_gate false: every chunk deploys and reports, and a failed chunk still turns the run red, so release-guard and release-version stay skipped.

entry-cancel-superseded.yml mirrors the new rule behind its push guard, parenthesised so && does not bind the release clause; the mirror test composes the expected rule the same way.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-03 19:57:30 +02:00
kevinveenbirkenbachandClaude Opus 5 a05071fe78 refactor(roles): let a role declare its entity name and drop the get_ prefix
The entity name keys a role's instance directory, its compose project and its container name, and was derived only by stripping the longest matching category prefix. Two roles under different categories whose names share a suffix therefore collapse onto one entity and overwrite each other's rendered stack, which no provides: can repair.

A literal entity_name in vars/main.yml now wins over the derivation. web-app-seaweedfs-console takes its shorter name back and declares the entity seaweedfs-console, which frees the seaweedfs key in its own services map for the engine consumer and removes the provides:, covers: and alias entries that stood in for it. A new lint pairs the declaration with the primary key it has to match, because a drift between them would drop the role from the provider set in silence.

Compared across all 288 roles, exactly one entity changes, and it restores what main already keeps on disk, so no instance directory moves.

The function and the filter lose their get_ prefix. Two lints read that prefix as the discriminator between the variable and the filter that fills it; both discriminate on the pipe now. Ansible's templar resolves a filter and a same-named variable independently, verified against ansible-core 2.20.2.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-03 19:40:53 +02:00
kevinveenbirkenbachandClaude Opus 5 3c7247a175 docs(requirements): specify the translation gateway
One translation endpoint that picks the engine itself, remembers which engine
won earlier comparisons, and accepts a reviewed human override, so an
application translates through a single configured URL instead of being tuned
per application.

Five parts: the gateway role, an LTEngine backend, a Weblate role for the
translation memory and the override, the engine decision with its learning log
and cache, and the per-application consumer integration as addons under the
req-026 contract.

Two constraints are written down because they decide the design rather than
follow from it. The decision mechanism is not new work: svc-ai-litellm already
implements Sampler, History, wins(), judge_answers() and _compare() for model
routing, and this requirement lifts that by extraction, not by a second copy
that becomes a second thing to fix. And Ollama and LTEngine both pull models
and reserve memory, so the variant resource budget keeps the heavy backends out
of a shared variant.

The boundary against 037 and 039 is stated in both directions: 037 translates
this project's own catalogs at build time by calling the engine directly and
keeps doing so, 039 wires the project's surfaces onto those catalogs, and 040
translates user content at request time. Build time versus request time, so
neither requirement is used to fix a defect belonging to the other.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-03 04:32:57 +02:00
kevinveenbirkenbachandClaude Opus 5 b83ab8e596 feat(variants): pin a partner's variant, and provision the OpenProject GitLab addon
Two concerns, staged together on request.

Variant pins
------------
A matrix round hands every role the round index and clamps to variant 0 when
the role has fewer entries, so a cross-role pairing holds only while two
independently maintained variant lists agree on an index, and it breaks
silently once the partner runs out of variants.

'# variant-pin: <role>#<index|reciprocal>' above a service entry states the
dependency instead of inheriting it. It is a comment, so it never reaches the
merged services map or host_vars the way a YAML key under the service would.
'#reciprocal' resolves to the partner's variant that switches this role back
on, so neither side tracks the other's index. Two roles pinning one partner to
different variants raises VariantPinConflictError before an inventory is
written.

web-app-openproject is the first user: a fourth variant carries the nextcloud
round, pinned reciprocally. The fourth round exists because folding it into
variant 2 next to gitlab was measured at 35.58 GB against the 32 GB
reservation cap, and it has to be the last round because a role with fewer
variants falls back to variant 0 in a later one.

Measured: the pin changes no role's index in any of the 14 rounds today, so
the mechanism sits in the deploy path without moving a single inventory.

OpenProject addons
------------------
c83c00da7d gave the role meta/addons/ and three task hooks, but the role never
included tasks/addons/ at all, so all three hooks were dead files. 05_addons.yml
now resolves the web host and container id and runs the hook of every addon
whose gate resolves true.

gitlab_integration is provisioned: a bot account, its API token and the plugin
setting carrying gitlab_user_id and webhook_secret. The GitLab-side webhook is
not created here and the hook prints the URL to register it against.

storages keeps an empty hook deliberately. web-app-nextcloud owns both halves
of that integration and runs eleven positions later in the deploy order, so at
this hook's dispatch point the storage it would touch does not exist yet.
openid_connect stays off: OIDC is Enterprise-gated at this version.

Probing the pinned openproject/openproject:17 image corrected two defects
before they could ship: the API token was minted without the name the script
fetched but never used, and the Playwright webhook probe omitted the
X-Gitlab-Event header that HookHandler dereferences before any auth check, so
the smoke request answered 500 where the spec demanded less than 500.

The addon specs now assert the integration rather than the route: storages
requires a registered storage addressing the partner Nextcloud, and
gitlab_integration requires the bot account the webhook authenticates as.

Deploying this needs a regenerated inventory: gitlab-web-app-openproject is a
new user key and users_generator pins it at inventory build time.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-03 04:30:30 +02:00
kevinveenbirkenbachandClaude Opus 5 9280782fc5 test(lint): require an addon to resolve against a declared service key
An addon reaches a role's settings through
lookup('config', '<role>', 'services.<key>…'), and meta/services.yml of that
role is the only place <key> comes into existence. Nothing checked that it
does. A two-term path is strict, so utils/roles/applications/config.py:88
raises AppConfigKeyError mid-deploy; a path carrying a default returns that
default instead and leaves the addon off in every run.

test_addon_enabled_no_group_names.py already prescribes the call shape and
test_addon_bridges_resolve.py already resolves the bridges: field. The
resolution check for the shape those two assume was missing, which is how
c83c00da7d could move twenty roles onto service keys and leave
web-app-gitlab's five undeclared without anything going red.

The scan covers meta/addons/*.yml and tasks/addons/*.yml, reads each file as
one text so a lookup split across lines still matches, and accepts either a
quoted role name or application_id, which resolves to the role owning the
file. A second test requires every addon file containing 'services. to have
produced at least one match, so a drifted pattern or an unknown role form
fails loudly instead of passing vacuously.

107 references resolve today; the rule is green on arrival.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-03 01:50:40 +02:00
kevinveenbirkenbachandClaude Opus 5 24d0308995 feat(variants): give clearnet-only services a round of their own
services.tor is a consumer flag, not a capability: every role declares the same
"{{ 'svc-net-tor' in group_names }}" and joins the onion wherever svc-net-tor is
deployed. Only five roles pin it to a literal false, because onion routing
breaks real-time media transport: bigbluebutton, jitsi, opentalk, peertube and
coturn.

Seven matrix-deploy rounds dropped the onion for one of those five and took
everything else down with them. The services that rode along are onion-capable
and were therefore proven from a clearnet origin only, for no reason of their
own. Each round now carries either the media service or the rest, not both:

* wordpress: variant 2 carries bigbluebutton and peertube, variant 1 keeps
  multisite and listmonk over the onion
* mediawiki: libretranslate moves to variant 2, leaving variant 1 to peertube;
  litellm leaves variant 2, which would otherwise sit 1.7 GB over the cap
* moodle: variant 3 carries bigbluebutton and jitsi, variant 1 gets its four
  partners and SSO back with the onion on
* discourse: variant 2 carries bigbluebutton and jitsi, variant 1 keeps the
  mastodon, matrix and mattermost couplings over the onion
* nextcloud: variant 11 drops SSO, which bbb.spec.js never gated on, mirroring
  the peertube round that already runs without it

Two rounds keep a marker because the collateral is not removable. matrix cannot
host either hookshot partner in an onion round: measured at 66 GB with n8n and
81 GB with gitlab against the 64 GB cap. mattermost pins services.javascript to
a literal true that no variant may override, and every addon spec gates on
skipUnlessServiceEnabled("sso").

Two lints hold the line from here. test_variant_tor_off_needs_a_reason rejects a
round that drops the onion without an incapable service in it, and its only
escape is a data change; it found web-app-opencloud, now fixed.
test_variant_tor_collateral rejects a round that takes an onion-capable frontend
down with it, and its marker sits on the variant's own tor pin because the
reason is one fact about the round rather than one per partner.

Splitting discourse also brought variant 1 from over the cap to 59.36 GB, so its
mem-limit-budget exemption is deleted and the cap guards the round again.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-03 00:34:06 +02:00
kevinveenbirkenbachandClaude Opus 5 e51a98648d refactor(tests): exempt a variant from the mem_limit cap where the variant is
web-app-discourse's variant 1 turns bigbluebutton, jitsi, mastodon, matrix and
mattermost on, and that round reaches web-app-matrix, whose own variant 1 pins
gitlab true. The footprint therefore transitively bills gitlab's webservice,
migrations and gitaly - about 10 GB of mem_limit discourse never asks for - and
test_no_variant_exceeds_the_memory_budget reports 65.36 GB against a 64 GB cap.
54 placements were measured; none keeps every variant under it, and the best
alternative only moves the overage to web-app-nextcloud v12 at 65.76 GB.

The exemption first lived in a MEM_LIMIT_EXEMPTIONS dict keyed by
(role, variant index) inside the test. That was a second suppression mechanism
beside the repository's own, and it sat where nobody editing the pins would
look. It is now a '# nocheck: mem-limit-budget' marker inside the variant's own
entry in meta/variants.yml, read through suppressed_line_numbers from
utils.annotations.suppress like every other suppression, and registered as a
rule in suppression.md. A new _variant_spans helper maps each top-level entry
to its line range so the marker scopes to one variant rather than the whole
role.

Nothing is given up by the move: the marker still needs text after it or it
grants nothing, mem_reservation stays enforced as a standalone condition at
30.28 of 32 GB, and test_every_mem_limit_exemption_is_still_needed now collects
the marked variants from the annotations instead of the dict, so it still fails
once a marked variant fits again.

Residual: the marker records no figure, so the overage behind it can grow
without either test noticing. The cap is switched off for that one variant
rather than raised to a measured ceiling.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-02 18:47:48 +02:00
kevinveenbirkenbachandClaude Opus 5 bed4b3c84f refactor(docs): derive the role integration pages instead of freezing them
cli/build/docs/integration_matrix was 1189 lines a human ran through
'make integration-matrix', and its output sat frozen as a 125-line grid in
requirement 027. Its ENTITIES and EDGES lists were hand-maintained, so the
grid could only drift: it covered 84 entities while the tree holds 98 roles,
named two roles that no longer exist, and omitted sixteen current ones -
api, checkmk, docs, hermes, homeassistant, jellyfin, meta, mirror, openbao,
openclaw, penpot, pihole, s1, seaweedfs, seaweedfs-console and semaphore.

infinito_docs/generators/integrations.py replaces it and joins the nine
sibling generators in that package, so the overview, services and addons
pages are written into generated/integrations/ on every docs build rather
than when someone remembers the target. index.rst takes the overview and the
new docs/architecture/integrations.rst references the other two.
Requirement 027 becomes prose. The make target and its i8inma alias are
removed as a pair, which keeps the alias lints satisfied.

Coverage is not strictly larger. The removed EDGES list carried a curated
upstream project URL per integration, 96 of them, and the new edges have no
such field; only 48 of 159 addon declarations hold update.upstream_id or
config.repository, so about a third is re-derivable and the rest existed only
in that list. Its fourth field is no real loss - 57 entries read 'check', so
it was a near-constant rather than an axis. In exchange the old module had
zero tests, not one file under tests/ referenced it, and the generator ships
310 lines including generate().

Residuals: the HTML build runs without -W, but i18n.py:57 runs the gettext
builder with -W and check=True, and that build has never seen
integrations.rst - no catalog mentions generated/integrations. And
docs/requirements/036:72 still carries a checked criterion asserting a table
in 027 that no longer exists.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-02 18:22:04 +02:00
kevinveenbirkenbachandClaude Opus 5 e78596d76d fix(docs): point the remaining web-app-mig references at web-app-meta
e9d5d49056 renamed the role but staged only locale/ and roles/web-app-meta/,
so four references to the old name survived it. The root README linked
roles/web-app-mig/ and roles/web-app-mig/README.md - a directory that same
commit deleted - which test_markdown_links.py rejects because it requires
every target to be git-tracked. ADR 0003 and requirement 017 name the role in
prose, and requirement 039 carries a checked criterion asserting what
web-app-mig renders.

Only docs/changelog/007.000.000-2026-05-08.md keeps the old name after this,
which is correct for a changelog, and docs/requirements/027-integration-matrix.md,
which is rewritten in its own commit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-02 17:56:02 +02:00
kevinveenbirkenbach aa55c8c8bd Merge branch 'main' into feature/role-stalwart-mail-swarm 2026-10-02 17:40:09 +02:00
kevinveenbirkenbachandClaude Opus 5 0a3da88912 feat(lifecycle): close the EOL contract and retire four roles
web-app-confluence, web-app-jira, web-app-minio and web-app-phpldapadmin are
lifecycle: eol. Their primary services now carry a literal 'enabled: false'
and their READMEs an end-of-life banner, so nothing re-enables them from a
variant and a reader sees the state before the Quick Setup block.

Three consequences, none of them cosmetic. minio drops its 'bond: 1' because
test_disabled_service_bond.py refuses a non-zero bond beside a disabled
service. jira and confluence gain 'shared: true' and with it provider status
in the service registry, which moves them into the sys-service-loader preload
phase and makes 'disable=' reach them; that is why both grow a tasks/00_core.yml
whose first task is the run-once flag, with a thin tasks/main.yml, as
test_service_core_first_task_run_once.py requires. The three inventory bundles
drop the web-app-minio group.

default.env carried INFINITO_LIFECYCLES="... maintained", a token matching no
stage, so the envelope silently admitted nothing by that name. It reads
'maintenance' now. No role sits at either token, so the value changes no
round today.

Three lints keep it closed: an EOL role may not appear as an enabled
dependency of a non-EOL consumer unless that consumer is itself EOL, every
EOL role must carry the banner, and the envelope may only name stages that
exist and are tested.

Not theoretical: quay.io no longer serves
quay.io/minio/minio:RELEASE.2025-09-07T16-13-09Z to an anonymous puller, so a
round that lists web-app-minio dies at compose pull after ten retries. The
upstream this role depends on is gone.

Residuals, both latent and both unclosed. utils/annotations/suppress.py reads
the reason from the leftmost marker while the gate scans all of them, so a
second '# nocheck:' appended to a line that already carries a reasoned marker
lends its reason to the bare EOL marker - and all four consumer flag lines
already carry one. And the envelope lint guards only one direction: it rejects
unknown and untested tokens but never asserts the envelope contains the tested
stages, so dropping 'beta' would drain 214 roles from every round and stay
green.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-02 17:25:02 +02:00
kevinveenbirkenbachandClaude Opus 5 8adf6fd3d1 test(lint): keep exact pip pins out of role Dockerfiles
A version written into a RUN pip install line is read by nothing: dependabot's
pip ecosystem scans requirements*.txt and pyproject.toml, and the repository's
own pip updater scans the package_name: key of an Ansible task. Neither opens a
build recipe, so a pin set there ages until somebody edits the Dockerfile by
hand.

The rule is hard-failing and covers every tracked file under roles/ named
Dockerfile or Dockerfile.<something>, template variants included. A pin counts
only inside the pip install command itself: the scan follows backslash
continuations, stops at the next shell separator, skips whole-line comments,
and ignores a version supplied by an ARG or a Jinja expression.

Suppress with # nocheck: dockerfile-pip-pin, catalogued in suppression.md.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-01 04:21:23 +02:00
kevinveenbirkenbachandClaude Opus 5 e8e89d293d refactor(seaweedfs): split the object store from its browser consoles
web-app-seaweedfs becomes two roles. web-svc-seaweedfs keeps the storage
engine: the container, the seaweedfs_data volume, the per-consumer S3
identities and the single canonical domain api. web-app-seaweedfs-console
takes the filer and master web UIs into its own compose stack behind the
admin-only oauth2 proxy, reaching the engine over the shared object-store
network. A node can now run the store without the consoles.

The console needs a distinct role name because get_entity_name strips the
category prefix: both halves would have resolved to the entity seaweedfs and
collided on the compose project, the instance directory and the container
name.

The filer and master ports move into the engine's services.seaweedfs.ports
.internal as their single owner; 01_init_consumer.yml consumes the master
port and would otherwise have resolved it only by role-var leakage from the
console, breaking bucket provisioning on exactly the console-less node the
split makes possible.

The engine's api vhost gains the prometheus locations. It never had them: the
override satisfied the cross-cutting-include lint only because the strings sat
in the SSO branch that the api domain never took.

Consumers, the objstore lookup and the catalogs follow the role id.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-01 02:20:12 +02:00
kevinveenbirkenbachandClaude Opus 5 d88fe1d83a test(lint): let the legacy-path guard see the trees that still named the old layout
`config/main.yml` exists in no role: f65f4d60fb migrated the last one. A guard
against the string already exists, `TestNoLegacyPathReferences`, and it names
`config/main.yml` among its LEGACY_TOKENS. It scanned plugins, utils, cli,
roles, scripts, filter_plugins and lookup_plugins, which is every tree except
the two the stale references actually lived in.

So nine of them survived in `tests/`, and the guard reported green the whole
time. The code underneath was already correct everywhere: `test_csp_consistency`
and `test_role_wiring` iterate ROLE_FILE_META_SERVICES, and only their docstrings
and one assertion message still said `config/main.yml`. Had any of them globbed
the old path the test would have gone vacuous rather than red, which is the
failure mode worth naming here.

`tests` and `tasks` are now scanned. The targets come from
`utils/roles/mapping.py`, not from guesswork: `config/main.yml` is
`meta/services.yml`, `schema/main.yml` is `meta/secrets.yml` (confirmed at
`cli/administration/inventory/provision/reset.py:67`, which reads exactly that
file), and `users/main.yml` is `meta/users.yml`.

Scanning `tasks` exposed a second dead pointer. The migration tool became a
package on 2026-09-14, but EXEMPT_FILES still named `migrate_meta_layout.py`, a
file that no longer exists, so the exemption was inert and only invisible
because `tasks` went unscanned. Two dead pointers covering for each other. The
exemption is now a directory, so a new module in that package cannot fall out of
it. `test_no_direct_calls.py` named the same dead path in prose; that lint
allows through nocheck markers at the call site, so nothing was broken there.

`docs/administration/configuration/email.md` was the worst of them, because it
instructed operators rather than describing tests: it told them to write
`compose.services.email` into `roles/<application_id>/config/main.yml`. The
consumer, `plugins/lookup/email.py:255`, reads `entry["services"]["email"]` and
says in its own comment that there is no `compose.services` envelope. The role
snippet, the inventory snippet and the precedence list now match the reader.
`group_vars/all/TODO.md` pointed at the same dead file.

Verified by watching the guard fail, twice. Re-introducing `config/main.yml` in
a test file reports it; pointing the new directory exemption at a wrong path
reports `tasks/utils/migrate_meta_layout/credentials.py`, which proves both that
`tasks` is scanned and that the exemption is the only thing letting the
migration tool through. Restored, 11 passed.

The changelogs under `docs/changelog/` keep their mentions, and `.md` stays out
of the scanned suffixes for that reason.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-30 21:27:40 +02:00
kevinveenbirkenbach 3586fa205d Merge branch 'main' into feature/store-i18n 2026-09-30 18:05:51 +02:00
kevinveenbirkenbachandClaude Opus 5.5 5e0bcee6f5 docs(agents): point the Assumption 10 link at its current heading
7ed60e1fc2 renamed the Assumption 10 heading in security.md, and the
link in sandbox.md still used the short #assumption-10 fragment, which
no heading slug matches. It now carries the full slug of the new
heading, the form 4efa892706 on feature/store-i18n uses for the old
one, so that branch's merge resolves the line by keeping main's side.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-30 16:57:31 +02:00
kevinveenbirkenbachandClaude Opus 5.5 4e1c8e2de1 fix(agents): deny rm -rf and the host credential files in the sandbox
An external report flagged the Bash(*) allow in the committed
.claude/settings.json. Bash(*) stays: every command still runs inside
the OS sandbox, and deny and ask take precedence over it. Reviewing the
file against its own documentation turned up two real gaps instead.

security.md and settings.md cite an rm -rf* deny rule as the guard
against `rm -rf .` wiping the worktree and .git/, but the rule was lost
in ee30f6d446 when the deny list was rewritten. It is back.

denyRead covered ~/.aws, ~/.config/gcloud, ~/.gnupg and ~/.kube only.
~/.docker/config.json holds registry logins inline, ~/.git-credentials
and ~/.netrc hold plaintext credentials, and the default ~/.ssh/id_*
keys were readable because Assumption 10 kept ~/.ssh open for an
ask-gated git push that has since moved to deny. All nine paths are
denied now. The rest of ~/.ssh stays readable, so SSH fetches keep
known_hosts and authenticate through the agent socket. Sandboxed docker
calls pull anonymously and print a config warning on stderr.

Thanks to Hanno Horrmeyer for the report.

Reported-by: Hanno Horrmeyer
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-30 16:57:30 +02:00
kevinveenbirkenbachandClaude Opus 5 a37039f0cb fix(web-app-docs): name the replayed role instead of taking the first one
The instructions test brings up a machine per role, so it can only ever
replay one guide. Which one it picked was a side effect of ordering: the
lookup returned the first invokable peer the round listed, and on a CI row
that is the role under test only because the row's apps happen to read
<role>,web-app-docs.

It now reads APP_ID, which the deploy workflow already sets to the row's app
and which the swarm routine already documents as the app under test. A round
that carries no APP_ID, or one whose app publishes no Production block, draws
an invokable peer at random instead, so a local round covers a different
guide each time rather than always the first one the inventory lists.

Ansible runs inside the infinito container rather than on the runner, and
that exec passes an explicit allowlist, so the name arrives only where it is
forwarded. Two seams carry it: _FORWARDED_ENV_KEYS, which covers CI and the
local initialize and reinstall verbs, and the update verb's own docker exec,
which assembles its arguments without that CLI.

The pin is tolerant rather than strict. APP_ID is set on every deploy row and
not only on documented ones, so refusing an app that publishes no guide would
let a generic variable abort a deploy.

Measured: the draw is observed over 200 rounds rather than assumed, and the
forwarding is negative-controlled, removing the key and watching the new test
fail on that key alone.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-28 09:16:29 +02:00
kevinveenbirkenbach 230d9a1e5e feat(cache): declare every cached upstream once and generate the rest
The package cache was configured in six places at once: the nginx upstream
map, the consumer compose override, pip.conf, .npmrc, the apt sources and the
twenty ensure_proxy_repo calls that bootstrap Nexus each spelled the same
hostnames, repository names and suites by hand. A new upstream meant editing
five files and hoping none was missed, and the docs told contributors to do
exactly that.

A role now declares what it needs under cache: in its meta/networks.yml, and
everything else is derived from it. svc-cache-package holds the general
upstreams; web-svc-libretranslate holds its own. All nine derived files are
generated and gitignored, so a second spelling of a hostname cannot exist.

utils.cache.hosts reads the declarations without PyYAML, because the .env
generator reaches them before any dependency is installed; it raises rather
than truncate when a comment sits at column 0 inside the block, which would
otherwise drop every declaration below it in silence. utils.cache.records
owns the Nexus record format and the Ubuntu mirror resolution, so the dev
stack and the role provision from one rendering.

A build may only resolve a cached host it can verify: the plain-HTTP hosts
are hijacked for every image, and the TLS hosts only for an image whose
Dockerfile installs the frontend CA. Hijacking all of them would fail every
pip and npm build with CERTIFICATE_VERIFY_FAILED.

svc-cache-package deploys the cache and its TLS frontend by calling the same
shell scripts the dev stack calls, rather than reimplementing them as tasks.
The role is invokable through the new svc-cache category and inert until a
host carries it.

Verified: the twenty Nexus payloads, the fifteen nginx server blocks and all
seven package-manager configs are byte-identical to the hand-written files
they replace, and the new category adds one role to the deploy order while
preserving the relative order of the other 180.

The role has not been deployed yet.
2026-09-27 16:28:48 +02:00
kevinveenbirkenbachandClaude Opus 5 0e4ed57c3c refactor(web-app-dashboard): bake the port-ui content catalogs into the image
A bind source only exists on the node that rendered it, so swarm rejected
the service with "bind source path does not exist: .../volumes/i18n-content".
The catalogs are generated from core.po at deploy time and no operator ever
edits them, so they are image content, not host state.

files/Dockerfile copies the build context's i18n-content/ into
/app/i18n/content, the path port-ui derives from app/utils/i18n.py. The
upstream image ships no catalog of its own, so nothing is shadowed.
meta/services.yml declares custom: true, which makes the image lookup
resolve dashboard_custom and leaves image:/version: as the Dockerfile's
FROM. The compose template takes the shared build block from
sys-svc-container rather than spelling one out, so it also gets the
compose-only pull_policy: never.

The catalogs move from directories.volumes to directories.instance because
that is the build context. Only the stack host has one, so the render drops
render_replicated_templates for stack_host_template, and the filter plugin
that produced the replicated-template entries goes with it.

A find/absent pair removes the catalog of a language core no longer
translates. In the mounted design a stale file was host state an operator
could delete; baked into an image it would survive every rebuild.

The render also notifies container-recreate. The tag is constant across
catalog changes, and docker stack deploy --resolve-image never computes no
diff from a re-pushed identical tag, so in swarm only a forced service
update moves tasks onto the new image. In compose the topic resolves to the
same compose up --force-recreate handler that compose-up already triggers.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-27 00:50:52 +02:00
kevinveenbirkenbachandClaude Opus 5 0e9210c36a chore(lint): drop the three lints that parsed the MCP documents
`test_mcp_audit_completeness`, `test_mcp_audit_classification` and
`test_mcp_blocked_reasons` read the audit section with regexes — heading
counts, lines of backticked ids, table rows — and held it against
`roles/*/vars/main.yml` and `meta/mcp.yml`. They are removed.

Both documents claimed that enforcement in prose, so the claim goes with
them rather than being left standing: the record now says a role added
later is absent from the audit until somebody notices, and requirement 025
no longer asserts "Lint enforces both" for the blocked rows.

What is given up, stated plainly: a new role no longer surfaces as
undisposed, which is how dsk-base and user-workstation surfaced today; an
audit entry may contradict the role's own metadata, which was true of
twenty-four roles the first time the classification check ran; and a
blocked role may carry no reason or ship an enabled surface anyway.

The link into requirement 035 gains a TODO marker, because
test_no_stale_requirement_refs forbids a live reference to a requirement
document, and the reference to 025 loses its link for the same reason.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-26 15:40:15 +02:00
kevinveenbirkenbachandClaude Opus 5 5bfe953ab8 feat(dsk): pull the login account in through a service edge
A desktop role writes into the home of the workstation account, chowns to
its name, or becomes it, but nothing made that account exist. Job
108388860157 of run 36235368471 shows what that costs:

    Module failed: chown failed: failed to look up user biber
    roles/dsk-gnt-claude/tasks/01_gateway.yml:2   path: /home/biber

The round deployed dsk-gnt-claude, dsk-gnt-codex and dsk-code without
user-workstation, and the log had already warned `Unknown user 'biber'`.
tasks/stages/02_workstation.yml was the only guarantee, and it runs for
workstation hosts alone.

The premise is now a service edge. `dsk-base` provides `desktop-base` and
pulls in `user-workstation`; every other dsk role declares that key in its
own meta/services.yml. `_is_service_required` then marks the key required
from the consumer's own declaration and the loader runs both providers in
the constructor stage, before any desktop role. user-workstation becomes a
service at all here: it had no `application_id`, so it was in no registry,
which is what its `# nocheck: required-by-coverage — TODO` recorded.

Measured over every role, HEAD against this tree: exactly the 32 dsk roles
change, each gaining {dsk-base, user-workstation}; no other closure moves
and nothing is removed. For an inventory holding dsk-gnt-claude alone —
the CI constellation — both providers are required and both are in the
whitelist closure, so neither depends on group membership.

The flags stay literal with `# nocheck: dynamic-flag`. The documented
dynamic form is circular for a premise: the edge would only be true once
the provider is already in group_names, and the edge is what puts it there.

Two lints hold the pattern. `services-declared-load` fails an invokable
role that loads a service provider with include_role while declaring no
edge; it found svc-ai-agent-broker, which keeps a nocheck because the edge
would set kata.enabled on a role pinned to the manager, a combination
test_no_placement_manager_with_sandbox rejects as unschedulable.
`desktop-base-edge` fails a dsk role that declares no edge at all. Both
were negative-controlled; the first was vacuous on its first pass, because
iter_project_files_with_content yields absolute paths and the role was
derived from a relative one.

The MCP audit and the alias list follow from the new role and the earlier
i18n-retry target. Disposing of the two new roles is what pulled the audit
into this change, and the audit is why the MCP documents are split here
rather than separately: requirement 035 carried a user story, an
architecture, a per-role audit two lints parse, and 32 acceptance
criteria in one 593-line file. The decision half moves to
docs/architecture/decisions/0003-mcp-surface-per-provider.md, which holds
the forces, the contract, the audit and the consequences; 035 keeps the
user story, the criteria and the order of work. Both link to each other
and state the split: a disposition change belongs in the record, a newly
met criterion in the requirement. The three lints and three cross-
references follow the audit to its new home.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-26 15:08:42 +02:00
kevinveenbirkenbachandClaude Opus 5 0c83a49e64 fix(i18n): keep a nocheck alive when an annotation lands above it
translate.py appends its marker to a message's user comments, so it ends up
on the line closest to the msgid. Under `same or above`, which reads exactly
one line, that pushes any older marker out of reach: a suppression stops
working the moment the entry gets translated, silently.

The marker also becomes an annotation, `translated-by: libretranslate`
instead of a bare word, so a reader can tell what the line asserts and a
second annotation can join it without ambiguity.

`is_suppressed_at` gains `block-above` for that shape: the construct's own
line, or any comment line above it inside the same blank-line-delimited
block. The block boundary matters because a catalog entry carries the URL in
both msgid and msgstr, and only the msgid follows the comments; stopping at
the first non-comment line would leave the translation unguarded. Only `.po`
selects it, by file suffix; every other file keeps `same or above`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-26 12:14:33 +02:00
kevinveenbirkenbachandClaude Opus 5 c39f3ec9ee feat(web-app-docs): replay the published instructions in its CLI test
The replay of a role's "### Production" block moves out of the CI guide
scripts and into the documentation role itself. The block is read off the
rendered page over HTTP, so what runs is what a reader copies, and the role
that publishes the page is also the role that proves it.

scripts/github/guide/{one,compose_deploy,host_deploy}.sh and
cli/build/docs/readme/production.py are gone with the workflow step that
called them. The instructions marker now only adds web-app-docs to the row's
apps; test-e2e-cli discovers the role through its new templates/test.env.j2
and runs files/test/test.sh.

The block runs in a throwaway machine, never on the stack host. compose.yml
starts one service built from files/test/Dockerfile, whose base is
INFINITO_PARENT_IMAGE out of the mounted checkout's .env, so the machine is
the stack host's own distribution and the replay exercises the installation
instead of a prebuilt image. files/test/init.sh adds an init when the base
carries none and keeps the full -Syu that ef0f03ea98 established for arch.
scripts/tests/workspace/base/01_install.sh then prepares the machine before
the block runs.

Nothing is skipped any more. The previous host-install branch exited 0 and
passed silently over 65 of the 178 invokable roles; a block without a
"docker run" is now replayed against systemd in that same machine, with the
git clone dropped in favour of the mounted tree under test.

The target role comes from the new guide_role lookup, which reads
list_invokable_app_ids() rather than matching role-name prefixes, and falls
back to the asking role when the round deploys nothing else. deployment.py
grows running_apps() so both lookups share one definition of what the round
deploys. required_by_coverage.role_is_invokable drops its own walk over
categories.yml and delegates to the same SPOT; measured equal across all 280
roles.

Carried in the same index, because the refactor pass ran over this change
set: library.py splits into sites.py and build_queue.py mixins, builder.py
hands translated_languages to catalogs.py and folds three repeated log-tail
and state writes, and placeholders.py becomes a facade over spans.py,
repairs.py and damage.py. No test changed for those splits, and the two
ref-resolution dicts builder.py carried are replaced by _wanted_ref, which
also stops hashing the deployed tree on every tag build.

Verified: 7132 unit and lint tests pass over the whole tree, the guide_role
lookup renders through a real Templar, the base image resolves from .env,
and compose config validates the service. The replay itself has never been
executed; that needs a deploy of web-app-docs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-26 04:39:48 +02:00
kevinveenbirkenbachandClaude Opus 5 53a20bc4c9 refactor(vars): ask the deployment mode by name, not by string comparison
DEPLOYMENT_MODE was compared against a quoted literal 219 times across 110
files. IS_COMPOSE_MODE and IS_SWARM_MODE say the same thing once, and
test_deployment_mode_booleans keeps it that way: only the file that defines
them may still compare.

Both are real booleans under this ansible, measured before the swap because
the alternative is silent: a variable that templates to the string "False" is
truthy in Jinja, which is why IS_STACK_HOST is written `| bool` at every use.
These need no filter.

What had to learn the names:

  * utils/annotations/task_gate.py, which several lints ask whether a task is
    compose-only gated;
  * four compose-template lints that recognise their gate by matching the
    expression;
  * the fixtures that stand in for the play's variables. They derive the
    booleans from the mode now instead of carrying them, or a test that
    overrides DEPLOYMENT_MODE keeps the old pair and asserts the wrong
    branch.

Each replacement was checked rather than trusted: the 206 conditions that
changed in place were evaluated old against new through the Templar under
compose, swarm and host, with no disagreement, and no changed line turned out
to be anything but a condition swap. `!= 'swarm'` became `not IS_SWARM_MODE`
rather than the shorter IS_COMPOSE_MODE, because only the literal translation
stays correct should the mode ever be host.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-26 02:51:58 +02:00
kevinveenbirkenbachandClaude Opus 5 aceb5295ef feat(docs): let the documentation build generate what make docs generated
Cosmos, Quick Setup and Credits follow from meta/services.yml, categories.yml
and galaxy_info.author, yet 279 role READMEs carried a copy that went stale
whenever the metadata moved and nobody re-ran make docs. The documentation
build now runs the generators itself, against its own scratch checkout, and
the committed READMEs keep only the prose a person writes.

utils.cache.PROJECT_ROOT derives from the module's location, so putting the
checkout first on PYTHONPATH makes the generator operate on the scratch tree.
i18n.py and builder.py add it; the one remaining coupling, a relative_to over
PROJECT_ROOT in a log line, is gone.

CI extracted the "### Production" block from the committed README with awk.
Stripping the section made guide_deployable() return "" for every role, which
selects no deploy row and turns nothing red: a fail-open regression. It now
asks _is_role_invokable, which matches the old condition exactly (178 roles
either way, both difference sets empty), and cli/build/docs/readme/production.py
renders the block for the two guide scripts. All 178 renders are byte-identical
to what HEAD served, and both scripts' extraction pipelines produce identical
output for a web app, a service and a desktop role.

test_readme.py inverts: the three sections are now a hard failure in a
committed README. readme_md.md documents what each is derived from.

Removed: the docs, cosmos, readme-generate, readme-index and readme-check
targets, the five aliases pointing at them, and docs from make quality.

Verified by running generate_commands() in series against a copy of the
checkout: every command exits 0, no README is left without Cosmos or Credits,
and exactly the 178 invokable roles get a Quick Setup. The ansible_roles step
needs pandoc, which only the docs image carries, so that one link of the chain
is unexercised here; it is unchanged by this commit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-26 01:09:22 +02:00
kevinveenbirkenbachandClaude Opus 5 d8caa45420 fix(docs): resolve a directory link to its index before its README
Sphinx prefers nothing: dir/index and dir/README are two independent
documents. The preference lives wherever something maps a folder onto a
page, and this repository had two such places disagreeing.
local.file_headings has always hidden README.md from a directory carrying
an index.rst, while yesterday's resolver saw README only, so a link led to
the page the sidebar hides.

Both now try index.rst, index.md, README.md, README.rst in that order. The
extension is renamed accordingly, and the tuple lives once in the lint
package rather than a third time.

That also repairs two links this branch degraded: roles/ holds an index.rst
and no README, so a README-only rule reported every reference to it as
broken and they were turned into code spans.

Three links stay code spans on purpose. Their text names something the
target is not - a suite, a file - so resolving them would restore a
misleading reference rather than a working one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-25 20:08:26 +02:00
kevinveenbirkenbachandClaude Opus 5 4efa892706 fix(docs): point every reference at something that exists
Three anchors were wrong, and none of them was guessed: myst builds them
with default_slugify, which appends a hyphen where a heading ends in an
emoji. Computed against the real headings, 'Investor Relations 💹' becomes
'investor-relations-', and two links additionally named a section that does
not exist - the deploy guide has 'Pinning Variants (Single Or Bundle)', not
'Pinning A Single Variant', and the playwright page has 'Triggers', not
'Scenarios'.

The semaphore requirement still told the reader to resolve Open Questions
into Confirmed Decisions after that section was removed.

In the documentation guide, '[here](...)' is an example inside a sentence
about link text, not a link; it is code now.

The contributing index listed tools/makefile for a file named make.md, and
two links in sys-ctl-alm-telegram pointed at roles/, which carries no README
for the directory resolver to find.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-25 19:35:00 +02:00
kevinveenbirkenbachandClaude Opus 5 fcc98bcad1 fix(docs): require a README behind every directory link
The lint accepted a link that resolved to a file or a directory. myst
builds a document reference only when the target is_file(), so a link to
a directory without a README is a bare file listing on GitHub and a dead
cross-reference in the documentation build. It now reports which of the
two reasons applies.

The tightened rule found 41 links. Where a README backs the directory,
bd15eae9fa's resolver carries the link and it stays. Where none exists,
the link becomes a code span rather than an invented README: 15 of them
point at a role's meta/addons/, whose addon table already sits below the
sentence, and the rest at code directories such as utils/ or
cli/administration/deploy/runner/.

The changed sentences are msgids, so these entries return to the
translator on the next extract.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-25 18:42:23 +02:00
kevinveenbirkenbach f2cee9bb34 Merge branch 'feature/svc-ai-litellm/remote-models-config' into feature/store-i18n
# Conflicts:
#	cli/build/docs/readme/generate.py
#	docs/requirements/035-mcp-proxy-expansion.md
#	roles/svc-ai-lmstudio/meta/services.yml
2026-09-25 16:45:16 +02:00
kevinveenbirkenbachandClaude Opus 5 843631ffa5 feat(dsk-gnt): point the workstation agents at the deployment's own gateway
A coding agent ships aimed at its vendor's API, so on a host that also runs
svc-ai-litellm the deployment pays twice: the gateway it already operates sits
unused, and the workstation's key leaves the machine to reach a third party.
claude, pi and the new codex role now resolve the gateway the same way.

An explicit services.<agent>.gateway_url wins, because a workstation whose
gateway lives in another inventory carries the address by hand. Otherwise the
loopback URL applies, and only while LITELLM_USABLE. agnt_<agent>_configured
requires a url and a key together and gates the write, so an agent this
deployment cannot point anywhere is left alone rather than half configured.

codex needs its own role rather than a fourth branch in an existing one: it
reads its key from an environment variable instead of its config file, so it
writes config.toml plus an environment.d entry, where claude and pi merge into
a JSON file the user may already keep.

The three agents share one probe. It matches the written config as text rather
than parsing it, because the three write TOML, JSON and INI while the question
asked of all three is the same one, whether the file names this deployment's
gateway. It then asks for a completion with the key the role wrote and requires
content in the answer, since an empty completion reads as success to any caller
that only checks the status code.

utils/once/flag.yml moves to the first task in claude and codex. Registering
claude and codex as shared services makes the roles loadable through
load/app.yml, which re-enters a role whose run_once flag is not yet set.

Verified: 396 lints with 363 subtests, shellcheck on the four scripts, ruff on
the probe. Not verified: no config has been rendered and no agent has yet
reached a gateway, which is also the first exercise of the host branch added in
95bf5898a8.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-25 13:50:57 +02:00
kevinveenbirkenbachandClaude Opus 5 7a4f7e7658 feat(svc-ai-s1): rename the decider to System One and serve it from laya
The role answered one contract, POST /v1/systemone, under the name of the
single implementation that happened to serve it. Renaming it to svc-ai-s1
leaves the contract where it was and lets the flavor decide who answers:
variant 0 runs laya, variant 1 runs the GLiFormer server the role carried
before, so a round proves the contract against both rather than against
whichever one ships as the default.

Reading laya 0.3.20 rather than reasoning about it corrected two defects that
would have hit variant 0 on its first deploy. LAYA_MODELS takes the short
checkpoint names, not repository ids: router.py maps english to
convaiinnovations/laya, so the entry carries both and hf download takes the
repo while the env takes the name. And laya serves @app.get("/health") where
jeff serves healthz, so the base healthcheck moves to health and variant 1
overrides it back.

services.s1.gpu states the intent and 00_core.yml resolves what the host can
actually do, requiring /dev/nvidia0 and /usr/bin/nvidia-container-runtime
before it builds a CUDA image. Both are needed: with the device alone the
daemon has no runtime to attach it with, so a GPU machine still builds the CPU
image until the toolkit arrives. The flag therefore ships true and stays inert,
and the CPU render is byte identical to the one before this commit.

templates/Dockerfile.j2 becomes files/Dockerfile plus files/shell/build.sh and
files/shell/entrypoint.sh, in the shape svc-ai-agent-broker already uses: ARGs
supplied by build.args, the context staged through render_replicated_templates.
The branching is shell rather than Jinja, so shellcheck reads it and it runs
outside a deploy. Executed with pip, apt-get, hf and python stubbed, all four
flavor and GPU combinations emit what the template emitted.

meta/info.yml gains the video that explains what a System One model is, which
retires the marker that claimed none existed.

Verified: 519 lints with 381 subtests, 196 unit tests, the four-way build.sh
execution, and the five-row truth table for the GPU gate. Not verified: no
laya image has been built and no container has run, on either deployment mode.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-25 13:22:36 +02:00
kevinveenbirkenbach c267cd0a8a Merge branch 'main' into feature/store-i18n 2026-09-24 23:44:01 +02:00
kevinveenbirkenbachandClaude Opus 5 53c120aaac refactor(dsk): rename the desktop tier and give its agents a category
Every desk- role becomes dsk-, and the three coding agents move to dsk-gnt- under a category of their own. The category carries a title, hanzi and icon but no invokable flag: an invokable child under an invokable parent is rejected outright, which is also why web itself is not invokable.

Three things a search and replace would have broken without a sound. get_entity_name now strips dsk-gnt-, so the primary entity keys agnt-claude, agnt-cursor and agnt-pi no longer resolved and all three roles dropped out of the CI plan. Eighteen run_once guards carried the old name against a convention its own test enforces. DESKTOP_ROLE_PREFIX in the addon spec lint is a literal, so the desktop exemption it grants would have matched nothing and the lint would have moved to the wrong rule in silence.

docs/requirements/035 is not a historical document but a register a lint holds to every role with an application_id, so its list carries the new ids. In 026 only the links move; the prose stays as a statement about the tree at the time it was written.

Measured against the plan with the rename normalised, the deployed role#variant set is unchanged. A stale id in an inventory is caught before any deploy starts: the pre-flight validator reports Invalid group 'desk-firefox' (not in application_ids).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 22:15:41 +02:00
kevinveenbirkenbachandClaude Opus 5 50f2bca6d2 docs: regenerate the overviews the new role and its dependency changed
The roles table now shows Keycloak among the agent broker's dependencies and
jeff among the gateway's, and the MCP expansion's no-remote-surface list
counts twenty seven rather than twenty six.

All three lines are generator output for changes that already landed, in one
commit because the same four lines of the roles table carry consequences of
three of them and cannot be split by concern.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 18:13:18 +02:00
kevinveenbirkenbachandClaude Opus 5 eed9215aed fix(svc-ai-litellm): route on numbers the backend confirms
The `auto` alias picked a model that could not hold the prompt, and every
layer that should have caught it was comparing this deployment's own
declarations against each other.

Three errors produced one failure. smollm2:135m was declared at 16384 while
the tag trains to 8192, so Ollama clamped num_ctx and then truncated the
prompt to half the window rather than refusing it. The token estimate ran at
three characters per token and was documented as erring high, but the
oversized prompt is built from "x ", which tokenizes at two: 16384 characters
are 8193 tokens on all three served tokenizers against an estimate of 5461.
A window too large and a demand too small cancel into "eligible", and
neither correction works alone; both ship. The third error is what fired
them: at one sample the speed measurement kept its cold load, so a 135M
model measured slower than a 0.5B one and the router ranked on the
inversion. The warm-up is now discarded at every setting.

The probe compared a declared window against an estimated demand, both ours,
so it could not observe a declaration the backend does not honour. It now
reads usage.prompt_tokens and fails when the backend evaluated materially
less than was sent. Against the live stack that check separates the two
models exactly: smollm2 reports 4098 of 8192 sent and fails, llama3.2
reports 8221 and passes, and 4098 is the figure Ollama's own truncation
logged. A 400 now carries its body, without which this failure reads as
"HTTP Error 400" and nothing more.

The strategy is selectable. Where jeff is deployed the decision comes from a
System One encoder reading the prompt; otherwise the routes are ranked on
standing preferences, and each factor carries its own weight. Both were
exercised over six prompt sizes: system_one chose qwen, then smollm2, then
the mock as the prompt grew, weighted chose llama3.2:1b throughout. The
state handed to the decider is capped at 512 characters, because the encoder
holds 512 positions and the previous 20000 came from the server's own
rejection limit, which is a different number: measured through the gateway,
a 2000 character state already exceeded the decider's timeout, and one
timeout leaves the request running so every later one queues behind it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 18:11:15 +02:00
kevinveenbirkenbachandClaude Opus 5 efb53ddf9c feat(svc-ai-litellm): measure each served model's generation rate
The router already ranked routes on traits.speed, but nothing ever set
one. No catalogue carries a rate, because a rate is a property of this
machine under this load rather than of the model, and a hand-written
number in services.yml would be a guess that rots.

The deploy now measures it. After the gateway is warm, measure_speed.py
asks it which models it serves and sends router_speed_samples requests to
each model that has no rate yet, discarding the first as a cold load and
taking the median of the rest. The result is stored on the stack host and
rendered back into model_info.traits.speed on the same deploy, so the
gateway restarts once with the numbers it just produced. The stored file
is read back with slurp rather than lookup('file'), because the config
directory lives on the stack host and a lookup reads the controller.

A model that already carries a rate sends no request at all. Re-measuring
everything every deploy would produce results the tolerance discards anyway,
and that traffic is the entire live surface of this step: what can hang,
what can fail the deploy, and what the deploy waits for.
router_speed_remeasure discards the stored numbers once, for the case
where the hardware under them changed.

Two budgets bound a run. A measured request may take
router_speed_timeout; the discarded first request gets upstream_timeout
instead, because it pays the model load and holding it to the sample
budget would time out exactly the models worth measuring. Exceeding a
budget abandons that model, not the deploy, and the model keeps whatever
rate it had.

Every matrix variant overrides the sample count to 1, where the single
sample is kept rather than discarded: a CI round proves that the
measurement, the store and the re-render ran, not what the rate was on a
shared runner.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 00:41:48 +02:00
kevinveenbirkenbachandClaude Opus 5 539e27795f feat(svc-ai-litellm): weight each routing factor from services.yml
The router ranked surviving routes lexicographically: local, then price,
then speed, then alias. How much a factor counted was its position in
that tuple, so a deployment could not say that it cares about price more
than about speed.

Each factor now carries a 0..1 weight in services.litellm.router_weights.
A factor is scaled to 0..1 inside the candidate set before its weight
applies, because the raw units do not compare: a per-token price is a
millionth of a cent and a rate is tens of tokens per second. A factor
whose value is identical across the set scores every route 1 and drops
out, rather than deciding on a rounding artefact.

Confidentiality stays out of the score. local_reason removes every remote
candidate before decide() runs, so no weighting can send a request that
must stay local to a third party; a weight is a preference, and a
credential leaving the cluster is not something a preference should be
able to buy. The shipped weights additionally keep locality worth at
least cost and speed combined, and a test reads them out of
meta/services.yml rather than repeating them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 00:32:07 +02:00
kevinveenbirkenbachandClaude Opus 5 ed624aa171 feat(compose-deploy): open every deploy with the arguments it resolved
The router now prints one line before it routes:

  === compose-deploy: mode=reinstall apps=svc-ai-litellm bundles= variant= \
      full_cycle=false purge=false disable= playwright_keep=

Rewriting a deploy command is where its other arguments get lost. Switching
apps= from svc-ai-agent-broker to svc-ai-litellm dropped
disable="matomo,dashboard,prometheus,email,css" and
INFINITO_PLAYWRIGHT_KEEP=true in the same edit, after three deploys that had
carried both, and the run went on to deploy matomo and dashboard. That matters
beyond the wasted minutes: test-e2e-cli runs in the destructor stage, after
every role, so the providers are paid for before the CLI test the deploy exists
for even starts.

main.sh is the single entry every compose-deploy passes through, so the line
cannot be skipped and does not depend on remembering to look. It reads the
knobs and exports nothing; 8e293bd921 is on record for what happens when these
same variables reach places that persist them.

compose.md loses the checklist this first carried. The rules were already
stated twice in that file and a third statement is not what was missing; the
misses were not caused by not knowing them. It keeps the two facts that carry
information: why dropping disable= delays the evidence rather than merely
costing resources, and that full_cycle=true is the expensive form rather than
the complete one, since it adds pass 2, credential rotation and the recovery
drill while the CLI tests gate on RUNTIME instead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 23:26:45 +02:00
kevinveenbirkenbachandClaude Opus 5 e7eb8ac1d2 feat(svc-ai-litellm): route one alias to the model that can serve the request
031 made the gateway the one place backends are wired, but not the place the
choice is made: every consumer still names one alias and LITELLM_CHAT_MODEL
resolves it once per deploy for all of them. That is wrong in both directions.
A prompt needing a large window reaches a model that cannot hold it, which is
how web-app-hermes answers HTTP 500 when the agent model declares fewer than
64000 tokens, and a one-line question reaches whatever the deploy picked.

This adds the System One half: fast, typed, no generation, deciding which
System II model answers. Requirement 038 records the decisions; the shape
follows prismhq/jev-router with a deterministic decision in place of a model,
and decision 7 records why no learned one is in scope.

A pre-call hook, not a semantic router. LiteLLM's own auto_router matches
embeddings against example utterances, which answers "what is this about"
rather than "which model can serve this", and it pulls in the semantic-router
extra plus an embedding backend the gateway does not otherwise need.

The hook ships as a rendered file beside config.yaml rather than a derived
image: proxy_server.py resolves a callback through get_instance_fn(value,
config_file_path), which spec_from_file_location's it out of the config's own
directory. services.litellm.image stays on its pin. It is a template because
ROUTER_ALIAS has to match what the route builder publishes.

Capabilities come from LiteLLM's own catalog, 1595 models deep in the image,
keyed on the route's litellm_params.model and then on that name without its
first segment, because ollama/llama3 is filed prefixed while openai/gpt-4o-mini
is filed bare. A traits mapping overrides it for what the catalog does not
know. Declaring what the catalog already states is forbidden: it duplicates a
fact this project does not own and rots in the dangerous direction, since a
stale supports_vision keeps a model eligible for requests it can no longer
serve. Cost is not declared either; a route with an api_base or a mock_response
is served by this deployment and is free, and a keyed route the catalog does
not price sorts behind every route it does.

It fails loud, in both halves. The hook returns a string naming the demand when
no served model can take the request, and proxy/utils.py turns that into a
RejectedRequestError carrying the text. The alias's own model_list entry exists
only so the name is listable and raises when reached. Pointing it at the first
route instead, as this first did, made a router that never ran look like one
that worked.

services.litellm.router_alias is the single switch. Empty publishes no route and
renders no callbacks entry, so the hook is not even a condition of starting the
proxy; a separate enable flag would let services.yml read as on while the
router is off.

The routing probe had to learn the alias, which is backed by no backend and was
read as a route standing without one. It now also sends a prompt the smallest
declared window cannot hold and fails when the answer names the alias itself or
a model whose window is too small. That lookup tries the prefixed and the bare
name, because litellm sets model_response.model to the resolved model: matching
only the literal name would find no window and pass every answer.

svc-ai-ollama variant 1 serves three models so the routes differ in something a
request can demand. smollm2:135m is deliberately not the smallest window:
8dbdd31b22 measured it running to n_gen=22011 with context shifts at
n_left=4091, and a route's max_tokens is a default a consumer can override
rather than a cap.

Open, and only a deploy closes them: that the proxy accepts the raising route
at startup, that the alias routes across three windows, and swarm.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 22:59:22 +02:00
Alejandro Roman 04a657649c Merge remote-tracking branch 'upstream/main' into feature/role-stalwart-mail-swarm 2026-09-23 20:41:12 +04:00
kevinveenbirkenbachandClaude Opus 5 2b3b875ee6 Merge branch 'main' into feature/svc-ai-litellm/remote-models-config
One conflict, in the generated role table of README.md: main's Open WebUI row lists neither the Agent Broker nor Qdrant among its integrations, because main does not carry that wiring. This branch does - web-app-openwebui/meta/services.yml declares both flags - so the branch's row is what the generator derives from the merged tree and main's is simply stale.

The resolution was not regenerated, because a deploy was holding the compose container at the time and make docs runs inside it. The next quality gate regenerates the table; an unexpected diff there is a finding, not noise.

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