Skip to content

Thread patch sentinel error through run service#415

Merged
robinaugh merged 1 commit intomainfrom
jason/rwx-95-thread-patch-sentinel-error-through-run-service
Mar 11, 2026
Merged

Thread patch sentinel error through run service#415
robinaugh merged 1 commit intomainfrom
jason/rwx-95-thread-patch-sentinel-error-through-run-service

Conversation

@robinaugh
Copy link
Contributor

Summary

  • GeneratePatchFile now returns (PatchFile, error) instead of silently swallowing failures
  • The run service wraps patch generation errors with ErrPatch via WrapSentinel, so classifyError categorizes them as "patch_failed" — consistent with the sandbox service
  • Updated the mock to support error injection via MockGeneratePatchFileError

From PR #408 review.

Test plan

  • All existing TestGeneratePatchFile tests pass (error cases now assert require.Error, success cases assert require.NoError)
  • All existing TestService_InitiatingRunPatch tests pass
  • Full unit test suite passes (go test ./internal/... ./cmd/...)

@robinaugh robinaugh self-assigned this Mar 11, 2026
@robinaugh robinaugh force-pushed the jason/rwx-95-thread-patch-sentinel-error-through-run-service branch from eddb8e8 to 1583761 Compare March 11, 2026 16:11
GeneratePatchFile now returns (PatchFile, error) instead of silently
swallowing failures. In the run service, patch generation errors populate
errorMessage and log a warning to stderr, matching the existing pattern
for git-not-installed and not-in-repo scenarios. The run proceeds without
a patch rather than aborting.
@robinaugh robinaugh force-pushed the jason/rwx-95-thread-patch-sentinel-error-through-run-service branch from 1583761 to a04278f Compare March 11, 2026 16:21
@robinaugh robinaugh marked this pull request as ready for review March 11, 2026 16:25
@robinaugh robinaugh merged commit 40ac952 into main Mar 11, 2026
1 check passed
@robinaugh robinaugh deleted the jason/rwx-95-thread-patch-sentinel-error-through-run-service branch March 11, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants