name: Native package acceptance on: workflow_call: inputs: candidate: description: Download exact candidate wheels instead of building PR test packages type: boolean default: false candidate_commit: type: string default: '' manifest_sha256: type: string default: '' linux_artifact_id: type: string default: '' windows_artifact_id: type: string default: '' permissions: contents: read jobs: native: name: Native acceptance (${{ matrix.target }}) runs-on: ${{ matrix.os }} timeout-minutes: 60 strategy: fail-fast: false matrix: include: - os: ubuntu-latest target: linux-x64 wheel_tag: manylinux_2_17_x86_64 - os: windows-latest target: win32-x64 wheel_tag: win_amd64 defaults: run: shell: bash steps: - uses: actions/checkout@v4 with: persist-credentials: false - uses: actions/setup-python@v5 with: python-version: '3.11' - uses: oven-sh/setup-bun@v2 if: ${{ !inputs.candidate }} with: bun-version: 1.3.13 bun-download-url: ${{ runner.os == 'Windows' && 'https://github.com/oven-sh/bun/releases/download/bun-v1.3.13/bun-windows-x64-baseline.zip' || '' }} - name: Build native test bundle if: ${{ !inputs.candidate }} working-directory: tui run: | bun install --frozen-lockfile bun run build bun scripts/release-notices.ts "${{ matrix.target }}" python scripts/package-release.py "${{ matrix.target }}" - name: Build native test wheel if: ${{ !inputs.candidate }} run: | python -m pip install --disable-pip-version-check build python -m build --outdir "$RUNNER_TEMP/python-dist" # The archive verifier imports the installed launcher's dependency stack. python -m pip install --disable-pip-version-check "$(find "$RUNNER_TEMP/python-dist" -name '*.whl' -print -quit)" python -m scripts.build_tui_wheels \ --wheel "$(find "$RUNNER_TEMP/python-dist" -name '*.whl' -print -quit)" \ --tui-dir tui/dist --target "${{ matrix.target }}" --out-dir "$RUNNER_TEMP/native-wheel" - name: Download exact candidate wheel and manifest if: inputs.candidate uses: actions/download-artifact@v4 with: # Producer IDs survive a failed-jobs-only retry without rebuilding bytes. artifact-ids: ${{ matrix.target == 'linux-x64' && inputs.linux_artifact_id || inputs.windows_artifact_id }} merge-multiple: true path: ${{ runner.temp }}/native-wheel - name: Verify acceptance input identity env: CANDIDATE: ${{ inputs.candidate }} EXPECTED_COMMIT: ${{ inputs.candidate_commit }} EXPECTED_MANIFEST: ${{ inputs.manifest_sha256 }} WHEEL_TAG: ${{ matrix.wheel_tag }} run: python scripts/native_acceptance_input.py - name: Install acceptance controller dependencies run: python -m pip install --disable-pip-version-check "$ACCEPTANCE_WHEEL" - name: Exercise default Windows path policy if: runner.os == 'Windows' shell: pwsh run: | $key = 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' Set-ItemProperty -Path $key -Name LongPathsEnabled -Value 0 if ((Get-ItemPropertyValue -Path $key -Name LongPathsEnabled) -ne 0) { throw 'Native update acceptance requires LongPathsEnabled=0' } - name: Verify clean public installation and startup run: | python -I scripts/verify_installed_release.py \ --install-wheel "$ACCEPTANCE_WHEEL" --version "$ACCEPTANCE_VERSION" \ --commit "$ACCEPTANCE_COMMIT" --gateway \ --report "$RUNNER_TEMP/native-install-report.json" - name: Verify packaged upgrades and automatic service recovery run: | python -I scripts/verify_packaged_update.py \ --wheel "$ACCEPTANCE_WHEEL" --commit "$ACCEPTANCE_COMMIT" \ --output "$RUNNER_TEMP/packaged-update" --workers 2 # Raw acceptance logs contain disposable credentials. Export only structured evidence. - name: Retain native acceptance evidence if: always() uses: actions/upload-artifact@v4 with: name: native-acceptance-${{ matrix.target }}-${{ github.run_id }}-${{ github.run_attempt }} path: | ${{ runner.temp }}/native-input.json ${{ runner.temp }}/native-install-report.json ${{ runner.temp }}/packaged-update/packaged-update-report.json ${{ runner.temp }}/packaged-update/packaged-update-timings.json ${{ runner.temp }}/packaged-update/*/result.json ${{ runner.temp }}/packaged-update/lane-*/run/*/result.json if-no-files-found: error retention-days: 3