Route snapshot capture sources through one platform-neutral router
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 5/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- android, ios, macos, typescript
調査の方向性
Start with the iOS route core in packages/platform-apple/src/snapshot-route.ts and its failure policy in snapshot-route-failure-policy.ts, then the constant ports in packages/platform-apple/src/runner-runtime.ts. The ADR decision on Android's system-UI annotation and SurfaceProof must land before any code moves, and the work is blocked by #4182 on unmerged runner layers. Done means one router in packages/capture-kit serves all channels, with no constant-filled ports and the existing route tests passing unchanged.
索引モデルが issue の本文から書いたものです。
説明
Purpose
Snapshot capture source selection must be one product rule for every platform and provider. Today the rule exists only for iOS, in packages/platform-apple/src/snapshot-route.ts, and each channel fills the route's ports with placeholders. Android, macOS, web, WebDriver and Revyl each have one hard-wired source with no shared fallback, refusal or proof vocabulary. Producer facts live in about six owners.
Current state (evidence)
- The iOS route core:
packages/platform-apple/src/snapshot-route.ts(probes, target resolution, acquisition, one fallback, identity stamping, warnings) andsnapshot-route-failure-policy.ts(refusal scope). - The runner channel (#4182) fills the route's ports with constants:
isDiscoveryPending: () => false,targetFreshness: 'cached',systemSurfacePresent: async () => 'unknown'(packages/platform-apple/src/runner-runtime.ts). The route reads them atsnapshot-route.ts(discovery wait, cached-target refresh, presence probe). - Eligibility is split:
isEligiblein the route, the observe-only bypass inrunner-runtime.tsbindBridgeSnapshot, and thepreferredBackendverdict pin inpackages/capture-kit/src/snapshot-quality-verdict.ts→stable-capture.ts. - Producer facts:
packages/contracts/src/ios-snapshot.ts, three producer-keyed tables inpackages/capture-kit/src/ios-snapshot-acquisition.ts,packages/kernel/src/snapshot.ts(SnapshotProvenance),packages/command-runtime/.../stable-capture.ts, producer switches inpackages/command-runtime/src/commands/capture/runtime/snapshot.ts. Revyl's Android tree is labeledappium-source, the same name WebDriver uses for iOS. - Single-source platforms: Android
packages/platform-android/src/snapshot-capture.ts, macOSpackages/platform-apple/src/os/macos/surface-snapshot.ts, Revylpackages/provider-revyl/src/snapshot.ts, WebDriverpackages/provider-webdriver/src/webdriver-ios-snapshot.ts. validateTargetis duplicated insnapshot-source/adapter.tsandrunner-snapshot-bridge.ts. Three fallback settlers exist:runFallback,runSurfaceFallback,captureOffRoute.- ADR 0004 is about 60 KB.
docs/adr/FORMAT.mdasks for about 8 KB.
Required behavior
-
A new ADR, "Snapshot capture source routing", states the rule for all platforms. ADR 0004 keeps only the iOS facts (bridge, runner plan, system-surface hosts) and drops its amendment history.
-
One platform-neutral router in
packages/capture-kitowns: the source plan (plan(input)returns the source and the reason), one fallback per capture, the per-target generation circuit, the refusal table (capture scope vs generation scope), occlusion proof, identity stamping, and warnings. It imports no platform package. -
Each platform or provider declares its channels. A channel declares only what it has. A channel never fills a port with a constant.
type SurfaceProof = (device, signal) => Promise<'clear' | Readonly<{ occluded: string }> | 'unproven'>; type SourceChannel<T> = Readonly<{ producer: SnapshotProducer; acquire(req: { target: T; hint; signal }): Promise<SourceOutcome>; resolveTarget(device, app, signal): Promise<T>; refreshTarget?(device, app, signal): Promise<T>; // replaces targetFreshness awaitDiscovery?(device, signal): Promise<void>; // replaces isDiscoveryPending proof: 'none' | SurfaceProof; // replaces the presence/foreground pair supports: { customActions: boolean; observeOnly: boolean; pinnedBackend: boolean }; }>; -
iOS local, iOS provider (Limrun runner channel), Android, macOS and web route through the router. A single-source platform is the one-channel case.
-
One producer registry in
packages/contracts, declared withsatisfies Record<SnapshotProducer, ProducerFacts>(channel, truncation, residue, quiet time, ref-namespace owner). The producer union is platform-neutral. Every other producer table derives from the registry. -
The refusal fixture
contracts/fixtures/ios-snapshot-bridge-refusals.json(#4182) becomes the router's refusal table input for every channel that emits typed refusals.
Completion conditions
git grepfinds no route port filled by a constant (() => false,async () => 'unknown') and notargetFreshness.- A layering rule fails when the router module imports a platform or provider package.
- A repo guard fails when a producer in the registry has no production emitter.
- A repo guard fails when an ADR cites a file path or test name that does not exist.
- Existing route behavior tests pass unchanged against the router, for the guest and runner channels.
- Live check: local iOS Simulator, Limrun iOS, local Android emulator. Each capture names the same producer and fallback warnings as before the change.
- The new ADR is accepted, and ADR 0004 is under about 15 KB.
Dependencies
Blocked by: #4182 (runner-served bridge and refusal fixture), which is stacked on the unmerged Limrun runner layers (stack/limrun-native-runner).
Open question: whether Android's system-UI annotation fits the SurfaceProof port. Decide this in the ADR before code moves.
- 主要言語
- TypeScript
- スター
- 5.3k
- フォーク
- 377
- 平均マージ
- 13時間 18分
- マージ済み PR(30日)
- 653
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstack/agent-device のほかの issue
-
iOS alert wait: the last poll can get ~30 ms and turns "no alert" into a failed read対応中かも @pcbeingused333 が 3 日前に担当しました。 オープンbug ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
callstack/agent-device#4018 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
callstack/agent-device#1869 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
callstack/agent-device#4204 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
callstack/agent-device#4203 ·
メンテナーはふだん 1 日以内に返信
-
feat(web): run concurrent web sessions on one host対応中かも @kacper-mikolajczak が 1 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 18/100
callstack/agent-device#4190 ·
メンテナーはふだん 1 日以内に返信
callstack/agent-device の issue をすべて見る
似ている issue
-
apps/stage-web bug env/os-linux pending triage scope/audio-output
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
reproduced
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
anomalyco/opencode#61640 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
scope: data grid status: waiting for maintainer
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 2 日以内に返信
-
ai-driven-fuzzing bug Minor
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
ai-driven-fuzzing bug claude Minor
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
linagora/twake-calendar-frontend#1944 ·
メンテナーはふだん 1 日以内に返信