Restore MSI upgrades from beta releases (#656) - #660
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueWarning Your free Security trial is over. An organization admin can upgrade to Advanced for continuous pull request security review or dismiss this notice. Comment |
Reviewer's GuideRestores Windows MSI replacement across successive beta releases and beta-to-final releases by configuring WiX same-version major upgrades, preserving stable workflow wiring, and adding parsed-WiX, workflow, and documentation contract tests. Flow diagram for Windows MSI beta-to-final replacementflowchart LR
Beta1[Beta MSI 0.1.0-beta1] --> Install[Install MSI]
Beta2[Beta MSI 0.1.0-beta2] --> Upgrade[WiX major upgrade]
Final[Final MSI 0.1.0] --> Upgrade
Upgrade --> Replace[Replace existing installation]
Upgrade --> StableFamily[Stable UpgradeCode family]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Configure the WiX package for major upgrades that replace earlier beta packages and promote beta installations to the corresponding final release. Keep the upgrade family stable while allowing WiX to issue a fresh ProductCode for every package, and lock the contract with XML, workflow, and documentation tests.
73d0f95 to
4316c18
Compare
|
@coderabbitai Please investigate the cause of the following issue using codegraph exploration and research, identify a fix and provide an AI coding agent prompt for the fix: https://github.com/leynos/netsuke/actions/runs/33991862694/job/101375401545?pr=660 |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '=== repository status and PR diff summary ==='
git status --short
git diff --stat origin/main...HEAD
git diff --name-status origin/main...HEAD
printf '%s\n' '=== target test outline ==='
ast-grep outline tests/documentation_installation_tests.rs --items all || true
printf '%s\n' '=== assertion and MSI-documentation references ==='
rg -n -C 8 \
"users' guide should document MSI replacement within a version series|MSI replacement|within a version series|beta-to-beta|beta-to-final" \
tests installer .github README.md docs 2>/dev/null || true
printf '%s\n' '=== relevant test source ==='
nl -ba tests/documentation_installation_tests.rs | sed -n '1,260p'
printf '%s\n' '=== changed documentation and test patches ==='
git diff --find-renames origin/main...HEAD -- \
tests/documentation_installation_tests.rs \
':(glob)**/*.md' \
installer/Package.wxs \
.githubLength of output: 1348 🏁 Script executed: #!/bin/bash
set -u
printf '%s\n' '=== checkout and refs ==='
git rev-parse --show-toplevel
git rev-parse HEAD
git branch -a || true
git remote -v || true
printf '%s\n' '=== candidate files ==='
fd -t f . tests installer .github docs 2>/dev/null | \
rg '(documentation_installation_tests\.rs|Package\.wxs|install|guide|user.*guide|\.md$)' || true
printf '%s\n' '=== test outline and source ==='
ast-grep outline tests/documentation_installation_tests.rs --items all 2>&1 || true
nl -ba tests/documentation_installation_tests.rs | sed -n '1,300p' 2>&1 || true
printf '%s\n' '=== exact assertion and nearby documentation matches ==='
rg -n -i -C 10 \
"users' guide should document MSI replacement within a version series|MSI replacement|within a version series|beta.*replace|replace.*beta|Windows.*MSI" \
. -g '!target/**' 2>&1 || true
printf '%s\n' '=== PR `#660` file list and refs ==='
gh pr view 660 --repo leynos/netsuke --json number,headRefName,baseRefName,url,files 2>&1 || trueLength of output: 31509 🏁 Script executed: #!/bin/bash
set -u
printf '%s\n' '=== direct base-to-head patch ==='
git diff --find-renames origin/main..HEAD -- \
docs/users-guide.md \
tests/documentation_installation_tests.rs \
installer/Package.wxs \
tests/installer_package_wxs_tests.rs \
tests/workflow_build_and_package.rs 2>&1 || true
printf '%s\n' '=== source bytes and literal-match diagnosis ==='
python3 - <<'PY'
from pathlib import Path
guide = Path("docs/users-guide.md").read_bytes()
test = Path("tests/documentation_installation_tests.rs").read_text()
needle = "installing a later beta or final MSI\nreplaces the existing installation"
print("guide_has_lf:", needle.encode() in guide)
print("guide_has_crlf:", needle.replace("\n", "\r\n").encode() in guide)
print("guide_line_endings:", "CRLF" if b"\r\n" in guide else "LF-only")
for number, line in enumerate(guide.decode().splitlines(), 1):
if 65 <= number <= 75:
print(f"{number}: {line}")
PY
printf '%s\n' '=== line-ending controls ==='
fd -HI -t f '(\.gitattributes|\.editorconfig|\.gitconfig)' . -x sh -c 'echo --- "$1"; cat "$1"' sh {} 2>&1 || true
git config --get core.autocrlf 2>&1 || true
printf '%s\n' '=== WiX major-upgrade contract ==='
sed -n '1,180p' installer/Package.wxs 2>&1 || true
sed -n '1,220p' tests/installer_package_wxs_tests.rs 2>&1 || trueLength of output: 12298 🤖 web_search executed:
Length of output: 14207
Fix
The test requires that exact string with users_guide.contains(concat!(
"installing a later beta or final MSI\n",
"replaces the existing installation"
))The Windows checkout converts the Markdown file to CRLF because the repository has no Do not change Use this coding-agent prompt: 🐇 You are interacting with an AI system. |
Summary
This branch restores Windows MSI replacement for successive beta releases and
for a final release replacing beta installations in the same release line.
The WiX major-upgrade contract allows same-numeric-version upgrades while
retaining the stable upgrade family and blocking numeric downgrades.
Closes #656.
Review walkthrough
UpgradeCode, early major-upgrade scheduling, and safe same-version replacement.Validation
make check-fmt: passedmake lint: passedmake doc-coverage: passed (99.13%)make test: passed (2,774 nextest tests and doctests)make markdownlint: passedmake nixie: passedcoderabbit review --agent: completed with zero findingsNotes
Functional
msiexecupgrade testing remains deferred: package constructionruns in the external shared action, and this repository has no MSI test
harness. The parsed-WiX and workflow-input contracts cover the authored
upgrade metadata and its stable-family wiring.
References
Summary by Sourcery
Restore same-version Windows MSI upgrades across beta and final releases while retaining downgrade protection.
Bug Fixes:
Enhancements:
Documentation:
Tests: