test(ios-snapshot): cover the runner-presented interactive pipeline
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
- 48/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- swift, typescript
- Lĩnh vực
- mobile-dev, testing-qa
Hướng nghiên cứu
Read docs/agents/testing.md, scripts/ios-snapshot-differential.test.ts, packages/capture-kit/src/ios-snapshot-engine/conformance-harness.ts, properties.test.ts, and runner-presentation.test.ts. Run the listed Vitest and differential commands to inventory skipped routes and existing fixtures. Done means the runner-presented interactive cases execute with the required representative, scope, depth, and parent assertions, mutation coverage fails and recovers as specified, and baseline outputs remain unchanged.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Complete #2754 step 2: cover the runner-presented interactive pipeline
Deletion-first acceptance
This is part of #2803's simplify-and-shrink initiative. Before production simplification, name the production mechanism, duplicated decision, state, fallback, forwarding layer, or public/internal interface this change removes. Compare deletion and inlining against extraction. Moving the same state into another file is not a deletion case.
Every PR reports baseline/final SHAs; added, deleted and net production lines; test/fixture/documentation changes separately; and the exact mechanisms removed. Use a rename-aware diff (git diff --numstat -M BASE...HEAD) and account for all affected production paths, including destination packages. Moving tests out of production files, generated output, formatting churn, and moving code elsewhere are not production-code deletion. Preserve readable code; no compressed formatting to hit a number.
Default for simplification work: net production reduction. A required behavior-preserving size split may be line-neutral. Growth needs an explicit, quantified explanation of the correctness or type guarantee it buys, why deletion/inlining cannot achieve it, and what old mechanism is removed; it is not automatically acceptable because ownership looks cleaner. If the only benefit is relocating fields or adding a wrapper, defer the change. Required regression tests and a minimal correctness fix are allowed to grow without inventing unrelated deletion to offset them.
For this test/characterization task, name the uncertainty or regression gap resolved instead of a production deletion. Expected production behavior delta is zero; report test/harness growth separately.
Priority and scope gate
Early regression protection, not a promised cheap cleanup. This is test/harness work and may add code; report its size separately rather than offsetting or obscuring production growth. It earns its place by detecting the missing runner-presented interactive regression. Keep production snapshot semantics unchanged, and scope/routing changes to the demonstrated test gap.
Problem and existing ownership
This is a bounded continuation of #2754 step 2, tracked under architecture umbrella #2803. It does not reopen the scroll-membership policy. Parent-edge ownership and the surveyed same-frame pass-through already landed through #2758; eligibility parity followed in #2759. TextView is already a green regression from #2740. Do not present those fixes as missing work or create a competing policy issue.
Verified against origin/main at 5712a3552e209c9c853bc1f42cb3e007f1213139: scripts/ios-snapshot-differential.test.ts:30 filters out authored interactive cases; packages/capture-kit/src/ios-snapshot-engine/conformance-harness.ts:16–26 fixes interactiveOnly to false; properties.test.ts:107–130 exercises projection membership through stage: 'acquired' only. The existing presented-input case validates a malformed quality payload, not the complete Swift-presentation/host-compaction composition. ADR 0026 explicitly records this remaining coverage.
Intended design
Extend the existing conformance harness to run the actual Swift presenter and pass its output through the existing TypeScript stage: 'presented' adapter before semantic compaction/publication. Keep the current acquired-input arm and shared fixture corpus. The test-only case shape should explicitly choose the input route and permit interactive requests:
type DifferentialRoute = 'acquired' | 'runner-presented';
// Existing case fields remain, including projection, scope, depth and fold policy.
// interactiveOnly becomes boolean; route names which real composition is tested.
Compare the stages on claims they share. Raw membership can preserve original source identity, while semantic compaction may delegate several sources to one representative. Assert source membership and valid representatives through the existing semantic index; do not require literal output-array equality, unchanged indexes, or a full-node superset after compaction. Do not add a second membership ledger or implement #2754's separate typed-ejection-disposition work here.
Implementation and acceptance
- Inventory currently skipped authored cases and unsupported harness fields. Define explicit, justified runtime asymmetries; an unsupported case must not silently disappear from the runner arm.
- Extend Swift conformance decoding/output and the TypeScript adapter only as needed to invoke the production pipeline. Preserve unscoped quality evidence separately from the published scoped payload.
- Cover regular/raw/interactive requests, scope and depth, source representatives, and scroll-host parent relationships across both input routes. Include the captured Settings chrome and Safari same-frame wrapper shapes already reduced in
runner-presentation.test.ts. - Retain TextView as a green control. Plant an ancestor-ownership mutation that crosses a smaller WebView or paged Cell into the enclosing list; the runner-presented interactive arm must fail for the lost reachable rows. Restore production code and prove green. Also prove the legitimate same-frame Safari pass-through remains clipped correctly.
Before/after measures: report authored cases executed per route, interactive cases that were previously excluded, and mutation failures attributed to the new arm. Every source retained by the applicable policy must have a valid presented representative; unjustified loss fails without prohibiting valid semantic delegation. Existing captured baseline outputs remain unchanged. Keep deterministic seeds, failure artifacts, and the current differential time budget; report measured duration rather than increasing it preemptively.
Validation
Run pnpm exec vitest run --project unit-core packages/capture-kit/src/ios-snapshot-engine/properties.test.ts packages/capture-kit/src/ios-snapshot-engine/runner-presentation.test.ts, then pnpm test:ios-snapshot-differential for Swift package tests and the shared differential. Run repository-wide pnpm format and pnpm check:affected --run. If harness paths need routing changes, run pnpm check:affected:test and pnpm check:gate-manifest, planting a misrouted path/failure to prove selection. Preserve native obligations reported for any runner integration changes.
Scope and readiness
Ready as characterization and harness work; a useful prerequisite to later presentation refactors, not a dependency on those refactors. No universal scroll taxonomy, new clipping heuristics, node-count alarms, production semantic changes, or replacement of the two language implementations. Unexpected discrepancies require a separately scoped diagnosis. Expected effort: M; risk: low for production, medium for accidentally asserting equivalence between intentionally different stages.
For a fresh worktree run pnpm install --frozen-lockfile && pnpm build first. Read docs/agents/testing.md.
- Ngôn ngữ chính
- TypeScript
- Star
- 4.7k
- Fork
- 304
- Merge trung bình
- 11 giờ 19 phút
- Pull request đã merge (30 ngày)
- 539
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của callstack/agent-device
-
Proxy lease refuses every iOS install/open: connection platform 'ios' compared with internal 'apple'Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
callstack/agent-device#2962 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
callstack/agent-device#1869 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage refactor
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 28/100
callstack/agent-device#2976 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage refactor
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
callstack/agent-device#2973 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ready-for-agent refactor
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
callstack/agent-device#2972 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của callstack/agent-device
Issue tương tự
-
module-request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ports get and web print 'Port N already in use, trying next...' for every busy port they skipĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
appandflow/stim#1604 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
lingdojo/kana-dojo#31060 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
SSH workspace restore rewrites relative symlinks into the deleted sync-back staging directoryĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
paperclipai/paperclip#14173 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày