Skip to content

fix: classify apply_patch failures - #15

Merged
YumaKakuya merged 6 commits into
mainfrom
bot/helm-fix-apply-patch-diagnostics
May 7, 2026
Merged

YumaKakuya merged 6 commits into
mainfrom
bot/helm-fix-apply-patch-diagnostics

Conversation

@sorted-ai-bot

Copy link
Copy Markdown
Collaborator

Summary

  • Makes apply_patch adapter non-interactive with patch -f so malformed or mismatched patches return diagnostics instead of hanging or leaking raw patch prompts.
  • Classifies common failures: plain non-git diff headers, missing target files, interactive strip-level prompts, stale hunks, already-applied patches, malformed patches, missing patch binary, and timeouts.
  • Adds integration coverage for success, plain headers, file-not-found, and stale hunk cases.

Tests

  • npm run build in adapters/
  • ./gradlew test --no-daemon in java/
  • go test -count=1 -run TestApplyPatch_Classifications -v ./integration
  • go test ./cmd/mcphub

Scope

  • Bugfix-only public Helm patch.
  • Does not sync MCPHUB internal alpha features such as capability_gap, result cache, dry-run, or task-context filtering.

@sorted-ai-bot

Copy link
Copy Markdown
Collaborator Author

@YumaKakuya PR #15 merge request

YumaKakuya added 3 commits May 7, 2026 13:19
…tics' into bot/helm-fix-apply-patch-diagnostics

# Conflicts:
#	integration/vt_test.go
@sorted-ai-bot

Copy link
Copy Markdown
Collaborator Author

@YumaKakuya conflict resolved after PR #14 merge. Rebased/merged main into bot/helm-fix-apply-patch-diagnostics, kept both TestSessionOpenRecoveryTool and TestApplyPatch_Classifications, and re-ran local tests: npm run build, ./gradlew test --no-daemon, ./gradlew jar --no-daemon, go test ./cmd/mcphub, go test -count=1 -run 'Test(SessionOpenRecoveryTool|ApplyPatch_Classifications)' -v ./integration.

@YumaKakuya
YumaKakuya merged commit 68b2d60 into main May 7, 2026
2 checks passed
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