Files
schihei 0ab5ae78bf feat(m7-m8): evaluation harness, privacy self-test, localisation and release
M7: corpus manifest loader/validation, chrF/BLEU/token/numeric metrics, raw-output and report.md/report.json writer, and sprachmittler-cli languages/detect/eval. A synthetic 4-segment run with the 7B validated the harness; the private-corpus and 1.8B evaluation and the default-model ADR remain open.

M8: privacy-check root fixture + seeded self-test wired into make verify; English/German localisation for the app shell; end-user USER_GUIDE; release.sh (unsigned archive, Developer ID sign, notarise/staple, DMG, --dry-run); idle CPU/memory and warm 7B measurements in PERFORMANCE.

Docs: PROGRESS M7–M8, MODEL_EVALUATION results log/gate status, PERFORMANCE measurements, TESTING evaluation cases, ADR-008 status. Compatibility/VoiceOver/notarisation gates remain manual.

Verified: make verify green (format, strict lint, privacy self-test, Debug+Release signatures, 227 package tests); CLI languages/detect/eval run; release dry-run.
2026-11-26 14:16:21 +01:00

57 lines
2.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Full verification gate. Must be green before a task is marked done (AGENTS.md).
set -euo pipefail
cd "$(dirname "$0")/.."
PKG=Packages/SprachmittlerKit
step() { printf '\n\033[1m▶ %s\033[0m\n' "$*"; }
step "Format check"
if command -v swiftformat >/dev/null; then swiftformat App "$PKG" --lint; else echo "skip: swiftformat not installed"; fi
step "Lint"
if command -v swiftlint >/dev/null; then swiftlint lint --strict --quiet App "$PKG/Sources" "$PKG/Tests"; else echo "skip: swiftlint not installed"; fi
step "Shell syntax"
for f in scripts/*.sh; do bash -n "$f"; done
echo "✓ scripts parse"
step "JSON and plist syntax"
for f in opencode.json evaluation/corpus.schema.json evaluation/corpus.example.json; do
jq -e . "$f" >/dev/null
done
plutil -lint App/Info.plist App/Sprachmittler.entitlements >/dev/null
for f in App/Resources/*.lproj/Localizable.strings; do plutil -lint "$f" >/dev/null; done
echo "✓ JSON and plists parse"
step "Privacy checks"
scripts/privacy-check.sh
scripts/privacy-self-test.sh
step "Package build"
swift build --package-path "$PKG"
step "Package tests"
swift test --package-path "$PKG" --skip SprachmittlerLiveTests
step "App build"
if command -v xcodegen >/dev/null && command -v xcodebuild >/dev/null; then
xcodegen generate --spec project.yml --quiet
xcodebuild -project Sprachmittler.xcodeproj -scheme Sprachmittler -configuration Debug \
-derivedDataPath .build/xcode -destination 'platform=macOS,arch=arm64' -quiet build
scripts/check-signature.sh .build/xcode/Build/Products/Debug/Sprachmittler.app debug
else
echo "skip: xcodegen/xcodebuild not available (make bootstrap)"
fi
step "Release build and signature"
if command -v xcodegen >/dev/null && command -v xcodebuild >/dev/null; then
xcodebuild -project Sprachmittler.xcodeproj -scheme Sprachmittler -configuration Release \
-derivedDataPath .build/xcode-release -destination 'platform=macOS,arch=arm64' -quiet build
scripts/check-signature.sh .build/xcode-release/Build/Products/Release/Sprachmittler.app release
else
echo "skip: xcodegen/xcodebuild not available (make bootstrap)"
fi
printf '\n\033[32m✔ verify passed\033[0m\n'