Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#3,348 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
40/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
ios, swift
Lĩnh vực
mobile

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
TypeScript
Star
5.1k
Fork
339
Merge trung bình
12 giờ 50 phút
Pull request đã merge (30 ngày)
632

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của callstack/agent-device

Tất cả issue của callstack/agent-device

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.