Fix patch receive destination preflight #81

Merged
vnprc merged 1 commit from agent/patch-receive-dest-preflight into master 2026-07-01 19:14:39 +01:00
Member

Closes allod/tools#80.

Summary

  • Resolve patch destination repositories with contextual errors before patch receive starts remote fetch work.
  • Make patch apply hard-exit on destination resolution failure even when invoked under disabled errexit.
  • Add regressions for missing destinations, including the cwd-mismatch scenario from the issue.

Risk

Low. The behavior change is limited to earlier failure for invalid patch destination paths; valid receive/apply flows continue through the existing artifact and identity checks.

Validation

  • Reproduced issue 80 on current master: patch receive fetched an artifact, then reported a destination path error followed by a misleading repo identity mismatch against the caller cwd repo.
  • Verified the fixed repro exits before SSH with a destination-resolution error and fix hint.
  • bash -n allod
  • bash -n tests/allod-patch.sh
  • bash tests/allod-patch.sh
  • mapfile -t tests_to_run < <(find tests -type f -name '*.sh' | sort); for test in "${tests_to_run[@]}"; do bash "$test" </dev/null; done
  • git diff --check
  • shellcheck was not installed in the environment.
Closes allod/tools#80. ## Summary - Resolve patch destination repositories with contextual errors before `patch receive` starts remote fetch work. - Make `patch apply` hard-exit on destination resolution failure even when invoked under disabled `errexit`. - Add regressions for missing destinations, including the cwd-mismatch scenario from the issue. ## Risk Low. The behavior change is limited to earlier failure for invalid patch destination paths; valid receive/apply flows continue through the existing artifact and identity checks. ## Validation - Reproduced issue 80 on current master: `patch receive` fetched an artifact, then reported a destination path error followed by a misleading repo identity mismatch against the caller cwd repo. - Verified the fixed repro exits before SSH with a destination-resolution error and fix hint. - `bash -n allod` - `bash -n tests/allod-patch.sh` - `bash tests/allod-patch.sh` - `mapfile -t tests_to_run < <(find tests -type f -name '*.sh' | sort); for test in "${tests_to_run[@]}"; do bash "$test" </dev/null; done` - `git diff --check` - `shellcheck` was not installed in the environment.
vnprc approved these changes 2026-07-01 19:14:33 +01:00
vnprc merged commit 450b0436cc into master 2026-07-01 19:14:39 +01:00
vnprc deleted branch agent/patch-receive-dest-preflight 2026-07-01 19:14:39 +01:00
Sign in to join this conversation.
No reviewers
No labels
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
allod/tools!81
No description provided.