Skip to content

fix: classify apply_patch failures - #13

Closed
YumaKakuya wants to merge 1 commit into
mainfrom
cto/fix-apply-patch-diagnostics
Closed

YumaKakuya wants to merge 1 commit into
mainfrom
cto/fix-apply-patch-diagnostics

Conversation

@YumaKakuya

Copy link
Copy Markdown
Owner

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.

Review: @YumaKakuya

@sorted-ai-bot

Copy link
Copy Markdown
Collaborator

Closing and replacing because this PR was created with the wrong author account. Per Sorted GitHub Operations, AI-authored PRs must be created via ghx / sorted-ai-bot.

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