Skip to content

test(ios): prove the runnable alpha loop - #183

Open
altaywtf wants to merge 14 commits into
next-rollout/direct-hlsfrom
next-rollout/runtime-proof
Open

test(ios): prove the runnable alpha loop#183
altaywtf wants to merge 14 commits into
next-rollout/direct-hlsfrom
next-rollout/runtime-proof

Conversation

@altaywtf

@altaywtf altaywtf commented Aug 30, 2026

Copy link
Copy Markdown
Member

Summary

  • Drive deterministic OAuth through the real session state machine and prove Keychain restoration across terminate/relaunch.
  • Exercise root and nested browsing, malformed-HLS failure and retry, real AVPlayer readiness through an in-process loopback HLS server, return navigation, Account, and sign-out.
  • Trim published proof by ordered visual landmarks so simulator setup and teardown never reach the artifact.

This is the runtime-proof layer above #182 for the direct-playback checkpoint in #132 under #123. It does not close #132.

Reviewer Guide

  • Highest risk: loopback HTTP lifecycle and request bounds in HarnessMediaServer.swift.
  • Then inspect journey state transitions in FilesBrowserJourneyTests.swift and recording landmark selection in SimulatorHarness.swift.

Visual Aids

Validation

  • mise run verify
  • Policy tests: 12/12
  • PutioCore tests: 47/47
  • Harness tests: 45/45
  • All app schemes build
  • iOS component and feature snapshots pass
  • tvOS snapshots pass
  • Harness interruption cleanup passes
  • mise run harness -- journey --platform ios --scenario files-browser --run-id pr183-a792d6f --output json
  • Journey UI test: 1/1

Sanity Checks

  • The loopback server binds only to 127.0.0.1, serves only the built Debug HLS fixture, and is stopped on normal exit and interruption.
  • The malformed playlist produces one visible retryable error before the valid playlist reaches AVPlayer readiness.
  • The first frame is the sign-in screen and the final frame is the signed-out screen; the proof contains no setup or teardown footage.
  • The brief Home/black transition in the middle is the active terminate/relaunch proof, not idle capture.
  • The playback screenshot and sampled MP4 frames visibly contain Big Buck Bunny.

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 PutioNightly remain out of scope. @putdotio/design stays pinned to 3.0.0.

Copilot AI lite review requested due to automatic review settings August 30, 2026 15:27
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-30T19:16:55.620631Z a792d6f New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@altaywtf altaywtf changed the title next rollout/runtime proof test(ios): prove the runnable alpha loop Aug 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 HarnessMediaServer and 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.

Comment thread Tools/PutioHarness/Sources/PutioHarnessKit/SimulatorHarness.swift
@altaywtf
altaywtf force-pushed the next-rollout/runtime-proof branch from da4d198 to a792d6f Compare August 30, 2026 19:13

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +176 to +183
.overlay {
if playerIsReady {
Color.clear
.frame(width: 1, height: 1)
.accessibilityElement(children: .ignore)
.accessibilityLabel("Video ready")
.accessibilityIdentifier("video.ready")
.allowsHitTesting(false)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS video playback with resume, next-video, and the conversion gate

2 participants