fix(release): keep PR selection inside Nix #240

Merged
jwilger merged 1 commit from fix/release-prepare-pr-selection into main 2026-05-17 20:46:29 -07:00
Owner

Summary

  • run jq PR selection and tea close/create/edit inside one Nix shell
  • avoid capturing nix develop shellHook stdout (sync hooks) as PR IDs
  • keep API JSON file projection and inner set -euo pipefail

Verification

  • reproduced the old failure locally: superseded_prs captured sync hooks: ✔️ (pre-push) from nix develop --command jq
  • real Forgejo API projection inside Nix shell: projected_json=[], json_projection_ok
  • mocked release PR selection inside one Nix shell: superseded=<123> existing=<456>, selection_ok
  • rtk cargo test -p ar-gateway --test ci_workflow_contract
  • rtk just fmt
## Summary - run jq PR selection and tea close/create/edit inside one Nix shell - avoid capturing `nix develop` shellHook stdout (`sync hooks`) as PR IDs - keep API JSON file projection and inner `set -euo pipefail` ## Verification - reproduced the old failure locally: `superseded_prs` captured `sync hooks: ✔️ (pre-push)` from `nix develop --command jq` - real Forgejo API projection inside Nix shell: `projected_json=[]`, `json_projection_ok` - mocked release PR selection inside one Nix shell: `superseded=<123> existing=<456>`, `selection_ok` - `rtk cargo test -p ar-gateway --test ci_workflow_contract` - `rtk just fmt`
fix(release): keep PR selection inside Nix
All checks were successful
CI / Format check (pull_request) Successful in 6s
CI / Clippy (pull_request) Successful in 40s
CI / Dependency policy (pull_request) Successful in 10s
CI / Test (pull_request) Successful in 52s
CI / Build (pull_request) Successful in 32s
CI / Request auto_review semantic review (pull_request) Successful in 1s
CI / Build PR artifacts (no token) (pull_request) Successful in 2s
auto_review auto_review: no findings
b44480796d
auto-review left a comment

The PR refactors the release preparation workflow to run all PR selection and management commands inside a single Nix shell, addressing issues with stdout interference. The changes appear safe to merge, but thorough testing is recommended to ensure the fix is effective.

Walkthrough

  • .forgejo/workflows/release-prepare.yml:
    • Consolidated multiple nix develop invocations into a single shell script block.
    • Ensured that jq and tea commands are executed within the same Nix environment to prevent stdout interference.
  • crates/ar-gateway/tests/ci_workflow_contract.rs:
    • Updated tests to reflect changes in how open PR JSON is handled and verified that Nix stdout does not interfere with JSON parsing.
The PR refactors the release preparation workflow to run all PR selection and management commands inside a single Nix shell, addressing issues with stdout interference. The changes appear safe to merge, but thorough testing is recommended to ensure the fix is effective. ## Walkthrough - **.forgejo/workflows/release-prepare.yml**: - Consolidated multiple `nix develop` invocations into a single shell script block. - Ensured that `jq` and `tea` commands are executed within the same Nix environment to prevent stdout interference. - **crates/ar-gateway/tests/ci_workflow_contract.rs**: - Updated tests to reflect changes in how open PR JSON is handled and verified that Nix stdout does not interfere with JSON parsing.
jwilger deleted branch fix/release-prepare-pr-selection 2026-05-17 20:46:29 -07:00
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
Slipstream/auto_review!240
No description provided.