π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Minor script improvements
laurenspriemfa1cef177380
diff --git a/infra/ml/ml-indexing-parity-test-plan.md b/infra/ml/ml-indexing-parity-test-plan.mdindex c38a3d2e4e..7eedbffac4 100644--- a/infra/ml/ml-indexing-parity-test-plan.md+++ b/infra/ml/ml-indexing-parity-test-plan.md@@ -268,7 +268,8 @@ Flags:2. `--platforms all|desktop|android|ios`3. `--update-golden`4. `--fail-on-missing-platform`-5. `--output-dir ...`+5. `--allow-empty-comparison` (optional override when intentionally running without any platform outputs)+6. `--output-dir ...`Target runtime: 10-20 minutes for full local run (with caching).@@ -315,5 +316,6 @@ No automatic run for unrelated PRs.## Assumptions and Defaults1. Corpus is maintained in `ente-io/test-fixtures` at `ml/indexing/v1`; `run_suite.sh` downloads fixture files to `infra/ml/test_data/ml-indexing/v1` using each manifest item's `source_url`.2. Parity outputs are runtime artifacts and are not committed; `run_suite.sh` regenerates them on each run.-3. Mobile behavior is the setup reference for ground-truth implementation details in this phase.-4. Missing local platform support is reported clearly by default, not automatically fatal unless strict mode is enabled.+3. `run_suite.sh` fails if zero platform outputs are available for comparison, unless `--allow-empty-comparison` is passed.+4. Mobile behavior is the setup reference for ground-truth implementation details in this phase.+5. Missing local platform support is reported clearly by default, not automatically fatal unless strict mode is enabled.diff --git a/infra/ml/tools/run_suite.sh b/infra/ml/tools/run_suite.shindex 2601473081..3c21bdd1ca 100755--- a/infra/ml/tools/run_suite.sh+++ b/infra/ml/tools/run_suite.sh@@ -10,6 +10,7 @@ SUITE="smoke"PLATFORMS="all"UPDATE_GOLDEN=falseFAIL_ON_MISSING_PLATFORM=false+ALLOW_EMPTY_COMPARISON=falseOUTPUT_DIR="$ROOT_DIR/infra/ml/out/parity"usage() {@@ -21,6 +22,7 @@ Flags:--platforms all|desktop|android|ios--update-golden--fail-on-missing-platform+ --allow-empty-comparison--output-dir <path>EOF}@@ -43,6 +45,10 @@ while (($# > 0)); doFAIL_ON_MISSING_PLATFORM=trueshift;;+ --allow-empty-comparison)+ ALLOW_EMPTY_COMPARISON=true+ shift+ ;;--output-dir)OUTPUT_DIR="$2"shift 2@@ -66,6 +72,7 @@ fimkdir -p "$OUTPUT_DIR"OUTPUT_DIR="$(cd "$OUTPUT_DIR" && pwd -P)"PYTHON_OUTPUT_DIR="$OUTPUT_DIR/python"+rm -rf "$PYTHON_OUTPUT_DIR"mkdir -p "$PYTHON_OUTPUT_DIR"echo "Running ML parity suite"@@ -96,7 +103,19 @@ while IFS=$'\t' read -r source_rel source_url source_sha; domv "$tmp_path" "$target_path"if [[ -n "$source_sha" ]]; then- actual_sha="$(shasum -a 256 "$target_path" | awk '{print $1}')"+ actual_sha="$(+ python3 - "$target_path" <<'PY'+import hashlib+import sys++path = sys.argv[1]+digest = hashlib.sha256()+with open(path, "rb") as file:+ for chunk in iter(lambda: file.read(1024 * 1024), b""):+ digest.update(chunk)+print(digest.hexdigest())+PY+ )"if [[ "$actual_sha" != "$source_sha" ]]; thenecho "SHA-256 mismatch for $source_rel: expected $source_sha got $actual_sha" >&2exit 1@@ -140,6 +159,13 @@ case "$PLATFORMS" in;;esac+echo "Clearing stale platform output directories"+for platform in "${selected_platforms[@]}"; do+ platform_dir="$OUTPUT_DIR/$platform"+ rm -rf "$platform_dir"+ mkdir -p "$platform_dir"+done+declare -a compare_args=()missing_platform_count=0@@ -159,6 +185,15 @@ if $FAIL_ON_MISSING_PLATFORM && ((missing_platform_count > 0)); thenexit 1fi+if ((${#compare_args[@]} == 0)); then+ if $ALLOW_EMPTY_COMPARISON; then+ echo "No platform outputs available; continuing because --allow-empty-comparison is set"+ else+ echo "No platform outputs available for comparison. Provide at least one platform result or use --allow-empty-comparison." >&2+ exit 1+ fi+fi+compare_output="$OUTPUT_DIR/comparison_report.json"compare_cmd=(uv run --project "$ML_DIR" --no-sync python "$ML_DIR/tools/compare_parity_outputs.py"