Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#3,348 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
40/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
ios, swift
Ambito
mobile

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
TypeScript
Stelle
5.1k
Fork
339
Merge medio
12h 50m
PR unite (30g)
632

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di callstack/agent-device

Tutte le issue di callstack/agent-device

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.