feat(ci): publish tested main snapshots with matching web assets #5896

Closed
Recapi wants to merge 1 commit from upstream-pr/5896 into main
Recapi commented 2026-10-14 15:02:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Recapi on 2026-10-14T15:02:37Z.


What

Fixes #5381 by publishing the browser converter, frontend and both native library sets from the same tested main commit.

  • Reuse the existing Linux/Windows full Build jobs: after tests and skip checks, package their native relinker and patched libraries. Add a push-to-main-only WASM build and conversion smoke job.
  • Run snapshot-producing native jobs on fresh GitHub-hosted runners without restoring caches writable by manual PR code. Keep manual Linux PR builds on the existing self-hosted runner.
  • After a successful automatic main Build, download artifacts from that exact run and publish an immutable vdev-<full SHA> prerelease containing native binaries, ZIP/tar library archives, the complete web site and user documentation. PR and manual combined-PR builds cannot publish. Development tags are excluded from the stable Release workflow and are never marked latest.
  • Publish the full set as a draft before making it visible. Recover interrupted drafts; reject incomplete already-published snapshots. Reruns of a published snapshot restore its original web archive instead of rebuilding/replacing public assets.
  • Pages selects a successful snapshot of current main, not just the triggering run, under job-level serialized concurrency and a final current-main check. Unrelated/stale workflow completions cannot displace the only valid pending deployment. Failed/incomplete/superseded builds preserve the current site.
  • release.json records the SHA, tag, commit-scoped frontend/converter URLs and content-addressed library URLs, sizes and hashes. The browser uses the selected manifest without the latest-release API. Frontend, worker, archive module, CSS and WASM use the same commit namespace; stale cached frontend/manifest combinations fail with a reload instruction instead of mixing versions.
  • Document the release lifecycle and local assembly in docs/dev/BUILD.md.

Related closed PRs #5409 and #5710 align the website with tagged stable releases. This PR takes the different approach of automatic tested-main snapshots. It does not reuse their patches. Publication changes overlap conceptually and should not be merged as parallel deployment mechanisms.

Tested

Linux x86-64, GCC 15.2.0, Python 3.14.4, Emscripten 6.0.3, Node 24 from emsdk and managed Chromium 153. Final head 6c0809d14a1f8bbc1b8f777ee748aa8f6caf0a3c, based on main 84b01f9cd042e1d2e9e112f8783aa5a9d26399ee. CTest and WASM smoke were rerun after the final rebase at d253870af; the only later change clears the Windows compiler launcher for uncached snapshot builds. Final workflow lint and conventions pass. Browser/local publication checks were on 7a1710289, before that rebase.

  • Relinker-only Release build and CTest: 166/166 passed, no failures. This includes the new web snapshot suite (14 behavioral cases) and existing release packaging suite (19 cases).
  • actionlint passes for Build, Snapshots, Pages and Release; conventions and test-registration checks pass (29 test executables, none built and unregistered).
  • Real WASM Release build and existing web conversion smoke pass: ZIP/folder inputs for Windows/Linux, guest modules, original files, permissions, streamed ZIP/directory output, validation and download budget.
  • Executed the local assembly and full-web packaging CLIs with real WASM and isolated fixture library archives. In real Chromium, converted generated ELF fixtures through the UI to Linux ELF and Windows PE and observed the version in the result. Network requests for CSS, frontend, worker, archive module and WASM all used the same commit namespace. The Linux ELF matched native relinker output byte-for-byte. A cached frontend paired with a newer manifest failed with the reload message and kept conversion disabled. The earlier converter-only version also passed a stale-asset removal check. These were generated fixtures, not games; fixture library archives do not qualify native library execution.
  • Executed the workflow's actual published-web restoration script against the generated full-web ZIP, checked restored metadata, rejected a traversal ZIP before extraction, and ran the WASM conversion smoke against the restored site.
  • Throwaway workflow smoke executed the actual publisher/Pages JavaScript and main-push condition with simulated GitHub API responses: main push acceptance; PR/manual/failed/cancelled/wrong-branch/wrong-workflow/fork denial; current/stale/expired/manual Pages selection, including an unrelated trigger and a valid snapshot beyond the first 100 records; new/draft/published/incomplete/wrong-tag release transitions. Exercised the Linux runner expression: hosted for automatic main pushes, self-hosted for manual PR builds. A tiny native CMake build verified that an empty launcher override builds and runs without ccache; this is not a Windows runner execution.

No full native Linux/Windows library rebuild, Windows executable run, official GitHub prerelease publication or upstream Pages deployment was performed. The remote Build → Snapshots → Pages chain needs the workflows on the upstream default branch; the live service is unchanged by opening this PR.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw; no silent stubs added
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source: none added
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none (publication/version consistency; no game bring-up run)
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4859905305 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5896). Originally posted by [Recapi](https://github.com/Recapi) on 2026-10-14T15:02:37Z. --- ### What Fixes #5381 by publishing the browser converter, frontend and both native library sets from the same tested `main` commit. - Reuse the existing Linux/Windows full Build jobs: after tests and skip checks, package their native relinker and patched libraries. Add a push-to-main-only WASM build and conversion smoke job. - Run snapshot-producing native jobs on fresh GitHub-hosted runners without restoring caches writable by manual PR code. Keep manual Linux PR builds on the existing self-hosted runner. - After a successful automatic main Build, download artifacts from that exact run and publish an immutable `vdev-<full SHA>` prerelease containing native binaries, ZIP/tar library archives, the complete web site and user documentation. PR and manual combined-PR builds cannot publish. Development tags are excluded from the stable Release workflow and are never marked latest. - Publish the full set as a draft before making it visible. Recover interrupted drafts; reject incomplete already-published snapshots. Reruns of a published snapshot restore its original web archive instead of rebuilding/replacing public assets. - Pages selects a successful snapshot of current main, not just the triggering run, under job-level serialized concurrency and a final current-main check. Unrelated/stale workflow completions cannot displace the only valid pending deployment. Failed/incomplete/superseded builds preserve the current site. - `release.json` records the SHA, tag, commit-scoped frontend/converter URLs and content-addressed library URLs, sizes and hashes. The browser uses the selected manifest without the latest-release API. Frontend, worker, archive module, CSS and WASM use the same commit namespace; stale cached frontend/manifest combinations fail with a reload instruction instead of mixing versions. - Document the release lifecycle and local assembly in `docs/dev/BUILD.md`. Related closed PRs #5409 and #5710 align the website with tagged stable releases. This PR takes the different approach of automatic tested-main snapshots. It does not reuse their patches. Publication changes overlap conceptually and should not be merged as parallel deployment mechanisms. ### Tested Linux x86-64, GCC 15.2.0, Python 3.14.4, Emscripten 6.0.3, Node 24 from emsdk and managed Chromium 153. Final head `6c0809d14a1f8bbc1b8f777ee748aa8f6caf0a3c`, based on main `84b01f9cd042e1d2e9e112f8783aa5a9d26399ee`. CTest and WASM smoke were rerun after the final rebase at `d253870af`; the only later change clears the Windows compiler launcher for uncached snapshot builds. Final workflow lint and conventions pass. Browser/local publication checks were on `7a1710289`, before that rebase. - Relinker-only Release build and CTest: 166/166 passed, no failures. This includes the new web snapshot suite (14 behavioral cases) and existing release packaging suite (19 cases). - `actionlint` passes for Build, Snapshots, Pages and Release; conventions and test-registration checks pass (29 test executables, none built and unregistered). - Real WASM Release build and existing web conversion smoke pass: ZIP/folder inputs for Windows/Linux, guest modules, original files, permissions, streamed ZIP/directory output, validation and download budget. - Executed the local assembly and full-web packaging CLIs with real WASM and isolated fixture library archives. In real Chromium, converted generated ELF fixtures through the UI to Linux ELF and Windows PE and observed the version in the result. Network requests for CSS, frontend, worker, archive module and WASM all used the same commit namespace. The Linux ELF matched native relinker output byte-for-byte. A cached frontend paired with a newer manifest failed with the reload message and kept conversion disabled. The earlier converter-only version also passed a stale-asset removal check. These were generated fixtures, not games; fixture library archives do not qualify native library execution. - Executed the workflow's actual published-web restoration script against the generated full-web ZIP, checked restored metadata, rejected a traversal ZIP before extraction, and ran the WASM conversion smoke against the restored site. - Throwaway workflow smoke executed the actual publisher/Pages JavaScript and main-push condition with simulated GitHub API responses: main push acceptance; PR/manual/failed/cancelled/wrong-branch/wrong-workflow/fork denial; current/stale/expired/manual Pages selection, including an unrelated trigger and a valid snapshot beyond the first 100 records; new/draft/published/incomplete/wrong-tag release transitions. Exercised the Linux runner expression: hosted for automatic main pushes, self-hosted for manual PR builds. A tiny native CMake build verified that an empty launcher override builds and runs without ccache; this is not a Windows runner execution. No full native Linux/Windows library rebuild, Windows executable run, official GitHub prerelease publication or upstream Pages deployment was performed. The remote Build → Snapshots → Pages chain needs the workflows on the upstream default branch; the live service is unchanged by opening this PR. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw; no silent stubs added - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source: none added - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none (publication/version consistency; no game bring-up run) - [x] GPUs tested: n/a - [x] AI-assisted: yes
Recapi commented 2026-10-14 22:58:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Recapi on 2026-10-14T22:58:32Z.


Rebased onto main 6239ceffc; new head d99a3c0fe. Conflicts and follow-ups from the main changes since the last head:

  • tools/build_web.py / tools/tests/test_build_web.py (c7800dd96): the duplicate and case-colliding library path check now runs in the snapshot archive validation. Its cases (exact duplicate, case collision, directory/file collision, distinct nested paths) are in the same suite, which keeps the web_library_assets CTest name.
  • demo/web/worker.mjs (f496c0854, 244200708): kept the per-target conversion limit and the Windows-only icon budget. The latest-release API check and its rate-limit fallback are removed with this PR, so their worker tests in archive.test.mjs are replaced by a test that the worker rejects a manifest from another site revision before downloading libraries.
  • demo/web/output-directory.mjs (new on main, imported by app.mjs) is now part of the commit-scoped frontend, so the scoped app.mjs loads it from the same commit.
  • build.yml (808790823, abfdd4b83): push builds still set full, so every main push produces the native artifacts. The hosted Linux snapshot build uses 4 build/test jobs instead of the self-hosted runner's 1. The Windows push build no longer restores the main-scoped ccache that manual PR builds can write, but still saves it for manual builds; its timeout is 60 min for cold push builds.

Linux (GCC 15.2.0, Python 3.14.4, Emscripten 6.0.3): web_library_assets 15/15, release_package 23 (3 symlink skips), actionlint on all workflows, conventions and test registration pass. Relinker-only CTest: 170/172; the two failures are file_writer_binary and file_writer_text from main's FileWriterTests.cpp, which this PR does not touch. They copy /bin/sleep under another name, and on this host /bin/sleep is the uutils multicall binary (coreutils: unknown program 'running'). Real WASM build and tools/test_web.py pass, including the new folder-output and archive-root tests. In Chromium, a locally assembled snapshot (fixture library ZIPs) converted generated ELF fixtures to Windows and Linux. CSS, app.mjs, output-directory.mjs, worker, archive module and WASM all loaded from native/<commit>/, with no page errors.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6180346745 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5896#issuecomment-6180346745). Originally posted by [Recapi](https://github.com/Recapi) on 2026-10-14T22:58:32Z. --- Rebased onto `main` `6239ceffc`; new head `d99a3c0fe`. Conflicts and follow-ups from the main changes since the last head: - `tools/build_web.py` / `tools/tests/test_build_web.py` (c7800dd96): the duplicate and case-colliding library path check now runs in the snapshot archive validation. Its cases (exact duplicate, case collision, directory/file collision, distinct nested paths) are in the same suite, which keeps the `web_library_assets` CTest name. - `demo/web/worker.mjs` (f496c0854, 244200708): kept the per-target conversion limit and the Windows-only icon budget. The latest-release API check and its rate-limit fallback are removed with this PR, so their worker tests in `archive.test.mjs` are replaced by a test that the worker rejects a manifest from another site revision before downloading libraries. - `demo/web/output-directory.mjs` (new on main, imported by `app.mjs`) is now part of the commit-scoped frontend, so the scoped `app.mjs` loads it from the same commit. - `build.yml` (808790823, abfdd4b83): push builds still set `full`, so every main push produces the native artifacts. The hosted Linux snapshot build uses 4 build/test jobs instead of the self-hosted runner's 1. The Windows push build no longer restores the main-scoped ccache that manual PR builds can write, but still saves it for manual builds; its timeout is 60 min for cold push builds. Linux (GCC 15.2.0, Python 3.14.4, Emscripten 6.0.3): `web_library_assets` 15/15, `release_package` 23 (3 symlink skips), `actionlint` on all workflows, conventions and test registration pass. Relinker-only CTest: 170/172; the two failures are `file_writer_binary` and `file_writer_text` from main's `FileWriterTests.cpp`, which this PR does not touch. They copy `/bin/sleep` under another name, and on this host `/bin/sleep` is the uutils multicall binary (`coreutils: unknown program 'running'`). Real WASM build and `tools/test_web.py` pass, including the new folder-output and archive-root tests. In Chromium, a locally assembled snapshot (fixture library ZIPs) converted generated ELF fixtures to Windows and Linux. CSS, `app.mjs`, `output-directory.mjs`, worker, archive module and WASM all loaded from `native/<commit>/`, with no page errors.
github-actions[bot] commented 2026-10-14 23:15:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-14T23:15:26Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#5729 tools/package_release.py L22-23
#6190 demo/web/app.mjs L229
demo/web/tests/archive.test.mjs L200-212, L222-223
demo/web/worker.mjs L17-18, L61-66, L96-97, L110, L112-115

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
#674 .github/workflows/release.yml
docs/dev/BUILD.md
tools/package_release.py
#1835 docs/dev/BUILD.md
#3891 docs/dev/BUILD.md
#4156 docs/dev/BUILD.md
#4396 docs/dev/BUILD.md
#4397 docs/dev/BUILD.md
#4422 docs/dev/BUILD.md
#4423 docs/dev/BUILD.md
#4424 docs/dev/BUILD.md
#4520 docs/dev/BUILD.md
#4521 docs/dev/BUILD.md
#4522 docs/dev/BUILD.md
#4523 docs/dev/BUILD.md
#4566 docs/dev/BUILD.md
#4599 docs/dev/BUILD.md
#4718 docs/dev/BUILD.md
#4740 docs/dev/BUILD.md
#4749 docs/dev/BUILD.md
#4760 docs/dev/BUILD.md
#4813 docs/dev/BUILD.md
#5021 docs/dev/BUILD.md
#5797 tools/package_release.py
#6044 .github/workflows/build.yml
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6180584368 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5896#issuecomment-6180584368). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-14T23:15:26Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #5729 | `tools/package_release.py` [L22-23](https://github.com/boykopovar/AnyPS5/blob/34454bd835ce334c3c395467da50546b433fe200/tools/package_release.py#L22-L23) | | | | #6190 | `demo/web/app.mjs` [L229](https://github.com/boykopovar/AnyPS5/blob/34454bd835ce334c3c395467da50546b433fe200/demo/web/app.mjs#L229)<br>`demo/web/tests/archive.test.mjs` [L200-212](https://github.com/boykopovar/AnyPS5/blob/34454bd835ce334c3c395467da50546b433fe200/demo/web/tests/archive.test.mjs#L200-L212), [L222-223](https://github.com/boykopovar/AnyPS5/blob/34454bd835ce334c3c395467da50546b433fe200/demo/web/tests/archive.test.mjs#L222-L223)<br>`demo/web/worker.mjs` [L17-18](https://github.com/boykopovar/AnyPS5/blob/34454bd835ce334c3c395467da50546b433fe200/demo/web/worker.mjs#L17-L18), [L61-66](https://github.com/boykopovar/AnyPS5/blob/34454bd835ce334c3c395467da50546b433fe200/demo/web/worker.mjs#L61-L66), [L96-97](https://github.com/boykopovar/AnyPS5/blob/34454bd835ce334c3c395467da50546b433fe200/demo/web/worker.mjs#L96-L97), [L110](https://github.com/boykopovar/AnyPS5/blob/34454bd835ce334c3c395467da50546b433fe200/demo/web/worker.mjs#L110), [L112-115](https://github.com/boykopovar/AnyPS5/blob/34454bd835ce334c3c395467da50546b433fe200/demo/web/worker.mjs#L112-L115) | | | Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | #674 | `.github/workflows/release.yml`<br>`docs/dev/BUILD.md`<br>`tools/package_release.py` | | #1835 | `docs/dev/BUILD.md` | | #3891 | `docs/dev/BUILD.md` | | #4156 | `docs/dev/BUILD.md` | | #4396 | `docs/dev/BUILD.md` | | #4397 | `docs/dev/BUILD.md` | | #4422 | `docs/dev/BUILD.md` | | #4423 | `docs/dev/BUILD.md` | | #4424 | `docs/dev/BUILD.md` | | #4520 | `docs/dev/BUILD.md` | | #4521 | `docs/dev/BUILD.md` | | #4522 | `docs/dev/BUILD.md` | | #4523 | `docs/dev/BUILD.md` | | #4566 | `docs/dev/BUILD.md` | | #4599 | `docs/dev/BUILD.md` | | #4718 | `docs/dev/BUILD.md` | | #4740 | `docs/dev/BUILD.md` | | #4749 | `docs/dev/BUILD.md` | | #4760 | `docs/dev/BUILD.md` | | #4813 | `docs/dev/BUILD.md` | | #5021 | `docs/dev/BUILD.md` | | #5797 | `tools/package_release.py` | | #6044 | `.github/workflows/build.yml` |

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!5896
No description provided.