test(ios): prove the runnable alpha loop - #183
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🟢 Approval recommended
The changes are cohesive, exercised via updated/added tests and docs, and the remaining findings are minor maintainability nits with straightforward fixes.
Pull request overview
Updates the iOS harness “journey” lane from the previous files-browser capture-gated flow to a “runtime-proof” runnable alpha loop that exercises sign-in/restore/sign-out and deterministic AVFoundation playback using a bundled HLS fixture served via a local loopback server.
Changes:
- Replace the browser journey contract (fixture set, test identifier, attachments) to target the new runnable alpha loop and runtime-proof artifacts.
- Add a small allowlisted loopback
HarnessMediaServerand bundle HLS fixtures into Debug builds for deterministic AVFoundation playback in the journey. - Update iOS app + tests to support deterministic sign-in, playback readiness signaling, and the new journey assertions; refresh harness documentation accordingly.
File summaries
| File | Description |
|---|---|
| Tools/PutioHarness/Tests/PutioHarnessKitTests/ModelsTests.swift | Updates journey contract expectations (fixture set, test id, attachment names). |
| Tools/PutioHarness/Tests/PutioHarnessKitTests/JourneyRecordingTests.swift | Adjusts recording-window test data and adds coverage for matching initial/final sign-in screens. |
| Tools/PutioHarness/Tests/PutioHarnessKitTests/HarnessMediaServerTests.swift | Adds tests for allowlisted media serving and byte-range responses. |
| Tools/PutioHarness/Sources/PutioHarnessKit/SimulatorHarness.swift | Switches journey pipeline to runtime-proof artifacts, adds local media server wiring, and adjusts recording duration cap. |
| Tools/PutioHarness/Sources/PutioHarnessKit/Models.swift | Updates journey scenario fixture set and the journey contract identifier/attachments. |
| Tools/PutioHarness/Sources/PutioHarnessKit/HarnessMediaServer.swift | Introduces a minimal NWListener-based HTTP server restricted to specific runtime-proof fixture paths + byte ranges. |
| Tests/iOSUITests/Sources/FilesBrowserJourneyTests.swift | Reworks the UI journey to sign in, relaunch to prove restore, validate error→retry playback, then sign out. |
| Tests/iOS/Sources/PutioSystemVideoPlayerCoordinatorTests.swift | Adds regression coverage for “ready” reporting behavior and teardown safety. |
| Tests/iOS/Sources/FilesBrowserSeededAPIIntegrationTests.swift | Updates scenario usage and adds a Keychain persistence sign-in/restore/sign-out integration test. |
| Tests/HarnessMedia/direct-hls/runtime-proof.m3u8 | Adds the valid runtime-proof playlist fixture. |
| Tests/HarnessMedia/direct-hls/runtime-proof-invalid.m3u8 | Adds an intentionally invalid playlist fixture to exercise the error→retry path. |
| Tests/HarnessMedia/direct-hls/ATTRIBUTION.md | Documents fixture provenance and licensing for the runtime-proof media. |
| Project.swift | Bundles the runtime-proof HLS fixtures into Debug app resources via a post-build script. |
| docs/HARNESS.md | Updates harness docs to reflect the new runtime-proof journey behavior and emitted artifacts. |
| Apps/Shared/Sources/PutioRuntimeFactory.swift | Uses Keychain token storage for the journey scenario and adds a deterministic OAuth callback builder (Debug). |
| Apps/iOS/Sources/VideoPlayback.swift | Adds a “video.ready” accessibility signal and coordinator support for onReady/onFailure reporting. |
| Apps/iOS/Sources/PutioApp.swift | Adds deterministic sign-in for the journey scenario, removes old capture-gate overlays, and injects fixture playback behavior for runtime-proof. |
Review details
- Files reviewed: 17/18 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
da4d198 to
a792d6f
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a792d6f21a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .overlay { | ||
| if playerIsReady { | ||
| Color.clear | ||
| .frame(width: 1, height: 1) | ||
| .accessibilityElement(children: .ignore) | ||
| .accessibilityLabel("Video ready") | ||
| .accessibilityIdentifier("video.ready") | ||
| .allowsHitTesting(false) |
There was a problem hiding this comment.
Hide the harness readiness marker in release builds
During normal production playback, once the item becomes ready this unconditional overlay adds an invisible but explicitly exposed accessibility element labeled “Video ready.” VoiceOver users can therefore encounter an unexpected focus stop over the system player even though video.ready exists only to synchronize the harness; gate this marker to Debug/the harness scenario so runtime-proof instrumentation does not alter the release accessibility tree.
Useful? React with 👍 / 👎.
Summary
This is the runtime-proof layer above #182 for the direct-playback checkpoint in #132 under #123. It does not close #132.
Reviewer Guide
HarnessMediaServer.swift.FilesBrowserJourneyTests.swiftand recording landmark selection inSimulatorHarness.swift.Visual Aids
a792d6f21a2b877b8d635683b03876426d6c2a44564; size:7,605,520bytes86ee7878a3ec461125e1e65bca4ab49cfef578291bbf3b0e9eb8bf8540b3e23dValidation
mise run verifymise run harness -- journey --platform ios --scenario files-browser --run-id pr183-a792d6f --output jsonSanity Checks
127.0.0.1, serves only the built Debug HLS fixture, and is stopped on normal exit and interruption.Benchmarks
N/A. This changes test and proof infrastructure, not a performance-sensitive product path.
Notes
Conversion, progress reporting, next-video/autoplay, offline playback, search, sorting, pagination, downloads, tvOS/watchOS feature work, and
PutioNightlyremain out of scope.@putdotio/designstays pinned to3.0.0.