327 Commits
Author SHA1 Message Date
kevinveenbirkenbachandClaude Opus 5.5 2386c7f39d Merge remote-tracking branch 'upstream/main' into fix/svc-ai-lmstudio/async-model-fetch
Brings in main daea156470. test_fetch.py conflicted: the PR side is kept and its two 120 s Run.elapsed play bounds are dropped, following main's 477c45e6ff, which stopped timing whole ansible-playbook runs because loaded CI workers exceed such bounds; the budgets stay proven by the timeout messages and the play outcome.

🎯 Fix: 95 %
💥 Break: 3 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 92
🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 %

Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:08:51 +00:00
kevinveenbirkenbachandClaude Opus 5.5 ff229ff51c feat(svc-ai-lmstudio): fetch every lacking model at once as async jobs
The model preload fetched one model after the other, so a node with several models waited for the sum of all downloads. When async is enabled, every model the store lacks now starts as its own async get_url job per source slot: the declared url first, then each mirror, a mirror only after the whole source round ended and only for the models still missing. Each slot round gets a budget of max(floor, bytes / minimum rate) with async retries inside it. A jobs file records the running jobs, so a later run waits out or drops the downloads of a killed run, and a download that still runs or reports no state past its lifetime stops the play. Partial downloads in staging are removed before every store read, and the final check fails closed with what each source answered. Debug runs keep fetching one model at a time through get_url_retry, which now takes its own retries argument.

🎯 Fix: 92 %
💥 Break: 4 %
💸 Tokens: 100 %
⏱️ Velocity: 100 %
🛡️ Security: 100 %
🏆 Score: 88
🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 %

Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 10:49:25 +00:00
evangelostsak d9e403945c style(lookup): apply ruff format to the openpost_relay_domains test 2026-11-24 03:16:24 +01:00
evangelostsak f3b92d7523 style(container_networks): apply ruff format to the network_aliases test 2026-11-24 03:16:24 +01:00
evangelostsak 52d4e2e100 test(role_subnets): cover role ids, lists and a templated group var term 2026-11-24 01:59:26 +01:00
evangelostsak 80dc403a0e test(lookup): cover role_subnet_exceptions selection and flag type 2026-11-24 01:59:26 +01:00
evangelostsak 132cfb6526 test(lookup): cover openpost_relay_domains order, flags and object store 2026-11-24 01:59:26 +01:00
evangelostsak 8d28c82b95 test(container_networks): read network_aliases of the named service and reject a missing list 2026-11-24 01:59:26 +01:00
evangelostsak 5d1f82fb0a Merge remote-tracking branch 'upstream/main' into feature/web-app-openpost 2026-11-23 16:07:54 +01:00
Alejandro RomanandClaude Opus 5.5 cb6fa4b6bc fix(applications_carrier): overwrite a carrier left in the fact cache on clear
The fact cache merges the cacheable fact layer, so the empty mapping that
clear registered there left an older fact-parked carrier in ansible_facts,
where get_vars kept deep-copying it before every task. clear now writes None
for every carrier key it finds in ansible_facts, which is the recovery the
reader's CarrierInvisibleError message points to.

The integration test parks the carrier as a fact, clears it and parks it
again, with fact injection on and off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 15:44:09 +04:00
Alejandro RomanandClaude Opus 5.5 5da3579d3e fix: address the review findings on the per-task overhead change
- Require ansible-core 2.21: the deploy CLI refuses a venv whose packages
  differ from the exact pins of the deploy extra, the carrier action names
  the version it needs instead of failing on an import, and the image
  installs the pinned ansible from pyproject.toml.
- Lint: catch compact == comparisons, scan compose/, inventories/ and both
  playbooks, flag bare services/packages/getent_* reads, and derive the
  allowlist from ansible-core's variable map and the plugins' documented
  options.
- Tag the play environment freeze and check with always, and cover a task
  override, a handler, a delegated task and a tagged run.
- Map a failed docker.service query to its fail_msg.
- Pin the docker_cached options to the installed stock connection, read
  the carrier through hostvars in a two-host test, and correct the carrier
  guard message and the stale README line reference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 03:01:19 +04:00
evangelostsak 99eecffef4 Merge remote-tracking branch 'upstream/main' into feature/web-app-openpost 2026-11-19 12:54:33 +01:00
Alejandro RomanandClaude Opus 5.5 2fd480d2db perf(applications_carrier): park the carriers outside the fact cache
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 21:29:02 +04:00
kevinveenbirkenbachandClaude Opus 5.5 0bf9e3d777 fix(mirror): join a digest pin with @ in the mirror and image lookup
Port of the reference part of IAM 7646dcbc94. The fork mirror of #2006 (run 44253986749) runs main's mirror code under pull_request_target and built docker://ghcr.io/.../node:sha256:feb766..., an invalid reference. providers.py gains image_ref() through utils.docker.image.pin.pull_reference; tag_exists, mirror, sync and wait use it, and plugins/lookup/image.py joins the same way. Tag pins keep their reference unchanged (test_every_tag_pin_of_the_repository_keeps_its_mirror_reference); main declares no digest pin. Negative control: the ported tests against main's providers.py fail with node:sha256 versus node@sha256.

🎯 Fix: 92 %
💥 Break: 2 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 90
🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 %

Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 14:18:07 +00:00
evangelostsak 4eae9b49e8 Merge remote-tracking branch 'upstream/main' into feature/web-app-openpost 2026-11-16 10:10:37 +01:00
kevinveenbirkenbach 14286b11ae Merge remote-tracking branch 'origin/main' into fix/roles/role-version-on-main 2026-11-14 19:49:43 +00:00
kevinveenbirkenbachandClaude Opus 5.5 f6613b78fd fix(roles): bring the role_version lookup and its image-check resolution to main
Custom roles such as web-app-cst-store pin their images to their own release,
`v{{ lookup('role_version', '<role>') }}`. Main had neither the lookup nor the
image discovery that resolves it, so core's external image tests rejected the
template as neither version nor digest and asked the registry for the literal
string (GUI CI job core / custom-role (test), red since 2026-11-11).

Ports e615f5fa22 (record the source semver in the pull marker, add the
role_version lookup) and ed9101780e (resolve role_version pins in image
checks) from the production line, without the rest of that branch. Adds
tests/unit/python/tests/external/update/docker/test_role_version_pins.py,
which runs the real pin-policy and reachability checks against a custom-role
fixture with the registry mocked; reverting the discovery change fails it at
the same lines as the GUI CI.

🎯 Fix: 94 %
💥 Break: 3 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 91
🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 17:27:08 +00:00
kevinveenbirkenbach 989cd45f56 Merge branch 'fix/codescan/cyclic-imports' into fix/codescan/python-hygiene
# Conflicts:
#	cli/administration/deploy/development/down.py
#	cli/administration/deploy/development/inventory/__init__.py
#	tests/unit/python/utils/cache/test_base.py
#	tests/unit/python/utils/cache/test_data.py
2026-11-13 20:13:12 +00:00
kevinveenbirkenbachandClaude Opus 5.5 357eb3bd32 fix(codescan): break the runtime import cycles CodeQL reports and lint new ones
CodeQL py/cyclic-import alerts #1023-#1029 and #1112-#1113 map to three cycles: utils.inventory.tools <-> libretranslate, utils.env.builder <-> its handlers, and utils.roles.applications.variants <-> the inventory legacy resolver. Each cycle loaded only because one side deferred an import into a function body. The shared piece now lives in a leaf module both sides import: utils/inventory/tools_vars.py, utils/env/context.py (BuildContext, EnvBuilder), and _resolve_round_include inside variants.py. The stricter lint found four more cycles, each broken the same way: compose <-> down (cli/administration/deploy/development/docker_root.py), the utils.cache package web (utils/cache/reset.py), utils.cache.carrier <-> users (utils/cache/tokens.py replaces users/store.py) and credentials -> provision (cli/administration/inventory/ruamel_io.py).

tests/lint/repository/python/test_import_cycles.py fails on any runtime import cycle between the repository's own modules. It counts TYPE_CHECKING imports and implied parent-package edges, and skips only __main__ blocks and submodule-to-parent reads. Negative control: 3 of the 11 self-tests fail on the old logic. Whole repository: 12 passed. Targeted tests of every touched module: 4275 passed.

Accepted security findings: 78 medusa findings, all on lines that exist verbatim in base 28d05e0183. They come from code moved unchanged into docker_root.py, tools_vars.py and tokens.py, or from untouched lines of touched files (compose.py, credentials_generator.py, credentials/reset/cli.py, users/__init__.py, yaml.py). Reviewed as by design or false positive: argv-list subprocess calls, dev docker-root teardown, NotASecret test-lane keys, SafeLoader yaml.load, md5 memo key, Jinja expression strings.

🎯 Fix: 90 %
💥 Break: 5 %
💸 Cost: –
⏱️ Time: –
🛡️ Security: 100 %
🏆 Score: 86
🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 20:07:50 +00:00
kevinveenbirkenbachandClaude Opus 5.5 326f063bd3 fix(codescan): clear the mechanical CodeQL notes and lint them away (WIP)
Work-in-progress commit on the collective code-scanning sidetree, so main
can be merged in; the single quality-high gate runs on the integration
branch before the pull request.

Fixes the CodeQL notes py/import-and-import-from, py/unused-import,
py/unused-global-variable, py/empty-except, py/mixed-tuple-returns and
py/unused-local-variable across 194 files, and adds one lint per rule under
tests/lint/repository/python/ so none of them can come back:
test_import_and_import_from, test_unused_imports_hidden_from_ruff,
test_unused_global_variables, test_empty_except, test_mixed_tuple_returns,
test_unused_local_variables, plus test_modules_import.

Accepted security finding: MEDUSA-MP-SCAN-2056 (low) on
utils/i18n/client.py:21, an import line matched by a keyword heuristic;
operator-confirmed false positive.

🎯 Fix: 85 %
💥 Break: 8 %
💸 Cost: –
⏱️ Time: –
🛡️ Security: 100 %
🏆 Score: 78
🚦 Gate: ⛔ fix 85 % < 90, break 8 % > 5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 18:44:29 +00:00
kevinveenbirkenbachandClaude Opus 5.5 9e25443874 fix(tests): compare the extra state of two more dict fakes, one import style
CodeQL 978 and 979 (py/missing-equals): _Manager in the Funkwhale
design-preferences test and _Tripwire in the resource lookup test add
an attribute to a dict subclass without comparing it; both now define
__eq__ over the dict content plus that attribute. CodeQL 1138
(py/import-and-import-from): test_requires_python imports unittest and
unittest.mock once each instead of both import forms.

🎯 Fix: 92 %
💥 Break: 1 %
💸 Cost: 100 %
⏱️ Time: 100 %
🛡️ Security: ~100 %
🏆 Score: 91
🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 10:09:40 +00:00
kevinveenbirkenbach 7006699309 Merge remote-tracking branch 'origin/main' into fix/tests/codescan-test-hygiene 2026-11-12 09:46:24 +00:00
kevinveenbirkenbachandClaude Opus 5.5 194e01d0e9 fix(tests): give the dict-based test fakes an __eq__
_HttpResponse in the funkwhale same-origin test and _RawGetHostvars in the email lookup test subclass dict and add their own attribute, so dict equality ignored that attribute (CodeQL py/missing-equals). Each now compares as the same type, the same dict content and the same extra attribute.

🎯 Fix: 92 %
💥 Break: 1 %
💸 Cost: –
⏱️ Time: –
🛡️ Security: 100 %
🏆 Score: 91
🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 08:02:56 +00:00
kevinveenbirkenbachandClaude Opus 5.5 5322c96891 fix(web-app-docs): hold the python base inside requires-python
PR 1448 let the image updater move the docs base to python:3.15-slim, where pip refuses infinito-nexus (requires-python >=3.11,<3.15), so every deploy that builds docs failed. docs now pins python:3.14-slim and sets follow: requires-python; followed_tags then proposes only tags whose Python 3 minor requires-python admits.

One reader, utils/requires_python.py, serves the updater filter, the new requires_python lookup (dev-python gets the same string the old regex produced), the ansible cap test and a lint that makes every role image pip-installing core from the repository declare that follow and pin a supported base.

MEDUSA finding MEDUSA-FTSC-SCAN-089 on utils/requires_python.py:25 (ModelAttackScanner, RLHF reward hacking) accepted as a reviewed false positive: the function only parses the repository own requires-python spec.

🎯 Fix: 93 %
💥 Break: 3 %
💸 Cost: –
⏱️ Time: –
🛡️ Security: 100 %
🏆 Score: 90
🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 00:54:50 +00:00
kevinveenbirkenbach 01494410a7 Merge remote-tracking branch 'refs/remotes/origin/main' into fix/sys-svc-proxy/raw-request-uri 2026-11-11 20:39:56 +00:00
kevinveenbirkenbachandClaude Opus 5.5 0273618c32 fix(packages): keep Blender off centos arm64 only, arm64 elsewhere
PR #1424's Blender#0 batch (run 42540252191) died on centos aarch64
with "community.general.flatpak: Nothing matches org.blender.Blender in
remote flathub": centos installs Blender from Flathub, which publishes
it for x86_64 only, and CentOS Stream 10 has no other source (no EPEL 10
package, official tarballs linux-x64 only). Debian, Ubuntu, Fedora and
Manjaro ARM ship aarch64 Blender, so a role-wide amd64 pin would drop
arm64 coverage there for nothing.

- meta/packages.yml: blender.centos declares architectures: [amd64];
  utils/packages/schema.py validates the key, rejects unknown entry
  keys, and registry.py rejects an entry key at id level, so a typo
  cannot silently drop the narrowing.
- CI matrix (utils/github/variant/pins.py, axes.py,
  cli/meta/ci/validate.py): rows keep their distro and architecture
  rotation; only a (distro, arch) pair whose packages are not published
  moves, a pinned %centos:arm64 is refused with one line, and a broken
  registry is refused instead of raising a traceback.
- ci trigger --failed (cli/administration/deploy/ci/selections.py)
  replays such a failed job with its distro and without the refused
  architecture, warning about it, instead of aborting the dispatch.
- package_install refuses before any module runs on a host whose
  architecture the entry does not publish, reading
  HOST_ARCHITECTURE_BY_KERNEL from group_vars; removal is not refused.
- Docs: .github/workflows/README.md and ADR 0002 describe the
  per-(distro, arch) narrowing.

Accepted MEDUSA finding: MEDUSA-FTSCAN-231 (critical, SQL injection
signature) on plugins/action/package_install.py, the unchanged failure
message "could not gather facts from the delegation target"; present on
origin/main 63e933e413 at line 250, the plugin has no SQL or database
sink, reviewed with kvb-think-criticize as a false positive.

🎯 Fix: 90 %
💥 Break: 4 %
💸 Cost: –
⏱️ Time: –
🛡️ Security: 100 %
🏆 Score: 86
🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 11:57:39 +00:00
evangelostsak 093da1ad48 Merge remote-tracking branch 'upstream/main' into feature/web-app-openpost
# Conflicts:
#	README.md
#	roles/web-app-pixelfed/files/shell/docker-entrypoint.sh
#	roles/web-app-pixelfed/tasks/02_bootstrap.yml
#	roles/web-app-stalwart/README.md
#	roles/web-app-stalwart/tasks/security.yml
2026-11-09 20:48:02 +01:00
kevinveenbirkenbachandClaude Opus 5.5 b1cf103913 fix(sys-svc-proxy): forward the raw request URI in compose like swarm
A request tail rendered the location as URI part (proxy_pass http://127.0.0.1:<port>/;), which makes nginx forward the normalized, percent-decoded URI. Synapse then checks the X-Matrix signature against a different URI than the origin signed, so every federation invite and join with an encoded room or user id (%21, %3A, %40) failed with 401 Invalid signature on echoserver and galaxyserver since the 2026-10-22 switch of federation onto the shared html location. Compose now renders no URI part for the request tail, the same raw forwarding swarm already does with $request_uri, and the location argument the suffix needed leaves the SPOT.

🎯 Fix: 90 %
💥 Break: 8 %
💸 Cost: –
⏱️ Time: –
🛡️ Security: 100 %
🏆 Score: 83
🚦 Gate: ⛔ break 8 % > 5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 23:55:49 +00:00
evangelostsak 0c69fc82a8 Merge remote-tracking branch 'upstream/main' into feature/web-app-openpost 2026-11-05 17:32:31 +01:00
kevinveenbirkenbachandClaude Opus 5.5 d301a4d3c3 fix(sys-dns-cloudflare-records): root the API constant at /zones
The bare https://api.cloudflare.com/client/v4 answers HTTP 404, so test_urls_reachable failed test-external in run 42056917806. Every request of the plugin goes below /zones; the constant now names that path, which answers 403 (alive for the URL test), and the requested URLs stay byte-identical.

🎯 Fix: 95 %
💥 Break: 1 %
💸 Cost: –
⏱️ Time: –
🛡️ Security: 100 %
🏆 Score: 94
🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:18:01 +00:00
kevinveenbirkenbachandClaude Opus 5.5 5556dabbb8 Merge perf/plugins/template-shallow-shared into feature/store-i18n
- perf/plugins/template-shallow-shared (f974ab3832, 90/3): template_shallow
  moves from web-opt-rdr-domains to plugins/lookup, and the nine template
  lookups of the design, dashboard, logout and matomo injectors render
  through it instead of deep-copying every task variable per call

🎯 Fix: 90 %
💥 Break: 3 %
🌱 Efficiency: –
⚡ Speed: –
🛡️ Security: ~100 %
🏆 Score: 87
🚦 Gate: ✅ 90/5, efficiency and speed <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 12:32:54 +00:00
kevinveenbirkenbachandClaude Opus 5.5 f974ab3832 perf(plugins): share template_shallow and render the front injectors through it
ansible-core's template lookup deep-copies every task variable on each
call. The role-local template_shallow of web-opt-rdr-domains, which hands
the builtin a top-level copy whose values stay shared, moves to
plugins/lookup so every role can use it. The nine template lookups of the
front injectors switch to it: six in sys-front-inj-design and one each in
sys-front-inj-dashboard, sys-front-inj-logout and sys-front-inj-matomo.
None of the switched templates or the lookups they call writes into the
task variables.

Tests:
- the plugin renders like the builtin, never deep-copies the caller's
  values and leaves the caller's variables unchanged
- for every role with design sources, clearnet and onion vhosts, with and
  without a logo, the design facts are identical to the builtin's, or it
  fails with the identical error
- the dashboard, logout and matomo code renders identically
- the redirect loop of web-opt-rdr-domains still renders through the
  shared plugin

The saving per deploy is not measured by a timed deploy yet.

🎯 Fix: 90 %
💥 Break: 3 %
🌱 Efficiency: –
⚡ Speed: –
🛡️ Security: ~100 %
🏆 Score: 87
🚦 Gate: ✅ 90/5, efficiency and speed <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 12:31:23 +00:00
kevinveenbirkenbachandClaude Opus 5.5 d96fe45650 fix(sys-dns-cloudflare-records): keep a record set pending when one entry cannot be judged
cloudflare_records_converged skipped an entry its expected() rejects (a
TXT value given as an int, a ttl of null) when building the per-owner
declarations, yet cloudflare_dns still writes for such an entry. In
[TXT t 12345, TXT t "12345" ttl 300] the second entry was judged
converged and skipped while the first was applied with ttl 1, so the
record flipped on every run. A record set declared more than once now
stays pending as a whole when any of its entries cannot be judged, like
the hazardous solo and absent entries already do. No producer in the
repository builds such a list today.

🎯 Fix: 93 %
💥 Break: 3 %
🌱 Efficiency: –
⚡ Speed: –
🛡️ Security: ~100 %
🏆 Score: 90
🚦 Gate: ✅ 90/5, efficiency and speed <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 11:54:49 +00:00
kevinveenbirkenbachandClaude Opus 5.5 bf1b1f2769 fix(web-app-fider): pass BASE_URL without a trailing slash
Fider v0.39.0 accepts an OAuth redirect only when its origin equals
OAuthBaseURL (isKnownOAuthOrigin compares u.Scheme + "://" + u.Host with
it), and in single-host mode OAuthBaseURL is BASE_URL unchanged. The tls
lookup's url.base ends with "/", so the comparison never matched and
every Keycloak login was rejected. Main run 41925343136 (2df12002c0),
Fider#0 compose clearnet centos/ext4: playwright.spec.js:56 and :88 find
no .c-menu-user after SSO, and the rescue fider.log shows 11x "OAuth
callback state for provider _keycloak points at an unknown origin.
Aborting sign in process." The image is the mirrored getfider/fider
stable, refreshed 35 hours before the run.

The tls lookup now also returns url.origin, the base URL without its
slash (the lookup hunk of 44aaa68924 on feature/store-i18n), and the
Fider env passes it as BASE_URL (d531d35823 there). url.base keeps its
value, so no other consumer changes, and both lines match the
store-i18n side for a conflict-free merge.

| 🎯 Fix | 💥 Break | 🌱 Efficiency | ⚡ Speed | 🛡️ Security | 🏆 Score | Gate |
| --- | --- | --- | --- | --- | --- | --- |
| 88 % | 3 % | – | – | ~100 % | 85 | ⛔ fix 88 % < 90 |

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 11:42:16 +00:00
kevinveenbirkenbachandClaude Opus 5.5 59b46235e8 Merge four operator-approved sidetrees into feature/store-i18n
- fix/svc-prx-openresty/reload-mode-force-leak (7e5da9422c, 90/4):
  OpenResty handlers notified from compose-forced roles (matrix, BBB)
  resolve OpenResty's real address in swarm, so their reloads no longer
  skip, and /logout inside their vhosts no longer points at 127.0.0.1
- perf/sys-dns-cloudflare-records/batch-apply: records the zone already
  holds as declared skip the apply loop (59889bb5af, 92/3), and record
  jobs are polled every second while collecting (f51ab74697, 92/3)
- perf/web-opt-rdr-domains/tls-resolve: redirect vhosts render through
  template_shallow without deep-copying the variables (4a6bec9cf0, 92/3)
- perf/sys-front-inj-design/resolve-setfacts: each role design template
  renders once per include (0d04336f93, 92/3)

The three tunes come from the galaxyserver and echoserver 2fd6c6d deploy
logs; all four passed independent skeptic review.

🎯 Fix: 90-92 %
💥 Break: 3-4 %
🌱 Efficiency: –
⚡ Speed: –
🛡️ Security: ~100 %
🏆 Score: 86-89
🚦 Gate: ✅ 90/5, efficiency and speed <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 11:41:16 +00:00
kevinveenbirkenbachandClaude Opus 5.5 7e5da9422c fix(svc-prx-openresty): resolve OpenResty's own address in handlers notified from forced roles
web-app-matrix (ansible flavor) and web-app-bigbluebutton set
compose_mode_force: compose in their role vars, and those vars stay in
scope when their front-proxy includes notify the OpenResty handlers. In
swarm the handlers' container_address lookup then returned the bare
compose name, the validate retried for about 35 s against a container
that does not exist and ended ok, and the reload was skipped: 3 of 52
reloads in the WordPress#0 job of fork run 41926377524 (both matrix
.onion vhosts), so changed vhosts stayed unserved.

The validate, reload and restart handler tasks now clear
compose_mode_force at task level (task vars outrank the inherited role
vars), as the engine, rdbms and objstore entry points already do, and so
do the svc-db-openldap handlers, which the new lint also covers. The
proxy_pass lookup applies a caller's override only when the term names
the scope's own application_id, because the /logout location rendered
inside matrix and BBB vhosts pointed at 127.0.0.1 in swarm.

A real ansible-playbook integration test proves both modes and fails
without the fix; the new lint keeps every handler lookup of a fixed role
clearing the override.

🎯 Fix: 90 %
💥 Break: 4 %
🌱 Efficiency: –
⚡ Speed: –
🛡️ Security: ~100 %
🏆 Score: 86
🚦 Gate: ✅ 90/5, efficiency and speed <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 11:40:41 +00:00
kevinveenbirkenbachandClaude Opus 5.5 59889bb5af perf(sys-dns-cloudflare-records): skip records the zone already holds as declared
Every deploy sent each declared record through cloudflare_dns, one async
job per record, although nearly all of them already stood unchanged; the
galaxyserver 2fd6c6d deploy spent about two minutes collecting them.

A new action plugin, cloudflare_records_converged, reads each zone once
(all pages) and splits the declared records into pending and converged.
It judges A, AAAA, CNAME, MX, TXT and SRV with the same lookup key and
the same defaults the community.general 14.0.0 module applies; every
other type, every solo or absent entry, and every record set whose
entries would undo each other stay pending, as do all records of a zone
that cannot be read (with a warning). Only pending records reach the
unchanged apply and retry loop, so failures stay per record and loud.

The test pins the plugin's defaults against the module's argument_spec
and the reviewed collection version, and covers the hazardous groups
with a mutation check.

🎯 Fix: 92 %
💥 Break: 3 %
🌱 Efficiency: –
⚡ Speed: –
🛡️ Security: ~100 %
🏆 Score: 89
🚦 Gate: ✅ 90/5, efficiency and speed <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 11:18:57 +00:00
kevinveenbirkenbachandClaude Opus 5.5 a643871997 perf(stack-host-copy): write a changed tree in one transfer
When the tree check finds differing entries, pack exactly the differing files into one tar archive in source walk order, transfer it once into the remote tmpdir and let the new copy_batch module write each file through atomic_move with the copy module's directory, mode and unsafe_writes semantics. Mode-only drift and leaf directories settle in the same call; unchanged files are not sent.

Every shape the regular copy treats differently makes the module refuse before it writes: a symlink, directory or other non-regular entry at a destination, a missing path below a non-directory or a symlink loop, and two source paths reaching one remote entry. The regular copy then runs. Check mode, diff mode, unprivileged become, a dest holding $ and an archive above 16 MiB keep the regular copy. A write failure fails the task and names the file.

Executed with ansible-playbook -c local, pipelining on and off: the trees this action leaves equal the builtin copy's, including the symlink fallback; a 6-file changed tree took 2 module calls and 1 transfer instead of 14 and 4. Unit: a flat 15-file tree with every file changed drops from 31 module calls and 15 transfers to 2 and 1. Two dialectic rounds with three independent skeptics; every hole they found is fixed and tested. A third independent review compared end state, changed, check and diff mode against the builtin copy in a real playbook run and found them equal; one deliberate difference remains: a write failing partway reports changed=true with the files already written, where the builtin copy reports changed=false.

| 🎯 Fix | 💥 Break | 🌱 Efficiency | ⚡ Speed | 🛡️ Security | 🏆 Score | Gate |
| --- | --- | --- | --- | --- | --- | --- |
| 90 % | 2 % | 100 % | 15 % (estimated from round trips) | ~100 % | 100 | ⏳ score passes, gate.py not run |

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 11:06:49 +00:00
kevinveenbirkenbachandClaude Opus 5.5 01e27bfddb fix(sys-front-inj-design): store and link the role stylesheet per network
The design inject renders a role's style.css once per vhost but copied every
render to one shared CDN path, so the last render won. xwiki's stylesheet
embeds its own origin; on a multi-network node the onion render landed last
and every clearnet page loaded onion URLs, failing network-leak.spec.js
whenever the pass picked clearnet.

The first network keeps style.css, every further network gets
<label>-style.css (onion-style.css), keyed by the same rule the tls lookup
uses for the render (serving_network), and each vhost links its own file.
Single-network roles keep the exact old path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 10:46:58 +01:00
kevinveenbirkenbachandClaude Opus 5.5 be60486fc4 perf(stack_host_copy): settle trees with empty leaf directories in the one-call check
Development worktrees carry empty .claude/.cc-writes directories in role source trees; the one-call unchanged check gave up on any directory without files, so the docs tooling copy fell back to per-file stat and copy round trips (about 56 s on the echoserver production deploy). file_checksums now also reports directories (isdir, mode), and the check asks for every leaf directory in the same remote call: it settles only when each leaf exists as a real directory and, when directory_mode is set, carries exactly that mode. With directory_mode unset the stock copy would not touch an existing directory either (file module with mode None). A missing directory, a mode mismatch, a file or symlink in its place, or a symbolic directory_mode with leaves still runs the regular copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 20:04:23 +01:00
kevinveenbirkenbachandClaude Opus 5.5 e3ffa80c11 perf(stack_host_copy): leave Python bytecode caches out of directory copies
Source trees in a development worktree carry __pycache__ next to their sources (web-app-docs python/: 76 .pyc beside 42 .py). They defeated the one-call unchanged check and were copied file by file over SSH; on the echoserver production deploy the docs tooling staging took 155.9 s at about 1.27 s per file. The plugin now walks the tree without __pycache__ for both the unchanged check and the stock copy, which reads _walk_dirs as a module global; the swap is restored in finally and each task runs in its own forked worker. Sourceless .pyc outside a cache directory stay in the copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 19:04:11 +01:00
kevinveenbirkenbachandClaude Opus 5.5 77cab6e40b perf(svc-swarm-node): read the ingress ports and the node addresses in one shell
The ingress guard read ran two remote shells per swarm deploy, each asking container info again (WordPress#0 run 41303726270: 66 s + 61 s over 64 calls each). One shell now prints 'port <json>' and 'node <address>' lines into swarm_ingress_read; the new swarm_ingress_sections filter splits them by tag and raises on any untagged line, and SWARM_INGRESS_GUARDED and SWARM_INGRESS_PEERS read their section, so the guarded set, the peers, the firewall digest and the ruleset stay the same. A test ties the --format tags in read.yml to the sections the filter knows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 16:38:05 +01:00
kevinveenbirkenbachandClaude Opus 5.5 a3cb439a68 fix(constructor): stop the disk pre-flight only when a full filesystem also lacks absolute room
The pre-flight stopped every deploy on a filesystem above SIZE_PERCENT_MAXIMUM_DISK_USAGE, which blocked a 1.8 TB workstation at 99 % with 30 GB free while a 145 GB runner was fine. A filesystem now fails only when it is above the percentage AND offers less than SIZE_GB_MINIMUM_DISK_FREE (20 GB): disk_usage_errors reads df's available column, the preflight_disk_usage filter passes the floor, and disk.yml runs df -P -k so the block unit stays KiB even under POSIXLY_CORRECT.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 16:10:34 +01:00
kevinveenbirkenbachandClaude Opus 5.5 a67dd9b372 feat(constructor): stop a deploy in a pre-flight when the host cannot carry it
The constructor now runs tasks/utils/constructor/preflight.yml before the package install and fails with a named remedy when: the running kernel has no module index on disk or the clock is not synchronised (chrony leap status, else timedatectl, outside containers); / or the docker root is fuller than SIZE_PERCENT_MAXIMUM_DISK_USAGE (90); a docker network contradicts the entity that declares it (name, compose project label, subnet outside its block, overlap with another declared subnet); a declared container lacks or a declared volume carries a foreign entity label; a docker default address pool overlaps the mesh, Tor or a declared subnet; a host process outside docker holds a public port of the deploy; or, in assert mode, a clearnet domain of the deploy does not resolve.

A volume without any label passes, since compose adopts it and installs before this change created the Synapse volume with docker run. web-app-discourse declares its launcher-started containers through networks.local.launcher, and web-app-matrix labels a new Synapse volume with its compose project.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 13:38:15 +01:00
kevinveenbirkenbachandClaude Opus 5.5 e91117e421 perf(stack_host_copy): settle an unchanged directory copy in one remote call
Ansible's copy action runs one stat and one file module per file of a
directory source even when nothing changed, about 0.6 s each over SSH.
The echoserver deploy paid it on 31 branding renders and the docs
tooling tree (~770 s and 169.5 s, deploy -9). Before falling through to
the stock copy, hash the tree locally and compare it with one
file_checksums call on the target; when every file matches in type,
content and mode, return the stock copy's unchanged result. Any
difference, symlink, empty directory, owner or symbolic mode falls
through to the stock copy unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 16:35:01 +01:00
kevinveenbirkenbachandClaude Opus 5.5 ad86cb7a3a fix: satisfy the gate-32 lints in the Cloudflare retry and email provider-view changes
The Cloudflare request timeout, attempt deadline, collect deadline and retry delay now scale through lookup('timeout', ...) together, so a raised TIMEOUT_FACTOR keeps them consistent; the deadline task name fits 80 characters; test_async_retry_split reads the role defaults through PROJECT_ROOT, ROLE_FILE_DEFAULTS_MAIN and load_yaml. The provider-view helpers move from plugins/lookup/email.py (531 lines) to utils/mail/provider_view.py; provider_view_carrier stays in the lookup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 10:36:38 +01:00
kevinveenbirkenbach 134b22a30f Merge branch 'fix/sys-dns-cloudflare-records/async-hang' into feature/store-i18n 2026-11-01 10:17:37 +01:00
kevinveenbirkenbachandClaude Opus 5.5 99de0c15e9 fix(sys-dns-cloudflare-records): bound each record job and retry only transient failures
A filesystem stall killed a Cloudflare record job before async_wrapper saw its start notice (Broken pipe), and the shared reap masked it. Each record job now has a request timeout and an attempt deadline; judge.yml reaps every job of an attempt and async_retry_split sorts the failures: hangs, timeouts, connection errors, 429 and 5xx get up to cloudflare_attempts tries, anything else fails at once and names its record. An answer that says the record already stands counts as done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 10:13:49 +01:00
kevinveenbirkenbachandClaude Opus 5.5 a29483244d perf(email): park the provider-view render once per play on non-provider hosts
On swarm workers and the nfs-server, every full lookup('email') rendered the whole applications tree again (about 20 s per task, 8 tasks per CI run, Nextcloud#7 of run 41261531965), because the provider host's carrier is keyed on the full applications inventory and each mesh member carries its own wireguard interface there. The stage-wide applications_carrier park now also parks the provider view (this host's variables under the provider host's group_names and NETWORK_MODE) on hosts that are not the onion-serving provider host, keyed like the applications carrier plus [provider host, NETWORK_MODE]; lookup('email') serves it only on an exact match and renders fresh otherwise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 10:11:30 +01:00
kevinveenbirkenbachandClaude Opus 5.5 b386119642 perf(email): resolve only the requested key in lookup('email')
Every lookup('email') resolved all 15 settings. On swarm workers and the nfs-server of Tor rows that took 22-26 s per call, even for tasks that only read external or timeout and then skip (CI run 41261531965, Nextcloud#7: ~600 s over both passes, the job ran out of its budget). The lookup takes key= now and stops after that entry; the four call sites and mail_recipient that need only external or timeout use it. Without key= the result is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 09:19:28 +01:00