Skip to content

Fix byte counting, no-files-found output, and stdout/stderr mixing in grok_bridge.py#7

Merged
KHAEntertainment merged 1 commit intoclaude-plugin-v2from
copilot/sub-pr-5-again
Mar 19, 2026
Merged

Fix byte counting, no-files-found output, and stdout/stderr mixing in grok_bridge.py#7
KHAEntertainment merged 1 commit intoclaude-plugin-v2from
copilot/sub-pr-5-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 19, 2026

Three correctness/UX bugs in the --write-files path of grok_bridge.py, surfaced in PR review.

Changes

  • Bytes vs chars — replaced Path.write_text() (returns char count) with content.encode("utf-8", errors="replace") + write_bytes(encoded), recording len(encoded) so byte_count is actual UTF-8 bytes
  • No annotated files found — when --write-files is set but no blocks match, previously dumped the full model response to stdout (defeating the compact-summary goal); now emits a short diagnostic to stderr:
    No annotated files found in model response to write to disk.
    Re-run without --write-files to see the full response.
    
  • stdout/stderr consistencyTotal: N bytes was going to stderr while the per-file list went to stdout; all write-summary output now goes to stdout
  • --write-files + --output interop--write-files was silently skipped when --output was provided; both now work independently (raw response written to --output, file extraction proceeds separately)

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI changed the title [WIP] Implement file writing for OpenClaw plugin Fix byte counting, no-files-found output, and stdout/stderr mixing in grok_bridge.py Mar 19, 2026
Copilot AI requested a review from KHAEntertainment March 19, 2026 21:27
@KHAEntertainment KHAEntertainment marked this pull request as ready for review March 19, 2026 21:27
@KHAEntertainment KHAEntertainment merged commit 10d7318 into claude-plugin-v2 Mar 19, 2026
1 check 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