Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

platform-ios: reduce XCTest agent per-tick cost on constrained hosts

Abierto
#188 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
52/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
ios, swift, typescript

Línea de trabajo

Empieza por el bucle de tick en HarnessXCTestAgentUITests.swift y PermissionPromptWatchdog.swift; después, sigue configurePermissions y ensureStarted en xctest-agent.ts. Lee xctest-agent-capabilities.ts para entender los datos de capacidades del host y la ruta existente de HARNESS_XCTEST_AGENT_TICK_INTERVAL_MS. El trabajo estará terminado cuando el watchdog evite snapshots innecesarios, el sondeo de permisos espere a que la aplicación esté lista y los hosts con recursos limitados usen un intervalo adaptativo sin romper el flujo existente.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement

Context

Harness runs unreliably on small CI hosts (e.g. GitHub macos-latest: 3 vCPU / 7 GB). One constant source of load inside the simulator is the XCTest agent's tick loop.

Every tick (default 1 s, HarnessXCTestAgentUITests.swift testAgentSession) does:

  • observeTargetApplication() → targetApplication.state query
  • PermissionPromptWatchdog.tick() → springboard.buttons.matching(NSPredicate(label IN ...)).firstMatch.exists

The SpringBoard query is a full accessibility-tree snapshot served by testmanagerd, so the sim pays for an AX snapshot every second for the whole run — including during the app's launch/connect window, which is exactly when the host is most starved. configurePermissions is sent right at ensureStarted (packages/platform-ios/src/xctest-agent.ts), so auto-accept polling is active before the app under test has even been launched.

Proposal

  1. Only run the watchdog query when the target app is .runningForeground (skip while it is not running / launching).
  2. Defer enabling autoAcceptPermissions until the app has reported ready over the bridge, rather than at agent start.
  3. Make the tick interval host-adaptive: the CLI already forwards HARNESS_XCTEST_AGENT_TICK_INTERVAL_MS; derive a default (e.g. 2–3 s) from getHostCapabilities() on constrained hosts instead of the fixed 1 s.
  4. Cheapen the probe: check springboard.alerts.firstMatch.exists first and only enumerate buttons when an alert is present.

Files

  • packages/platform-ios/xctest-agent/HarnessXCTestAgentUITests/HarnessXCTestAgentUITests.swift
  • packages/platform-ios/xctest-agent/HarnessXCTestAgentUITests/PermissionPromptWatchdog.swift
  • packages/platform-ios/src/xctest-agent.ts (getLaunchEnvironment, ensureStarted)
  • packages/platform-ios/src/xctest-agent-capabilities.ts

Part of a broader effort to make Harness reliable on constrained CI runners.

Lenguaje dominante
TypeScript
Estrellas
330
Forks
17
Merge medio
8 d 11 h
PR fusionados (30 d)
2

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de callstackincubator/react-native-harness

Todos los issues de callstackincubator/react-native-harness

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.