Skip to content

Fix Copilot rejecting review.diff attachments - #60

Merged
rcosteira79 merged 1 commit into
mainfrom
fix/copilot-diff-file-input
Dec 2, 2026
Merged

rcosteira79 merged 1 commit into
mainfrom
fix/copilot-diff-file-input

Conversation

@rcosteira79

@rcosteira79 rcosteira79 commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Copilot rejects the generated review.diff passed via --attachment, which only accepts images and native documents. This prevents review generation even after the removed --no-remote flag was fixed in #59.

Pass the dedicated temporary diff directory with --add-dir and instruct Copilot to read the complete patch with its allowed view tool. Read-only turns retain --disallow-temp-dir and 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 --check passed.

  • 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.

@rcosteira79
rcosteira79 marked this pull request as ready for review November 25, 2026 12:16
@rcosteira79
rcosteira79 merged commit 3a8a67b into main Dec 2, 2026
14 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.

1 participant