diff --git a/.github/workflows/p1-windows.yml b/.github/workflows/p1-windows.yml index 009e81ed9..0fc70d68c 100644 --- a/.github/workflows/p1-windows.yml +++ b/.github/workflows/p1-windows.yml @@ -7,6 +7,13 @@ on: paths: - 'CMakeLists.txt' - 'integration/console-v6/**' + # Native headers may live outside console-v6 (M3 readback/ABI). + - 'integration/*.h' + - 'integration/*.hpp' + - 'integration/*.cpp' + - 'integration/**/*.h' + - 'integration/**/*.hpp' + - 'integration/**/*.cpp' - 'src/**' - 'web/approved-native-bridge.js' - 'web/approved-native-contract.js' @@ -20,38 +27,23 @@ on: - 'tests/*.cpp' - 'scripts/package_native_windows.ps1' - 'scripts/verify_native_windows_artifact.ps1' + - 'scripts/collect_hardware_fat_windows.ps1' + - 'scripts/console_v6_fat_gate.mjs' + - 'scripts/verify_console_s0_native_fixture.mjs' + - 'scripts/run_console_native_s0.mjs' + - 'scripts/check_console_puzzle.mjs' + - 'scripts/check_approved_native_gui_release.mjs' + - 'scripts/check_pr278_console_authority.mjs' + - 'scripts/m3e_fat_evidence_gate.mjs' - 'scripts/factoryfx_release_bundle.py' - 'config/factoryfx-approved-releases.json' - 'config/factoryfx-notices/**' - 'scripts/tests/test_factoryfx_release_bundle.py' - '.github/workflows/p1-windows.yml' - # GUI-only PRs receive browser checks; they need not compile JUCE on every edit. - # Native bridge changes still require Windows; pure visual GUI follows Pages only. - # A full executable/package is still produced on native main and explicit FAT. - pull_request: - types: [opened, reopened, synchronize, ready_for_review] - paths: - - 'CMakeLists.txt' - - 'integration/console-v6/**' - - 'src/**' - - 'web/approved-native-bridge.js' - - 'web/approved-native-contract.js' - - 'tests/approved_native_m2_contract.test.cjs' - - 'scripts/build_approved_native_gui.py' - - 'tests/approved_native_gui_bundle_test.py' - - 'web/bridge.js' - - 'web/monitor.js' - - 'engine/**' - - 'tests/*.cpp' - - 'tests/*native*contract*.mjs' - - 'tests/live_graph_contract_test.mjs' - - 'scripts/package_native_windows.ps1' - - 'scripts/verify_native_windows_artifact.ps1' - - 'scripts/factoryfx_release_bundle.py' - - 'config/factoryfx-approved-releases.json' - - 'config/factoryfx-notices/**' - - 'scripts/tests/test_factoryfx_release_bundle.py' - - '.github/workflows/p1-windows.yml' + # PR native compile is called ONLY by UI smoke's Product Qualification fan-in. + # GUI/docs-only PRs skip Windows entirely; main and manual release stay here. + # Called by the all-PR quality workflow. No duplicate Windows PR run. + workflow_call: workflow_dispatch: concurrency: diff --git a/.github/workflows/ui-smoke.yml b/.github/workflows/ui-smoke.yml index f99695af0..781d8332d 100644 --- a/.github/workflows/ui-smoke.yml +++ b/.github/workflows/ui-smoke.yml @@ -46,6 +46,7 @@ jobs: timeout-minutes: 5 outputs: run_ui: ${{ steps.pr_scope.outputs.run_ui || steps.push_scope.outputs.run_ui }} + run_native: ${{ steps.pr_scope.outputs.run_native }} steps: - uses: actions/checkout@v4 - name: Audit PR metadata, file ownership and runtime collisions @@ -61,6 +62,51 @@ jobs: run: echo "run_ui=true" >> "$GITHUB_OUTPUT" - name: Fast offline coordination contract regression run: node --test tests/workstream_coordination_contract.test.mjs + native: + needs: coordination + if: ${{ github.event_name == 'pull_request' && needs.coordination.outputs.run_native == 'true' }} + uses: ./.github/workflows/p1-windows.yml + permissions: + contents: read + pull-requests: read + + qualification: + name: Product Qualification + needs: [coordination, frontend, native] + if: ${{ always() && github.event_name == 'pull_request' }} + runs-on: ubuntu-latest + timeout-minutes: 3 + steps: + - name: Enforce actual outcomes for every selected test lane + shell: bash + env: + COORD_RESULT: ${{ needs.coordination.result }} + UI_RESULT: ${{ needs.frontend.result }} + NATIVE_RESULT: ${{ needs.native.result }} + RUN_UI: ${{ needs.coordination.outputs.run_ui }} + RUN_NATIVE: ${{ needs.coordination.outputs.run_native }} + run: | + set -euo pipefail + echo "Coordination: $COORD_RESULT, Chromium: $UI_RESULT ($RUN_UI), Windows: $NATIVE_RESULT ($RUN_NATIVE)" + if [[ "$COORD_RESULT" != "success" ]]; then + echo "::error::Coordination must PASS." + exit 1 + fi + if [[ "$RUN_UI" != "true" && "$RUN_UI" != "false" ]] || + [[ "$RUN_NATIVE" != "true" && "$RUN_NATIVE" != "false" ]]; then + echo "::error::Missing/malformed PR qualification scope." + exit 1 + fi + if [[ "$RUN_UI" == "true" && "$UI_RESULT" != "success" ]]; then + echo "::error::Required Chromium UI smoke did not PASS." + exit 1 + fi + if [[ "$RUN_NATIVE" == "true" && "$NATIVE_RESULT" != "success" ]]; then + echo "::error::Required Windows native CTest did not PASS." + exit 1 + fi + echo "Product Qualification PASS for selected lanes at this PR revision." + frontend: needs: coordination if: ${{ github.event_name != 'pull_request' || needs.coordination.outputs.run_ui == 'true' }} diff --git a/docs/workstreams/MULTI_AGENT_COORDINATION.md b/docs/workstreams/MULTI_AGENT_COORDINATION.md index 596b4d387..943571dd8 100644 --- a/docs/workstreams/MULTI_AGENT_COORDINATION.md +++ b/docs/workstreams/MULTI_AGENT_COORDINATION.md @@ -61,6 +61,18 @@ For merge safety, require the exact GitHub Actions job check **PR coordination a **Admin limitation:** the connected GitHub app cannot write protection/rulesets. Until enabled, a successful CI job is a meaningful PR signal, but it cannot stop an authorized maintainer from bypassing review or pushing directly to `main`. Hardware FAT #15 and exact-sha production gates remain independent and mandatory. +## P0 product qualification — conditional native CI with one required verdict + +**Owner:** INTEGRATOR, control tower #397. No second native producer, GUI renderer, DSP callback or workflow file. + +The existing `.github/workflows/ui-smoke.yml` is the sole PR entry point. Its always-on `PR coordination admission` computes **`run_ui`** and **`run_native`** from the GitHub API's exact PR changed filenames. It invokes the existing `.github/workflows/p1-windows.yml` as a **reusable workflow** only when native source/ABI, Windows packaging, or release-admission files changed. The Windows workflow still independently builds and packages on `main` pushes/manual dispatch; it no longer starts a **duplicate** path-filtered PR Windows run. + +A separate tiny **`Product Qualification`** fan-in runs for every PR, even when its dependencies fail or are skipped. It succeeds **only** if ownership admission passes and every selected lane completes successfully: required Chromium frontend for UI changes; required Windows JUCE/CTest for native changes; both for mixed bridge changes. Docs-only PRs require only admission. A cancelled/failing/skipped **required** lane is a failure, never a fake PASS. Exact-head checks are attached to the PR by the caller workflow; source checkout and ABI ownership are unchanged. + +Native classification covers `integration/**/*.h/.hpp/.cpp` (including M3 `ApprovedNative*` headers) and release-admission scripts; isolated `integration/*.mjs` and documentation are **not** blanket triggers. The existing Windows `main` push path filters also include newly covered C++ headers and release gate scripts. The Windows CRLF/LF checkout discrepancy in M2.6 tests is normalized before parsing workflow triggers. + +**Administrator action after a green PR:** add the exact GitHub Actions check **`Product Qualification`** to [Protected Main ruleset](https://github.com/masarray/arsonmix/rules/26568033) alongside the existing `PR coordination admission` check, keeping up-to-date branches enabled. The connector cannot alter repository rulesets. Until this is done, the new verdict is visible and functional but not formally a required merge check. + ## Administrative limitation GitHub may allow a maintainer to merge even with a failed check unless **required status checks** and appropriate branch protection/rulesets are configured. App connections cannot always administer these. Treat #397 as the human coordination gate, and enable branch protection for existing Windows/Chromium checks (or a dedicated required coordination check if introduced later) through repository Settings when available. This policy does not magically observe unpushed private ChatGPT threads. diff --git a/scripts/check_workstream_coordination.mjs b/scripts/check_workstream_coordination.mjs index bb678a561..64adb8976 100644 --- a/scripts/check_workstream_coordination.mjs +++ b/scripts/check_workstream_coordination.mjs @@ -200,6 +200,44 @@ export function requiresUiSmoke(paths) { ].includes(path)); } + +// Native qualification is intentionally narrower than "integration/**": +// C++ headers/translation units require a real MSVC+JUCE build, whereas +// isolated policy/docs/JS can finish without a paid Windows runner. +// This is the single PR file-scope authority for the reusable native job. +export function requiresNativeQualification(paths) { + return paths.some(path => + path === 'CMakeLists.txt' || + path.startsWith('src/') || + path.startsWith('engine/') || + path.startsWith('integration/console-v6/') || + /^integration\/.*\.(?:h|hpp|hh|hxx|c|cc|cpp|cxx)$/i.test(path) || + path === '.github/workflows/p1-windows.yml' || + ['web/approved-native-bridge.js', 'web/approved-native-contract.js', + 'web/bridge.js', 'web/monitor.js', + 'tests/approved_native_m2_contract.test.cjs', + 'tests/approved_native_gui_bundle_test.py', + 'scripts/build_approved_native_gui.py', + 'scripts/package_native_windows.ps1', + 'scripts/verify_native_windows_artifact.ps1', + 'scripts/collect_hardware_fat_windows.ps1', + 'scripts/console_v6_fat_gate.mjs', + 'scripts/verify_console_s0_native_fixture.mjs', + 'scripts/run_console_native_s0.mjs', + 'scripts/check_console_puzzle.mjs', + 'scripts/check_approved_native_gui_release.mjs', + 'scripts/check_pr278_console_authority.mjs', + 'scripts/factoryfx_release_bundle.py', + 'scripts/m3e_fat_evidence_gate.mjs', + 'config/factoryfx-approved-releases.json', + 'tests/live_graph_contract_test.mjs'].includes(path) || + path.startsWith('config/factoryfx-notices/') || + /^tests\/[^/]+\.cpp$/i.test(path) || + /^tests\/[^/]*native[^/]*contract[^/]*\.mjs$/i.test(path) || + /^tests\/(?:m3e_fat_evidence_gate|console_v6_fat_gate)\.test\.mjs$/.test(path) || + path === 'scripts/tests/test_factoryfx_release_bundle.py'); +} + export async function auditGitHub({repo,number,token}) { if (!/^[a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+$/.test(repo)) throw Error('Invalid repository selector'); @@ -223,7 +261,9 @@ export async function auditGitHub({repo,number,token}) { } const result = audit({pr,files:files.map(f=>f.filename),others,filesByPR, fileStatuses:Object.fromEntries(files.map(f=>[f.filename,f.status]))}); - return {...result, runUi: requiresUiSmoke(files.map(f=>f.filename))}; + const changedPaths = files.map(f=>f.filename); + return {...result, runUi: requiresUiSmoke(changedPaths), + runNative: requiresNativeQualification(changedPaths)}; } async function main() { const args=process.argv.slice(2); @@ -238,8 +278,11 @@ async function main() { number,token:process.env.GH_TOKEN || '' }); if (process.env.GITHUB_OUTPUT) { - appendFileSync(process.env.GITHUB_OUTPUT, 'run_ui='+(result.runUi?'true':'false')+'\n'); + appendFileSync(process.env.GITHUB_OUTPUT, 'run_ui='+(result.runUi?'true':'false')+'\n'+ + 'run_native='+(result.runNative?'true':'false')+'\n'); } + console.log('Qualification scope: ui='+(result.runUi?'yes':'no')+ + ' native='+(result.runNative?'yes':'no')); console.log('ArSonMix coordination: lane='+(result.lane||'UNDECLARED')+ ' files='+result.changedFiles+' legacy='+result.legacy+ ' authorized='+result.ok+' collision(s)='+result.activeCollisions); diff --git a/tests/ci_workflow_efficiency_test.mjs b/tests/ci_workflow_efficiency_test.mjs index 5c18df988..a2bfbdf5f 100644 --- a/tests/ci_workflow_efficiency_test.mjs +++ b/tests/ci_workflow_efficiency_test.mjs @@ -3,9 +3,9 @@ import test from 'node:test'; import assert from 'node:assert/strict'; import {readFileSync} from 'node:fs'; -import {requiresUiSmoke} from '../scripts/check_workstream_coordination.mjs'; +import {requiresUiSmoke, requiresNativeQualification} from '../scripts/check_workstream_coordination.mjs'; -const read = path => readFileSync(path, 'utf8'); +const read = path => readFileSync(path, 'utf8').replace(/\r\n/g, '\n'); const native = read('.github/workflows/p1-windows.yml'); const ui = read('.github/workflows/ui-smoke.yml'); const pages = read('.github/workflows/pages-publish.yml'); @@ -36,8 +36,9 @@ function globMatches(pattern, filename) { return new RegExp(regex + '$').test(filename); } -const windowsPush = pathsFor(native, 'push', 'pull_request'); -const windowsPR = pathsFor(native, 'pull_request', 'workflow_dispatch'); +const windowsPush = pathsFor(native, 'push', 'workflow_call'); +// Pull requests are always admitted; this exact classifier decides whether to call reusable MSVC. +const nativePrSelected = filename => requiresNativeQualification([filename]); const uiPush = pathsFor(ui, 'push', 'pull_request'); // Unfiltered PR entry runs cheap admission; only UI-relevant paths run browser. const uiPRSelected = filename => requiresUiSmoke([filename]); @@ -51,7 +52,7 @@ test('visual GUI changes never consume Windows native runner on a PR or on main' ]) { assert.ok(uiPRSelected(filename), filename + ' must run frontend PR checks'); assert.ok(selected(uiPush, filename), filename + ' must qualify Pages'); - assert.equal(selected(windowsPR, filename), false, filename + ' wrongly triggers native PR'); + assert.equal(nativePrSelected(filename), false, filename + ' wrongly triggers native PR'); assert.equal(selected(windowsPush, filename), false, filename + ' wrongly triggers native main'); } }); @@ -61,7 +62,7 @@ test('native PCM and device changes always use Windows/CTest, never Chromium by 'src/LiveAudioEngine.h', 'engine/core/DynamicPreparedMixerBlock.h', 'tests/channel_routing_contract_test.cpp' ]) { - assert.ok(selected(windowsPR, filename), filename + ' must qualify native PR'); + assert.ok(nativePrSelected(filename), filename + ' must qualify native PR'); assert.ok(selected(windowsPush, filename), filename + ' must qualify native main'); assert.equal(uiPRSelected(filename), false, filename + ' wrongly triggers browser PR'); assert.equal(selected(uiPush, filename), false, filename + ' wrongly triggers browser main'); @@ -81,7 +82,7 @@ test('approved Pages to JUCE build seam is a native gate, never an unrelated CSS 'scripts/build_approved_native_gui.py', 'tests/approved_native_gui_bundle_test.py' ]) { - assert.ok(selected(windowsPR,filename), filename+' must run native build on PR'); + assert.ok(nativePrSelected(filename), filename+' must run native build on PR'); assert.ok(selected(windowsPush,filename), filename+' must rebuild native main bundle'); } assert.match(native,/Check approved Pages GUI provenance before costly JUCE checkout/); @@ -91,20 +92,22 @@ test('native WebView bridge and integration genuinely require both owners', () = for (const filename of [ 'web/bridge.js', 'web/monitor.js', 'integration/console-v6/contract.json' ]) { - for (const paths of [windowsPush, windowsPR, uiPush]) { + for (const paths of [windowsPush, uiPush]) { assert.ok(selected(paths, filename), filename + ' needs native+GUI checks'); } assert.ok(uiPRSelected(filename),filename+' needs PR Chromium tests'); + assert.ok(nativePrSelected(filename),filename+' needs PR native tests'); } }); test('docs and isolated CI tests do not fan out into unrelated builds', () => { - const paths = [windowsPR, windowsPush, uiPush]; + const paths = [windowsPush, uiPush]; for (const filename of [ 'README.md', 'docs/workstreams/START_HERE_WIRE_FIRST_20261104.md' ]) { assert.ok(paths.every(p => !selected(p, filename)), 'Doc triggered CI: ' + filename); assert.equal(uiPRSelected(filename),false,'Doc only needs lightweight PR admission: '+filename); + assert.equal(nativePrSelected(filename),false,'Doc must not compile native: '+filename); } for (const filename of [ 'tests/pages_wire_first_canonical_main_smoke.py', @@ -112,7 +115,7 @@ test('docs and isolated CI tests do not fan out into unrelated builds', () => { 'tests/wire_main_native_handoff_contract.test.cjs', 'tests/ci_workflow_efficiency_test.mjs' ]) { - assert.equal(selected(windowsPR, filename), false); + assert.equal(nativePrSelected(filename), false); assert.equal(selected(windowsPush, filename), false); assert.equal(uiPRSelected(filename), true); assert.equal(selected(uiPush, filename), true); @@ -170,3 +173,24 @@ test('M2.6 always-on coordination job has a stable name and skips unrelated Chro assert.match(ui,/needs\.coordination\.outputs\.run_ui == 'true'/); assert.match(ui,/node --test tests\/workstream_coordination_contract\.test\.mjs/); }); + +test('P0 single product qualification fans in exact scoped native and UI jobs',()=>{ + assert.match(native,/^ workflow_call:/m); + assert.doesNotMatch(native,/^ pull_request:/m); + assert.match(ui,/uses: \.\/\.github\/workflows\/p1-windows\.yml/); + assert.match(ui,/name: Product Qualification/); + assert.match(ui,/needs: \[coordination, frontend, native\]/); + assert.match(ui,/NATIVE_RESULT.*needs\.native\.result/); + assert.match(ui,/UI_RESULT.*needs\.frontend\.result/); + assert.match(ui,/if: \$\{\{ always\(\) && github\.event_name == 'pull_request' \}\}/); + for(const path of [ + 'integration/ApprovedNativeRuntimeSnapshot.h', + 'integration/ApprovedNativeV8Projection.h', + 'integration/ApprovedNativeControlIntent.h', + 'scripts/check_console_puzzle.mjs', + 'scripts/check_approved_native_gui_release.mjs' + ]) assert.ok(nativePrSelected(path),path+' bypassed native build'); + for(const path of ['docs/workstreams/MULTI_AGENT_COORDINATION.md', + 'site/preview/assets/mixer-fader-assembly.css']) + assert.equal(nativePrSelected(path),false,path+' wrongly launches Windows'); +}); diff --git a/tests/workstream_coordination_contract.test.mjs b/tests/workstream_coordination_contract.test.mjs index 012e57f5a..34432af9a 100644 --- a/tests/workstream_coordination_contract.test.mjs +++ b/tests/workstream_coordination_contract.test.mjs @@ -2,7 +2,7 @@ import test from 'node:test'; import assert from 'node:assert/strict'; import {readFileSync} from 'node:fs'; -import {POLICY_EPOCH_PR, ownerOf, metadata, audit, requiresUiSmoke} from '../scripts/check_workstream_coordination.mjs'; +import {POLICY_EPOCH_PR, ownerOf, metadata, audit, requiresUiSmoke, requiresNativeQualification} from '../scripts/check_workstream_coordination.mjs'; const body=(lane,issue=397,parked=false)=> '\n'+ @@ -195,14 +195,17 @@ test('existing #396/#398 remain advisory, first strict PR is #400',()=>{ }); test('coordinator uses existing native + Chromium CI, not a fifth workflow',()=>{ - const native=readFileSync('.github/workflows/p1-windows.yml','utf8'); - const ui=readFileSync('.github/workflows/ui-smoke.yml','utf8'); - for(const text of [native,ui]){ - assert.match(text,/scripts\/check_workstream_coordination\.mjs --pr/); - assert.match(text,/pull-requests: read/); - assert.match(text,/ready_for_review/); - assert.match(text,/GH_TOKEN: \$\{\{ github\.token \}\}/); + const native=readFileSync('.github/workflows/p1-windows.yml','utf8').replace(/\r\n/g,'\n'); + const ui=readFileSync('.github/workflows/ui-smoke.yml','utf8').replace(/\r\n/g,'\n'); + for(const workflow of [native,ui]) { + assert.match(workflow,/scripts\/check_workstream_coordination\.mjs --pr/); + assert.match(workflow,/pull-requests: read/); + assert.match(workflow,/GH_TOKEN: \$\{\{ github\.token \}\}/); } + assert.match(native,/workflow_call:/); + assert.doesNotMatch(native,/^ pull_request:/m); + assert.match(ui,/ready_for_review/); + assert.match(ui,/uses: \.\/\.github\/workflows\/p1-windows\.yml/); const guide=readFileSync('AGENTS.md','utf8'); assert.match(guide,/MULTI_AGENT_COORDINATION\.md/); assert.match(guide,/#397/); @@ -221,7 +224,7 @@ test('M2.6 always-on PR admission scopes Chromium to UI changes',()=>{ '.github/workflows/ui-smoke.yml' ]) assert.equal(requiresUiSmoke([path]),true,path); assert.equal(requiresUiSmoke(['README.md','src/Main.cpp','site/preview/index.html']),true); - const workflow=readFileSync('.github/workflows/ui-smoke.yml','utf8'); + const workflow=readFileSync('.github/workflows/ui-smoke.yml','utf8').replace(/\r\n/g,'\n'); const prBlock=workflow.split('\n pull_request:\n')[1]?.split('\n # Manual full suite')[0] || ''; assert.ok(prBlock,'missing PR event'); assert.doesNotMatch(prBlock,/^\s+paths:/m,'PR entrypoint must not filter docs or PCM PRs'); @@ -229,3 +232,51 @@ test('M2.6 always-on PR admission scopes Chromium to UI changes',()=>{ assert.match(workflow,/needs: coordination/); assert.match(workflow,/needs\.coordination\.outputs\.run_ui/); }); + +test('P0 native qualification is precise: native ABI/release scripts yes, docs/GUI no',()=>{ + for(const path of [ + 'src/LiveAudioEngine.h','engine/core/PreparedMixerBlock.h', + 'integration/ApprovedNativeRuntimeSnapshot.h', + 'integration/ApprovedNativeControlIntent.h', + 'integration/Deep/NativeBridge.cpp', + 'integration/console-v6/m4-operator-routing.mjs', + 'scripts/check_console_puzzle.mjs', + 'scripts/check_approved_native_gui_release.mjs', + 'scripts/package_native_windows.ps1', + 'tests/approved_native_v8_projection_test.cpp', + '.github/workflows/p1-windows.yml' + ]) assert.equal(requiresNativeQualification([path]),true,path); + for(const path of [ + 'README.md','docs/QUALITY.md','site/preview/index.html', + 'web/mixer-layout.js','tests/pages_wire_first_canonical_main_smoke.py', + 'tests/ci_workflow_efficiency_test.mjs', + 'integration/m4_operator_status.md', + 'integration/other_frontend.mjs' + ]) assert.equal(requiresNativeQualification([path]),false,path); + assert.equal(requiresNativeQualification(['README.md','integration/ApprovedNativeV8Projection.h']),true); +}); + +test('P0 product verdict is a fail-closed fan-in with no duplicate PR Windows build',()=>{ + const ui=readFileSync('.github/workflows/ui-smoke.yml','utf8').replace(/\r\n/g,'\n'); + const windows=readFileSync('.github/workflows/p1-windows.yml','utf8').replace(/\r\n/g,'\n'); + assert.match(ui,/name: Product Qualification/); + assert.match(ui,/needs: \[coordination, frontend, native\]/); + assert.match(ui,/always\(\) && github\.event_name == 'pull_request'/); + assert.match(ui,/uses: \.\/\.github\/workflows\/p1-windows\.yml/); + assert.match(ui,/needs\.coordination\.outputs\.run_native == 'true'/); + assert.match(ui,/NATIVE_RESULT.*needs\.native\.result/); + assert.match(ui,/UI_RESULT.*needs\.frontend\.result/); + assert.match(ui,/RUN_NATIVE.*needs\.coordination\.outputs\.run_native/); + assert.match(ui,/\$RUN_NATIVE.*true.*\$NATIVE_RESULT.*success/); + assert.match(windows,/^ workflow_call:/m); + assert.doesNotMatch(windows,/^ pull_request:/m); + assert.match(windows,/ctest --test-dir build -C Release --output-on-failure/); +}); + +test('P0 Windows checkout CRLF cannot suppress the PR event in coordination test',()=>{ + const workflow=readFileSync('.github/workflows/ui-smoke.yml','utf8').replace(/\r\n/g,'\n'); + const windowsCheckout=workflow.replace(/\n/g,'\r\n'); + const normalized=windowsCheckout.replace(/\r\n/g,'\n'); + const prBlock=normalized.split('\n pull_request:\n')[1]?.split('\n # Manual full suite')[0]; + assert.ok(prBlock, 'CRLF normalization must keep real pull_request trigger'); +});