Skip to content

ci: make CameraController Harness runs report deterministically#4003

Draft
mrousavy wants to merge 6 commits into
mainfrom
fix/harness-controller-shard-files
Draft

ci: make CameraController Harness runs report deterministically#4003
mrousavy wants to merge 6 commits into
mainfrom
fix/harness-controller-shard-files

Conversation

@mrousavy
Copy link
Copy Markdown
Owner

@mrousavy mrousavy commented Jun 5, 2026

Summary

This branch is about CI/Harness reporting, not making failing assertions green.

  • Split the monolithic CameraController Harness suite into focused files: zoom, torch, exposure, and metering.
  • Keep the same controller test bodies/assertions so individual failures still make CI red.
  • Fix Android setExposureBias(...) so the native Promise does not wait for CameraX AE convergence after CameraX has already accepted/reflected the compensation index. This made the Android exposure shard report instead of hanging the suite.
  • Keep iOS Jest --forceExit so the testspec returns after Harness/Jest completes.
  • Collect the non-empty iOS .harness artifact root instead of the optional .harness/crash-reports leaf. Green iOS runs were still red because Device Farm failed to attach the empty crash-report directory.
  • Add Device Farm artifact diagnostics so wrapper failures print Harness output, test spec output, customer artifact logs, and XCTest logs when present.

CI evidence so far

  • Run 27025967535 / Android at 75a1ba33: all 15 suites reported. The controller shards all passed. CI stayed red only because real photo/coordinates/video tests failed.
  • Run 27025967535 / iOS attempt 3 at 75a1ba33: all 15 Harness suites passed, but Device Farm marked the wrapper failed. Customer artifact logs show Failed to attach directory .../.harness/crash-reports because it is empty, which this branch now fixes by collecting .harness instead.

Verification

  • Matched old/new controller test titles: 19 before, 19 after; 2 skipped before, 2 skipped after.
  • bunx biome check --write apps/simple-camera/__tests__/README.md apps/simple-camera/__tests__/visioncamera.controller.*.harness.ts
  • bunx biome check --write apps/simple-camera/__tests__/visioncamera.controller.exposure.harness.ts .github/actions/collect-devicefarm-results/action.yml .github/workflows/harness-aws-device.yml
  • ruby -e 'require "yaml"; YAML.load_file("apps/simple-camera/device-farm-tests/AwsTestSpecIOS.yml"); puts "ok"'
  • git diff --check

Notes:

  • bunx tsc -p apps/simple-camera/tsconfig.json --noEmit still fails on the existing visioncamera.barcode-scanner.harness.ts scanCodesInImageAsync type issue; this branch does not touch that file.
  • Local Android Kotlin compile could not run because this machine has no Java runtime installed.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-native-vision-camera-docs Ready Ready Preview, Comment Jun 5, 2026 5:51pm

Request Review

@mrousavy mrousavy changed the title test: shard CameraController Harness tests ci: make CameraController Harness runs report deterministically Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant