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

Merged
jwilger merged 1 commit from fix/release-prepare-json-isolation into main 2026-05-17 20:37:35 -07:00
Owner

Summary

  • write the open release PR API projection to a temp file inside the Nix command
  • run jq PR selection and tea close/create/edit inside one Nix shell so sync hooks / Nix eval output is never captured as a PR number
  • preserve inner set -euo pipefail so curl/jq failures still fail the release-prep job

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 - write the open release PR API projection to a temp file inside the Nix command - run jq PR selection and tea close/create/edit inside one Nix shell so `sync hooks` / Nix eval output is never captured as a PR number - preserve inner `set -euo pipefail` so curl/jq failures still fail the release-prep job ## 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): isolate release PR JSON lookup
All checks were successful
CI / Format check (pull_request) Successful in 5s
CI / Clippy (pull_request) Successful in 40s
CI / Test (pull_request) Successful in 51s
CI / Dependency policy (pull_request) Successful in 10s
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
ee9296a31a
auto-review left a comment

The PR improves the release preparation workflow by isolating the JSON lookup for open PRs into a temporary file, reducing the risk of Nix stdout/eval-cache interference. The changes are well-tested and appear safe to merge.

Walkthrough

  • .forgejo/workflows/release-prepare.yml:
    • The release preparation job now writes the open PR API JSON to a temporary file, which is then read back into the open_prs variable. This change isolates the JSON data from potential Nix stdout interference.
    • The set -euo pipefail is preserved to ensure that any curl failures will still cause the job to fail, maintaining robustness.
  • crates/ar-gateway/tests/ci_workflow_contract.rs:
    • A new test, release_prepare_isolates_nix_logs_from_open_pr_json, is added to verify that the workflow correctly isolates Nix logs from the JSON data used for open PR lookup.
The PR improves the release preparation workflow by isolating the JSON lookup for open PRs into a temporary file, reducing the risk of Nix stdout/eval-cache interference. The changes are well-tested and appear safe to merge. ## Walkthrough - **.forgejo/workflows/release-prepare.yml**: - The release preparation job now writes the open PR API JSON to a temporary file, which is then read back into the `open_prs` variable. This change isolates the JSON data from potential Nix stdout interference. - The `set -euo pipefail` is preserved to ensure that any curl failures will still cause the job to fail, maintaining robustness. - **crates/ar-gateway/tests/ci_workflow_contract.rs**: - A new test, `release_prepare_isolates_nix_logs_from_open_pr_json`, is added to verify that the workflow correctly isolates Nix logs from the JSON data used for open PR lookup.
jwilger deleted branch fix/release-prepare-json-isolation 2026-05-17 20:37:35 -07:00
jwilger changed title from fix(release): isolate release PR JSON lookup to fix(release): keep PR selection inside Nix 2026-05-17 20:43:22 -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!239
No description provided.