feat(char): segment axis for rampup/pyramid — cold-start on 2s/6s/LL#691
Merged
Conversation
Adds a CHAR_SEGMENT={2s|6s|ll} configuration axis to the rampup and
pyramid characterization tests so a single deterministic cold launch
lands on the chosen segment length.
- runner/appium.go: SetLaunchArgs lets a test pass XCUITest
processArguments; iOS folds `-is.segment <rawValue>` into UserDefaults
(NSArgumentDomain, highest precedence) so the player cold-starts on
that segment from frame 1 — no UI pre-set, no second Appium session,
no warm-switch starvation. ResumePlayback now waits for the
home-continue-watching tile (waitForAccessibilityID) instead of
racing the async catalogue fetch, which can leave Home empty for a
few seconds after a fresh/segment-forced launch.
- modes/rampup_test.go, modes/pyramid_test.go: read CHAR_SEGMENT
(label form 2s|6s|ll → enum rawValue s2|s6|ll), force it via the
launch arg, assert the cold start actually landed on the requested
master (master_2s/master_6s/master.m3u8) and fail loudly otherwise,
label the play with segment=<v>, and tag the report filename.
- PlayerViewModel.setSegment: persist the choice (persistFlags) like
every other Advanced setter — it was the lone setter that skipped
persistence, so the segment silently reverted on relaunch. The
relaunch-per-segment cold start depends on it surviving the launch.
Validated end-to-end on the iPad sim: CHAR_SEGMENT=2s cold-starts on
master_2s.m3u8 and laddered the full rampup 540p→720p→1080p→4K with
zero stalls (paired with the #685 catalogue fix that lets Home show
content when 2s is selected).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a
CHAR_SEGMENT={2s|6s|ll}configuration axis to the rampup and pyramid characterization tests, so a single deterministic cold launch lands on the chosen segment length. Pairs with #685 (which made/api/contentadvertise all available segment lengths so Home isn't empty when 2s is selected).Changes
runner/appium.go—SetLaunchArgspasses XCUITestprocessArguments; iOS folds-is.segment <rawValue>into UserDefaults (NSArgumentDomain, highest precedence) so the player cold-starts on that segment from frame 1 — no UI pre-set, no second Appium session, no warm-switch starvation.ResumePlaybacknow waits for thehome-continue-watchingtile (waitForAccessibilityID) instead of racing the async catalogue fetch (which can leave Home empty for a few seconds after a fresh/segment-forced launch).modes/rampup_test.go,modes/pyramid_test.go— readCHAR_SEGMENT(label2s|6s|ll→ enum rawValues2|s6|ll), force it via the launch arg, assert the cold start landed on the requested master (master_2s/master_6s/master.m3u8) and fail loudly otherwise, label the playsegment=<v>, and tag the report filename.PlayerViewModel.setSegment— persist the choice (persistFlags) like every other Advanced setter; it was the lone setter that skipped persistence, so a segment choice silently reverted on relaunch.Validation
End-to-end on the iPad sim:
CHAR_SEGMENT=2scold-started onmaster_2s.m3u8and laddered the full rampup 540p→720p→1080p→4K with zero stalls. (A separate inter-cycle inactivity-timeout issue surfaced for multi-cycle runs — addressed independently.)🤖 Generated with Claude Code