Repository navigation
Fix Copilot rejecting review.diff attachments - #60
Merged
Merged
Conversation
rcosteira79
marked this pull request as ready for review
November 25, 2026 12:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Copilot rejects the generated
review.diffpassed via--attachment, which only accepts images and native documents. This prevents review generation even after the removed--no-remoteflag was fixed in #59.Pass the dedicated temporary diff directory with
--add-dirand instruct Copilot to read the complete patch with its allowedviewtool. Read-only turns retain--disallow-temp-dirand the existing write/shell/URL denials. The patch stays out of argv, remains mode 0600, and is removed when the process finishes or fails. Follow-up to #58.Verification:
Added a subprocess regression test using the real DiffCompass transport and a controlled Copilot executable. It checks an approximately 380 KB patch, fresh and repeated turns, a question without a patch, stable session IDs, scoped file access, private permissions, and cleanup after success and failure. It fails against the pre-fix adapter with the unsupported-attachment error.
Reproduced the exact reported error with the official, SHA-256-verified Copilot CLI v1.0.115 binary, without
--help.Exercised production arguments against that binary in review/edit modes, both with a diff and without one. All four pass startup validation and stop at the expected “No authentication information found” boundary in an isolated environment. This is not an authenticated model-response test.
Adapter and transport tests: 25 passed. Full
bun run verify: 1,251 passed, 13 skipped, 0 failures, including typecheck and JavaScript syntax checks.git diff --checkpassed.CI run 45611432028 passed on the first attempt: foundation, Windows, all five Monaco groups, and the final verification gate. CodeQL and Socket checks also passed.
References: Copilot CLI command reference, Copilot CLI v1.0.115.