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

ios: snapshot --observe-only can label a substituted system-alert tree as an app observation

Abierto
#3,348 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
40/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
ios, swift
Área
mobile

Línea de trabajo

Start in RunnerTests+SnapshotExecution.swift, where the observe-only branch sets payload.observation after the ordinary capture, then check RunnerTests+Snapshot.swift to see where snapshotFast returns the SpringBoard alert tree. Choose refuse or disclose, keyed on the tier or provenance the capture returns, and reuse observeOnlyUnavailableResponse() if refusing. Done when a unit test using systemModalProbeOverrideForTesting shows an observe-only snapshot with a presented alert never carries observation, and the observe-only guarantee wording is updated.

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

Descripción

bug ready-for-agent

Follow-up to #3108 (merged 2026-10-08), from the #3106 decision.

Problem

snapshot --observe-only stamps observation (an app observation made without activating the app) on a payload that may not come from the app.

RunnerTests+SnapshotExecution.swift runs the ordinary capture first (snapshotFast / snapshotRaw), then checks only that target.app.state == .runningForeground and that the process identifier is unchanged, and then sets payload.observation. But snapshotFast (RunnerTests+Snapshot.swift) first calls boundedBlockingSystemAlertSnapshot(...) and returns the SpringBoard alert tree in place of the app's tree when one is presented. The post-capture check can still pass, because a system alert doesn't change the app's process and #2696 shows XCUIApplication.state can report foreground while another surface is in front. The result is a system-alert tree labelled as an observe-only capture of the app.

The default (non-observe-only) path is fine: it discloses the substitution through systemSurface provenance. The defect is only that the observe-only contract asserts app provenance without checking which tier produced the payload.

Required behavior

Pick one, and encode it in the observe-only branch:

  • Refuse: when the capture tier substituted a system-alert or system-surface payload, return the typed observe-only-unavailable response (the existing observeOnlyUnavailableResponse()), or
  • Disclose: keep the payload but omit observation and carry the substitution provenance, so a caller can't read the payload as an app observation.

Key the decision on the tier or provenance the capture returns, not on payload contents or message text.

Done when

  • A runner unit test using systemModalProbeOverrideForTesting shows an observe-only snapshot with a presented system alert never carries observation alongside the alert tree.
  • The interaction or observation guarantee wording for observe-only states the chosen behavior.
Lenguaje dominante
TypeScript
Estrellas
5.1k
Forks
339
Merge medio
12 h 50 min
PR fusionados (30 d)
632

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 callstack/agent-device

Todos los issues de callstack/agent-device

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.