Skip to content

ci: smoke-test packages, harden release publishing, check the site before deploy - #125

Open
bodencrouch wants to merge 1 commit into
mainfrom
ci/release-pages-hardening
Open

bodencrouch wants to merge 1 commit into
mainfrom
ci/release-pages-hardening

Conversation

@bodencrouch

Copy link
Copy Markdown
Owner

Fixes found by auditing release.yml, package-manual.yml and pages.yml for steps that could pass without doing their job.

Finding Fix
No packaged binary was ever started before publishing package-manual unpacks each package on its native runner, checks the binary's SHA-256 against the build receipt, and runs modsync --version (must exit 0 and print modsync <ver>). The result goes into lane.json → smokeTest.
Release accepted "≥ 1 package" Requires exactly one package per target in packaging/targets.json at the release commit.
A tag left by a failed run made the release point at the tag while packages came from a newer commit prepare fails if the tag exists at a different commit.
Nexus duplicate check: gh release view … | jq -e inside if, so an API error read as "not uploaded" and re-uploaded (archiving the live file) Assets are read first; an API error fails the step.
Nexus-Mods/upload-action (gets the API key) and download-artifact used moveable tags Pinned to commits (v1.0.0-beta.11, v6.0.0 to match upload-artifact v6).
Pages deployed site/ unchecked site_check.py refuses a missing index.html or a broken/escaping local link; its unit test runs it on the real site, so every PR checks it.
Comments said nothing publishes these packages Corrected (package-manual.yml, packaging/README.md).

Not changed (needs a decision): a Nexus leg still skips green when its secret or file-ID variable is unset. That's deliberate so forks release cleanly. Making it required in this repo would fail releases until Nexus is configured.

Verification

  • actionlint 1.7.12: clean. Contract suite: 1340 OK, including 6 new test_site_check.py tests. site_check.py site reports 14 pages with 0 problems.
  • The smoke step only runs on real runners: I'll dispatch package-manual on this branch and report all 7 lanes here before merging.

Generated by Claude Code

…fore deploy

Audit findings on release.yml, package-manual.yml and pages.yml:
- Packages were published without any binary ever being started.
  package-manual now unpacks each package on its native runner, checks the
  binary against its build receipt, and runs `modsync --version`.
- release.yml required "at least one" package; it now requires exactly one
  per target listed in packaging/targets.json at the release commit.
- A tag left by a failed run made `gh release create --target` publish
  packages from a different commit than the tag. prepare now refuses when
  the tag exists at another commit.
- The Nexus duplicate-upload check piped `gh release view` into `jq -e`
  inside an `if`, so an API error read as "not uploaded" and re-uploaded.
  It now reads the assets first, so an API error fails the step.
- Nexus-Mods/upload-action (which receives the API key) and
  download-artifact were tag-pinned; both are now commit-pinned.
- pages.yml deployed site/ with no checks. site_check.py now refuses a
  missing index.html or a broken local link; its tests also run the check
  on the real site, so PRs catch breakage before deploy.
- Stale "nothing publishes these packages" comments corrected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QDKiomK3BZE8fScCAGRfuq

Copy link
Copy Markdown
Owner Author

package (windows-2025, i686-pc-windows-msvc, windows) fails at link time, before the new smoke-test step runs, and is not caused by this PR (the diff touches only workflow files, packaging/README.md and the site checker; no Rust or build inputs).

Root cause: link.exe reports 7 unresolved externals: _RARCloseArchive, _RAROpenArchiveEx, _RARReadHeaderEx, _RARProcessFile, _RARProcessFileW, _RARSetCallback, _RARSetPassword. UnRAR's dll.hpp declares these PASCAL (and callbacks CALLBACK), which on Windows is __stdcall; it defines them empty only under _UNIX. The vendored bindings (vendor/unrar_sys/src/lib.rs) declare them extern "C". On x64 and Unix the two conventions are identical, so it links; on 32-bit Windows stdcall decorates names as _RARCloseArchive@4, so the cdecl names don't resolve.

This target has never linked: package-manual has run twice, the main run was cancelled, and packaging/targets.json marks i686 "nativeAcceptance": "unverified".

Fix (separate PR): declare the FFI block and callback types extern "system" (stdcall on 32-bit Windows, C everywhere else, so identical on every other target). The callback inside the unrar crate (open_archive.rs, extern "C" fn callback) must change with it, so unrar 0.5.8 needs the same local patch as unrar_sys. Changing only the declarations would link but corrupt the stack on 32-bit Windows, because UnRAR calls the callback as stdcall.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QDKiomK3BZE8fScCAGRfuq


Generated by Claude Code

Copy link
Copy Markdown
Owner Author

install (k2, cli, mod-packaged) fails at the baseline step, not because of this PR. The log shows baseline verified: current artifact 14125931616, then baseline request unavailable (OSError) and "No verified k2 baseline is available". That is the cross-filesystem (EXDEV) rename after verification, which #122 fixes in tools/modsync-ci/fullrun_baseline.py. This branch was cut from main before #122, and its diff touches no baseline code.

Once #122 merges, I'll update this branch onto main. #122 itself is waiting on #127, the DeadlyStream pinned-version fix. The i686 package failure noted above is fixed separately in #128.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QDKiomK3BZE8fScCAGRfuq


Generated by Claude Code

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants