feat(pr-build): allow selecting and stacking multiple open PRs with pre-build conflict preview #271

Open
Jer9 wants to merge 1 commit from Jer9/LongshotLauncher:feat/pr-build-multi-stack into main
First-time contributor

Summary

Rebases and ports #271 onto the Rust + Slint launcher (#284, main @ 560f789), decoupled from dropped #270:

  • Multi-PR stack backend (src/game/pr_stack.rs):
    • Supports ordered multi-PR selection (>= 2 open PRs) with deterministic pr-stack-<n1>-<n2>-<hash8> version tags (<= 64 characters for longshot-builder, hashing both ordered PR heads and the merged commit SHA so rebuilding after main moves never reuses a stale build).
    • Verifies git availability, serializes all pr-stack-cache.git operations behind GIT_CACHE_LOCK (held across fetch, merge/archive, and WorktreeGuard drop), cleans stale *.lock files under that lock before invoking git, fetches +refs/pull/<N>/head into a bare cache with -c core.hooksPath=<null_device> and exact head-SHA verification, performs an isolated detached-worktree dry-run merge with structured file-level conflict preview and RAII WorktreeGuard cleanup, and emits a PAX-commented (comment=<sha40>) .tar.gz archive for longshot-builder from-source --archive.
  • Channel & builder wiring (src/game/{channel,actions,autocheck,catalog,jobs,mod,releases,report,versions,wizard}.rs):
    • Adds Channel::PullRequestStack in src/game/channel.rs (label() == "Pull request stack", registry_name() == "pr", is_source() == true) and prevents single-PR tag parsers (channel::tag_pr and releases::single_pr_tag_number) from misparsing pr-stack-* tags.
    • Preserves #284's BigBean approval trust gate for unapproved PRs in a stack via Source.confirm: Option<String>, requiring the user to type every unapproved PR number ("10, 20") when multiple unapproved PRs are stacked.
  • Slint UI, docs & translations (ui/pr-stack.slint, ui/build-files.slint, ui/game-model.slint, ui/game-versions.slint, ui/game.slint, ui/main.slint, docs/pull-requests.md, assets/lang/*.json):
    • Adds PrStackPicker under VersionChoice ("Pull request stack" channel in ui/build-files.slint) using Ink.sage for clean-merge status.
    • Documents PR stacks (including main-only base and multi-unapproved confirmation) in docs/pull-requests.md and updates translations across all 12 full assets/lang/*.json catalogs (all 15 launcher catalogs validated).

Risks

  • PR stacks always merge onto main only because Beanstalk's public pulls feed (api/v1/public/pulls) does not expose target base branches; stacking PRs targeting a non-main integration branch (such as mod-api) will merge against main or report conflicts.
  • Combined PRs are unreviewed together and intended for experimental testing only.

Testing

All verification below ran on Windows (1.99.1-x86_64-pc-windows-gnu) against commit 469c1f4 rebased onto origin/main (560f789). UI screenshot of PrStackPicker is pending manual capture (no real saves).

  • cargo fmt --all --check: PASS
  • cargo clippy --workspace --all-targets --locked -- -D warnings: PASS (0 warnings)
  • python -I scripts/translations.py: PASS (Validated 15 launcher catalogs.)
  • Targeted tests (cargo test --workspace --locked -- game::pr_stack:: game::catalog:: game::releases:: game::tag_tests:: game::channel_tests::): 14/14 PASS:
    • game::pr_stack::tests::stack_tag_format_determinism_order_and_parsing
    • game::pr_stack::tests::selection_ordering_dedup_validation_and_unapproved_gate (including multi-unapproved "10, 20" confirmation)
    • game::pr_stack::tests::missing_git_fails_cleanly
    • game::pr_stack::tests::fetch_commits_self_heals_stale_ref_lock_file
    • game::pr_stack::tests::conflict_detection_attribution_noop_merge_and_worktree_cleanup
    • game::pr_stack::tests::bare_repo_fetch_verifies_head_and_rejects_stale_sha
    • game::pr_stack::tests::clean_multi_pr_merge_and_pax_archive_verification
    • game::catalog::tests::each_install_follows_its_own_channel
    • game::channel_tests::promotion_controls_stable_game_defaults_and_new_builds
    • game::tag_tests::game_tags_classify_and_order_by_track
    • game::releases::tests::refuses_other_repo_for_named_pr
    • game::releases::tests::bootstrap_checks_version_platform_and_signed_name
    • game::releases::tests::prefetched_builder_stays_in_cache_until_installation
    • game::releases::tests::moving_future_builds_reuses_prefetched_release_without_network
  • Full cargo test --workspace --locked on Windows (prior run on bc18790 before adding fetch_commits_self_heals_stale_ref_lock_file above): 125 passed, 11 failed, 2 ignored (all 11 failures reproduced identically on clean origin/main 560f789 on Windows; CI build-test runs on ubuntu-24.04).
## Summary Rebases and ports `#271` onto the Rust + Slint launcher (`#284`, `main` @ `560f789`), decoupled from dropped `#270`: - **Multi-PR stack backend (`src/game/pr_stack.rs`):** - Supports ordered multi-PR selection (`>= 2` open PRs) with deterministic `pr-stack-<n1>-<n2>-<hash8>` version tags (`<= 64` characters for `longshot-builder`, hashing both ordered PR heads and the merged commit SHA so rebuilding after `main` moves never reuses a stale build). - Verifies `git` availability, serializes all `pr-stack-cache.git` operations behind `GIT_CACHE_LOCK` (held across fetch, merge/archive, and `WorktreeGuard` drop), cleans stale `*.lock` files under that lock before invoking `git`, fetches `+refs/pull/<N>/head` into a bare cache with `-c core.hooksPath=<null_device>` and exact head-SHA verification, performs an isolated detached-worktree dry-run merge with structured file-level conflict preview and RAII `WorktreeGuard` cleanup, and emits a PAX-commented (`comment=<sha40>`) `.tar.gz` archive for `longshot-builder from-source --archive`. - **Channel & builder wiring (`src/game/{channel,actions,autocheck,catalog,jobs,mod,releases,report,versions,wizard}.rs`):** - Adds `Channel::PullRequestStack` in `src/game/channel.rs` (`label() == "Pull request stack"`, `registry_name() == "pr"`, `is_source() == true`) and prevents single-PR tag parsers (`channel::tag_pr` and `releases::single_pr_tag_number`) from misparsing `pr-stack-*` tags. - Preserves `#284`'s BigBean approval trust gate for unapproved PRs in a stack via `Source.confirm: Option<String>`, requiring the user to type every unapproved PR number (`"10, 20"`) when multiple unapproved PRs are stacked. - **Slint UI, docs & translations (`ui/pr-stack.slint`, `ui/build-files.slint`, `ui/game-model.slint`, `ui/game-versions.slint`, `ui/game.slint`, `ui/main.slint`, `docs/pull-requests.md`, `assets/lang/*.json`):** - Adds `PrStackPicker` under `VersionChoice` (`"Pull request stack"` channel in `ui/build-files.slint`) using `Ink.sage` for clean-merge status. - Documents PR stacks (including `main`-only base and multi-unapproved confirmation) in `docs/pull-requests.md` and updates translations across all 12 full `assets/lang/*.json` catalogs (all 15 launcher catalogs validated). ## Risks - PR stacks always merge onto `main` only because Beanstalk's public pulls feed (`api/v1/public/pulls`) does not expose target base branches; stacking PRs targeting a non-`main` integration branch (such as `mod-api`) will merge against `main` or report conflicts. - Combined PRs are unreviewed together and intended for experimental testing only. ## Testing All verification below ran on Windows (`1.99.1-x86_64-pc-windows-gnu`) against commit `469c1f4` rebased onto `origin/main` (`560f789`). UI screenshot of `PrStackPicker` is pending manual capture (no real saves). - `cargo fmt --all --check`: **PASS** - `cargo clippy --workspace --all-targets --locked -- -D warnings`: **PASS** (0 warnings) - `python -I scripts/translations.py`: **PASS** (`Validated 15 launcher catalogs.`) - Targeted tests (`cargo test --workspace --locked -- game::pr_stack:: game::catalog:: game::releases:: game::tag_tests:: game::channel_tests::`): **14/14 PASS**: - `game::pr_stack::tests::stack_tag_format_determinism_order_and_parsing` - `game::pr_stack::tests::selection_ordering_dedup_validation_and_unapproved_gate` (including multi-unapproved `"10, 20"` confirmation) - `game::pr_stack::tests::missing_git_fails_cleanly` - `game::pr_stack::tests::fetch_commits_self_heals_stale_ref_lock_file` - `game::pr_stack::tests::conflict_detection_attribution_noop_merge_and_worktree_cleanup` - `game::pr_stack::tests::bare_repo_fetch_verifies_head_and_rejects_stale_sha` - `game::pr_stack::tests::clean_multi_pr_merge_and_pax_archive_verification` - `game::catalog::tests::each_install_follows_its_own_channel` - `game::channel_tests::promotion_controls_stable_game_defaults_and_new_builds` - `game::tag_tests::game_tags_classify_and_order_by_track` - `game::releases::tests::refuses_other_repo_for_named_pr` - `game::releases::tests::bootstrap_checks_version_platform_and_signed_name` - `game::releases::tests::prefetched_builder_stays_in_cache_until_installation` - `game::releases::tests::moving_future_builds_reuses_prefetched_release_without_network` - Full `cargo test --workspace --locked` on Windows (prior run on `bc18790` before adding `fetch_commits_self_heals_stale_ref_lock_file` above): **125 passed, 11 failed, 2 ignored** (all 11 failures reproduced identically on clean `origin/main` `560f789` on Windows; CI `build-test` runs on `ubuntu-24.04`).
feat(pr-build): build longshot_vk.dll/.so only for renderer-only PRs
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Compile and test (pull_request) Blocked by required conditions
e085b31862
Classify PR source diffs against Longshot's renderer-only contract (packs.py route() + host/#include + nx2/build.py host_deps), verify exact installed base nightly and MKWVK_API_VERSION parity, and invoke nx2/build.py --standalone with RX_VK_ONLY=1 before pairing the built renderer with the base nightly folder. Fails closed to full make_game.py on any host/ABI/build/asset change or missing base.

Assisted-by: Antigravity
feat(pr-build): allow selecting and stacking multiple open PRs with pre-build conflict preview
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
1701405acf
Add ordered multi-PR selection (PullRequestStackSelection), stack version tags (pr-stack-<n1>-<n2>-<hash>) on the pr track, isolated detached git worktree dry-run merge and source materialization (PullRequestStack) with structured conflict reporting (naming conflicting PRs and exact paths) and guaranteed worktree cleanup on conflict/cancel/error, automatic combined-diff RX_VK_ONLY=1 fast-path inheritance, and PullRequestStackViewModel.

Assisted-by: Antigravity
Author
First-time contributor

Ported #271 (multi-PR stack selection and pre-build dry-run merge) onto the Rust + Slint launcher rewrite (#284) on branch Jer9:port/271-pr-stack-rust, decoupled from #270 (closed as superseded by longshot-builder):

  • Explicit UI disclaimer noting the feature is experimental and for testing only (combined PRs are unreviewed together and may crash or corrupt saves)
  • Ordered multi-PR selection (>= 2 PRs), deterministic pr-stack-<n1>-<n2>-<hash8> tags, +refs/pull/<N>/head fetch with exact head-SHA check, isolated detached worktree dry-run merge with file-level conflict preview and Drop cleanup
  • Feeds a PAX-commented (comment=<sha40>) .tar.gz directly into longshot-builder from-source --archive (failing closed if main moves between preview and build)
  • Preserves BigBean unapproved-PR warnings across all 15 language catalogs (cargo fmt, cargo clippy, scripts/translations.py, and game::pr_stack 6/6 tests passing)

Ready to rebase onto main as soon as #284 merges.

Ported `#271` (multi-PR stack selection and pre-build dry-run merge) onto the Rust + Slint launcher rewrite (`#284`) on branch `Jer9:port/271-pr-stack-rust`, decoupled from `#270` (closed as superseded by `longshot-builder`): - Explicit UI disclaimer noting the feature is **experimental and for testing only** (combined PRs are unreviewed together and may crash or corrupt saves) - Ordered multi-PR selection (`>= 2` PRs), deterministic `pr-stack-<n1>-<n2>-<hash8>` tags, `+refs/pull/<N>/head` fetch with exact head-SHA check, isolated detached worktree dry-run merge with file-level conflict preview and `Drop` cleanup - Feeds a PAX-commented (`comment=<sha40>`) `.tar.gz` directly into `longshot-builder from-source --archive` (failing closed if `main` moves between preview and build) - Preserves BigBean unapproved-PR warnings across all 15 language catalogs (`cargo fmt`, `cargo clippy`, `scripts/translations.py`, and `game::pr_stack` 6/6 tests passing) Ready to rebase onto `main` as soon as `#284` merges.
Jer9 force-pushed feat/pr-build-multi-stack from 1701405acf
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
to 0738a6f4e0
Some checks failed
PR title / Conventional Commit title (pull_request) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Has been cancelled
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
2026-11-26 23:34:14 +00:00
Compare
Jer9 force-pushed feat/pr-build-multi-stack from 0738a6f4e0
Some checks failed
PR title / Conventional Commit title (pull_request) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Has been cancelled
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
to efc23a98cc
Some checks failed
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Has been cancelled
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
PR title / Conventional Commit title (pull_request) Has been cancelled
2026-11-27 06:10:13 +00:00
Compare
Jer9 force-pushed feat/pr-build-multi-stack from efc23a98cc
Some checks failed
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Has been cancelled
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
PR title / Conventional Commit title (pull_request) Has been cancelled
to 469c1f4d88
Some checks are pending
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Blocked by required conditions
CI / What the change needs (pull_request) Blocked by required conditions
CI / Rust formatting, lint and tests (pull_request) Blocked by required conditions
CI / Release packages and stable upgrades (pull_request) Blocked by required conditions
PR title / Conventional Commit title (pull_request) Blocked by required conditions
2026-11-27 06:47:30 +00:00
Compare
Owner

Include screenshots please

Include screenshots please
Some checks are pending
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Blocked by required conditions
CI / What the change needs (pull_request) Blocked by required conditions
CI / Rust formatting, lint and tests (pull_request) Blocked by required conditions
CI / Release packages and stable upgrades (pull_request) Blocked by required conditions
PR title / Conventional Commit title (pull_request) Blocked by required conditions
This pull request has changes conflicting with the target branch.
  • assets/lang/de.json
  • assets/lang/es.json
  • assets/lang/fr.json
  • assets/lang/it.json
  • assets/lang/ja.json
  • assets/lang/ko.json
  • assets/lang/nl.json
  • assets/lang/pl.json
  • assets/lang/pt-BR.json
  • assets/lang/ru.json
  • assets/lang/zh-Hans.json
  • assets/lang/zh-Hant.json
Some workflows are waiting to be reviewed.
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'feat/pr-build-multi-stack:Jer9-feat/pr-build-multi-stack'
git switch 'Jer9-feat/pr-build-multi-stack'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher!271
No description provided.