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>
This commit is contained in:
kevinveenbirkenbachandClaude Opus 5 committed 2026-10-04 01:57:17 +02:00
commit f2fedfc677
351 files changed
+9968 -416

No files matched your search

@@ -204,6 +204,43 @@ class TestTemplatingRenderStrict(unittest.TestCase):
)
self.assertEqual(out, ca_cert_host("infinito.nexus"))
def test_inline_conditional_with_concat(self):
raw = (
"{{ ('mail.' ~ DOMAIN_PRIMARY) if MAIL_PROVIDER == 'web-app-mailu' "
"else ('legacy-mail.' ~ DOMAIN_PRIMARY) }}"
)
base = {"DOMAIN_PRIMARY": "example.com"}
self.assertEqual(
render_ansible_strict(
templar=None,
raw=raw,
var_name="x",
err_prefix="t",
variables={**base, "MAIL_PROVIDER": "web-app-mailu"},
),
"mail.example.com",
)
self.assertEqual(
render_ansible_strict(
templar=None,
raw=raw,
var_name="x",
err_prefix="t",
variables={**base, "MAIL_PROVIDER": "web-app-stalwart"},
),
"legacy-mail.example.com",
)
self.assertEqual(
render_ansible_strict(
templar=None,
raw=raw,
var_name="x",
err_prefix="t",
variables=base,
),
"legacy-mail.example.com",
)
def test_filters_lower_upper_default(self):
variables = {"NAME": "MiXeD", "EMPTY": ""}
out1 = render_ansible_strict(
@@ -0,0 +1,94 @@
# Ensure repo root is importable so `utils.*` resolves in all runners
import sys
import unittest
from . import PROJECT_ROOT
sys.path.insert(0, str(PROJECT_ROOT))
from utils.templating.expr import (
find_top_level_op,
is_paren_wrapped,
split_list_items,
split_top_level,
)
class TestSplitListItems(unittest.TestCase):
def test_bare_and_quoted_tokens(self):
self.assertEqual(
split_list_items("DIR_BIN, 'ca-inject'"), ["DIR_BIN", "'ca-inject'"]
)
def test_comma_inside_quotes_is_not_a_separator(self):
self.assertEqual(split_list_items("'a,b', c"), ["'a,b'", "c"])
def test_mixed_quote_styles(self):
self.assertEqual(split_list_items("\"x\", 'y'"), ['"x"', "'y'"])
def test_empty_and_whitespace_tokens_dropped(self):
self.assertEqual(split_list_items(" a ,, b , "), ["a", "b"])
def test_empty_string(self):
self.assertEqual(split_list_items(""), [])
class TestFindTopLevelOp(unittest.TestCase):
def test_finds_operator_at_depth_zero(self):
self.assertEqual(find_top_level_op("A == B", "=="), 2)
def test_skips_operator_inside_parens(self):
expr = "(A == B) != C"
self.assertEqual(find_top_level_op(expr, "!="), expr.index("!="))
self.assertEqual(find_top_level_op("(A == B)", "=="), -1)
def test_skips_operator_inside_quotes(self):
expr = "'x == y' == Z"
self.assertEqual(find_top_level_op(expr, "=="), 9)
def test_word_operator_padded_with_spaces(self):
"""A padded ` if ` must not match inside identifiers like `notify`."""
self.assertEqual(find_top_level_op("gift if COND else b", " if "), 4)
self.assertEqual(find_top_level_op("gifted", " if "), -1)
def test_not_found(self):
self.assertEqual(find_top_level_op("A ~ B", "=="), -1)
def test_bracket_kinds_all_count_as_depth(self):
self.assertEqual(find_top_level_op("[a == b] == c", "=="), 9)
self.assertEqual(find_top_level_op("{a == b} == c", "=="), 9)
class TestSplitTopLevel(unittest.TestCase):
def test_simple_split(self):
self.assertEqual(split_top_level("a ~ b ~ c", "~"), ["a ", " b ", " c"])
def test_separator_inside_quotes_kept(self):
self.assertEqual(split_top_level("'a ~ b' ~ c", "~"), ["'a ~ b' ", " c"])
def test_separator_inside_parens_kept(self):
self.assertEqual(split_top_level("(a ~ b) ~ c", "~"), ["(a ~ b) ", " c"])
def test_no_separator_returns_whole(self):
self.assertEqual(split_top_level("abc", "~"), ["abc"])
class TestIsParenWrapped(unittest.TestCase):
def test_fully_wrapped(self):
self.assertTrue(is_paren_wrapped("(a ~ b)"))
def test_adjacent_groups_are_not_wrapped(self):
self.assertFalse(is_paren_wrapped("(a) ~ (b)"))
def test_no_parens(self):
self.assertFalse(is_paren_wrapped("a ~ b"))
def test_nested_wrap(self):
self.assertTrue(is_paren_wrapped("((a) ~ (b))"))
def test_close_paren_inside_quotes_ignored(self):
self.assertTrue(is_paren_wrapped("(a ~ ')' ~ b)"))
if __name__ == "__main__": # pragma: no cover
unittest.main()