Ariver
2026-06-19 5ca15477a3f2fe590526bc5845482003683c3c29
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env bash
set -euo pipefail
 
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
CONTENT_VIEW_SWIFT="$ROOT_DIR/Apptag/ContentView.swift"
 
fail() {
  printf 'FAIL: %s\n' "$*" >&2
  exit 1
}
 
[[ -f "$CONTENT_VIEW_SWIFT" ]] || fail "missing ContentView.swift"
 
python3 - "$CONTENT_VIEW_SWIFT" <<'PY'
import pathlib
import re
import sys
 
content = pathlib.Path(sys.argv[1]).read_text(encoding="utf-8")
 
 
def fail(message: str) -> None:
    print(f"FAIL: {message}", file=sys.stderr)
    sys.exit(1)
 
 
def require(pattern: str, source: str, message: str) -> None:
    if not re.search(pattern, source, re.S):
        fail(message)
 
 
require(
    r"if\s+shouldRenderAppGridBehindQuickSearch\s*\{\s*"
    r"VisualEffectView\(material:\s*\.contentBackground,\s*blendingMode:\s*\.behindWindow\)"
    r"(?P<body>.*?)\.ignoresSafeArea\(\)"
    r"(?P<body2>.*?)\.allowsHitTesting\(false\)",
    content,
    "App Grid must use a non-interactive contentBackground material behind all content",
)
 
if re.search(
    r"if\s+shouldRenderAppGridBehindQuickSearch\s*\{\s*"
    r"VisualEffectView\(material:\s*\.hudWindow,\s*blendingMode:\s*\.behindWindow\)",
    content,
    re.S,
):
    fail("App Grid background must not regress to hudWindow material")
 
print("PASS: App Grid material background semantics are guarded")
PY