diff --git a/.github/workflows/ui-smoke.yml b/.github/workflows/ui-smoke.yml index 6428e4595..800295be4 100644 --- a/.github/workflows/ui-smoke.yml +++ b/.github/workflows/ui-smoke.yml @@ -195,7 +195,7 @@ jobs: needs: quick # Both 8D-SonKu and SOF native-owner PRs share ONE actual Chromium runner. # Preserve fast-only checks for unrelated GUI and engine branches. - if: ${{ (github.event_name == 'pull_request' && (startsWith(github.head_ref, 'feat/8d-sonku-') || startsWith(github.head_ref, 'feat/sonku-p1-') || startsWith(github.head_ref, 'test/sof-native-') || startsWith(github.head_ref, 'integration/sof-sonku-main-') || startsWith(github.head_ref, 'fix/native-wire-inspector-') || (startsWith(github.head_ref, 'integration/sonku-m4-wire-') || startsWith(github.head_ref, 'integration/sonku-m4-guitar-picker-') || startsWith(github.head_ref, 'fix/sonku-')))) || (github.event_name == 'workflow_dispatch' && startsWith(github.ref, 'refs/heads/feat/8d-sonku-') && inputs.expected_sha != '') }} + if: ${{ (github.event_name == 'pull_request' && (startsWith(github.head_ref, 'feat/8d-sonku-') || startsWith(github.head_ref, 'feat/sonku-p1-') || startsWith(github.head_ref, 'feat/sonku-flipped-') || startsWith(github.head_ref, 'test/sof-native-') || startsWith(github.head_ref, 'integration/sof-sonku-main-') || startsWith(github.head_ref, 'fix/native-wire-inspector-') || (startsWith(github.head_ref, 'integration/sonku-m4-wire-') || startsWith(github.head_ref, 'integration/sonku-m4-guitar-picker-') || startsWith(github.head_ref, 'fix/sonku-')))) || (github.event_name == 'workflow_dispatch' && startsWith(github.ref, 'refs/heads/feat/8d-sonku-') && inputs.expected_sha != '') }} runs-on: ubuntu-latest timeout-minutes: 12 steps: diff --git a/site/preview-v2/assets/mixer-native-sonku.js b/site/preview-v2/assets/mixer-native-sonku.js index e6e57fd7c..55efb63ca 100644 --- a/site/preview-v2/assets/mixer-native-sonku.js +++ b/site/preview-v2/assets/mixer-native-sonku.js @@ -73,10 +73,7 @@ root.innerHTML=[ '', '', '', - '', - '', - '', - '', + '', '', '', '', @@ -86,21 +83,11 @@ root.innerHTML=[ 'FRONT', 'REAR', 'LEFTRIGHT', - // Original vector back-view listener: anatomy and shoulders face UP. - // Do not rotate the old face PNG upside-down or alter native HRTF angles. - '', + // Flipped transparent PNG replaces the provisional vector listener. + // Anatomical nose/FRONT points TOP; source azimuth is unchanged. + '', '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', + '', // Near orbit overlays lower bust, forming ONE plausible 3D spatial ring. '', '', diff --git a/site/preview-v2/assets/sonku-listener-top.png b/site/preview-v2/assets/sonku-listener-top.png index 658d7a889..3225ec58f 100644 Binary files a/site/preview-v2/assets/sonku-listener-top.png and b/site/preview-v2/assets/sonku-listener-top.png differ diff --git a/tests/approved_native_sonku_smoke.py b/tests/approved_native_sonku_smoke.py index 182b1d80d..bf6fbeb5a 100644 --- a/tests/approved_native_sonku_smoke.py +++ b/tests/approved_native_sonku_smoke.py @@ -141,12 +141,20 @@ def exercise(browser,out,width,height): assert editor.locator("#"+knob).get_attribute("type")=="range" assert editor.locator("#"+knob).evaluate("(n)=>n.closest('.sk-dial')!==null") art=editor.locator("#skListenerArt") - assert art.count()==1 and "facing top" in art.get_attribute("aria-label") - # An original back-of-head vector replaces the physically incorrect - # upside-down face PNG. Same SVG is bundled directly into /preview/. - assert art.locator("path").count()>=6 - assert editor.locator("#skMap #skCrown").count()==1 - assert editor.locator("#skMap #skBackSuit").count()==1 + assert art.count()==1 and art.get_attribute("data-orientation")=="front-up-flipped" + assert art.get_attribute("href")=="assets/sonku-listener-top.png" + # The vertically flipped PNG must actually resolve in the BUILT + # native /preview/ bundle, and have transparent palette metadata. + assert page.evaluate("""async () => new Promise(resolve => { + const image=document.querySelector('#skListenerArt'); + const href=image.getAttribute('href'); + // file:// origins prohibit fetch(); SVG images still resolve from + // the compiled GUI resource. Exercise actual Image.decode instead. + const im=new Image(); + im.onload=()=>resolve(im.naturalWidth===256&&im.naturalHeight===256); + im.onerror=()=>resolve(false); + im.src=href; + })"""),"Flipped transparent PNG missing from native GUI bundle" # SVG is not HTML text: Chromium 158 no longer exposes usable # HTMLElement.innerText for these nodes. Read SVG textContent and verify # the actual anchors, so front/rear cannot silently flip in the GUI. diff --git a/tests/native_peq_assembly_test.py b/tests/native_peq_assembly_test.py index 63df007dc..ed6beda1a 100644 --- a/tests/native_peq_assembly_test.py +++ b/tests/native_peq_assembly_test.py @@ -75,8 +75,17 @@ def test_single_style_owner(self): # rather than displaying the old face PNG upside-down. The legacy # PNG is still packaged for historical/checkpoint builds. self.assertIn('id="skListenerArt"',sonku) - self.assertIn('id="skCrown"',sonku) - self.assertIn('id="skBackSuit"',sonku) + self.assertIn('href="assets/sonku-listener-top.png"',sonku) + self.assertIn('data-orientation="front-up-flipped"',sonku) + self.assertNotIn('id="skCrown"',sonku) + self.assertNotIn('id="skBackSuit"',sonku) + # Alpha-palette PNG asset is the exact vertically flipped user-approved + # listener; fail if a stale provisional source is repackaged. + import hashlib + self.assertEqual(hashlib.sha256(png).hexdigest(), + "e4fa2f75a541615448dd2d2b0bcbbf7955428900b3bdba8ad45c1ff7374fefc8") + self.assertEqual(png[16:24],bytes([0,0,1,0,0,0,1,0])) + self.assertIn(b"tRNS",png) self.assertIn("FRONT",sonku) self.assertIn('arMixBuiltinSonKuAck',sonku) self.assertIn('nativeSonKuSet',sonku)