@@ -23,7 +23,13 @@ def source(client: str) -> str:
2323out = mod .reader_source (source ("tv" ), "tv" , 137 , "all" )
2424assert "rows.take(" not in out
2525assert out .count ("rows.forEachIndexed" ) >= 2
26- assert "PlayerPlaybackNetworking.createDataSourceFactory(context, headers)" in out
26+ # The acceptance generator must exercise Nuvio's production player path. A
27+ # test-only PlayerPlaybackNetworking/ExoPlayer stack would create a second reader
28+ # implementation and can disagree with the real application.
29+ for required in ("Screen.Player.createRoute" , "NuvioNavHost" , "LastPlaybackDiagnostics" ):
30+ assert required in out , required
31+ assert "PlayerPlaybackNetworking.createDataSourceFactory(context, headers)" not in out
32+ assert "ExoPlayer.Builder(context)" not in out
2733assert out .index ("val reader = probeNativePlayer" ) < out .index ("val transport = probeTransport" )
2834
2935sampled = mod .reader_source (source ("tv" ), "tv" , 137 , 2 )
@@ -90,16 +96,16 @@ def source(client: str) -> str:
9096 assert "returned=9" in failed .stdout and "played=3" in failed .stdout
9197 assert "ci_mode=deep" in failed .stdout
9298
93- # PR acceptance has exactly one canonical coverage floor: at least one real
94- # native read for every route that returned media. The generator may choose a
95- # larger bounded sample; the gate must not independently re-invent that count.
99+ # PR acceptance has exactly one bounded canonical coverage floor: two native
100+ # reads for a route when at least two streams exist. Deep/manual remains all.
96101 pr_bounded = subprocess .run (
97102 ["node" , str (ROOT / "scripts/gate_native_reader_coverage.cjs" ), "--streams" , "all" , str (log )],
98103 cwd = ROOT , text = True , capture_output = True , env = pr_env ,
99104 )
100105 assert pr_bounded .returncode == 0 , pr_bounded .stdout + pr_bounded .stderr
101106 assert "ci_mode=pr-bounded" in pr_bounded .stdout
102- assert "expected_played=1 played=3" in pr_bounded .stdout
107+ assert "pr_stream_limit=2" in pr_bounded .stdout
108+ assert "expected_played=2 played=3" in pr_bounded .stdout
103109
104110 sampled_pass = subprocess .run (
105111 ["node" , str (ROOT / "scripts/gate_native_reader_coverage.cjs" ), "--streams" , "3" , str (log )],
@@ -118,4 +124,4 @@ def source(client: str) -> str:
118124 assert passed .returncode == 0 , passed .stdout + passed .stderr
119125 assert "expected_played=9 played=9" in passed .stdout
120126
121- print ("sampled/exhaustive native reader acceptance tests passed: pr_floor=1 deep=all" )
127+ print ("sampled/exhaustive native reader acceptance tests passed: pr_floor=2 deep=all production_player=true " )
0 commit comments