8000 fix(minimald): return the served contract from the diag bundle handler by norrietaylor · Pull Request #918 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(minimald): return the served contract from the diag bundle handler - #918

Merged
norrietaylor merged 1 commit into
mainfrom
fix/diag-bundle-served-contract
Jul 22, 2026
Merged

norrietaylor merged 1 commit into
mainfrom
fix/diag-bundle-served-contract

Conversation

@norrietaylor
@norrietaylor norrietaylor commented Jul 22, 2026 •
Copy link
Copy Markdown
Member

Main is broken: #895 changed the serve! dispatch so every handler returns Result<(), ConnectionError> for outcome logging, and #878 merged 15 minutes later with serve_stream_diag_bundle still returning (). Each was green against a main that lacked the other; the E0271 type error only surfaces on branches built after both landed (first seen on #916, also failing #880).

The handler now returns the outcome, mirroring serve_stream_workspace_files: failure still relays the message over the channel's extended-data stream, then surfaces as ConnectionError::Internal so dispatch logging records it.

Verified via cross (aarch64-linux): clippy --all-targets -- -D warnings clean, minimald --lib 164/164 passed.

🤖 Generated with Claude Code

Note

Fix serve_stream_diag_bundle to return the served contract result

Updates serve_stream_diag_bundle to return Result<(), ConnectionError> instead of (). On failure, the error message is sent over the channel's extended-data stream before returning Err(ConnectionError::Internal(msg)); on success it returns Ok(()).

Macroscope summarized 8b36c3a.

Summary by CodeRabbit

  • Bug Fixes
    • Diagnostic bundle streaming failures are now reported directly, improving error visibility and handling.
    • Detailed error information continues to be provided through the diagnostic channel when streaming fails.

PR #895 changed the serve! dispatch so every handler returns
Result<(), ConnectionError> for outcome logging; PR #878 merged
alongside it with serve_stream_diag_bundle still returning (). The two
were each green against a main that lacked the other, and the type
mismatch only surfaced on branches built after both landed.

Failure still relays the message over the channel's extended-data
stream before surfacing as ConnectionError::Internal, mirroring
serve_stream_workspace_files.

Refs: #878, #895

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai
coderabbitai Bot commented Jul 22, 2026 •
Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

serve_stream_diag_bundle now propagates diagnostic streaming failures as ConnectionError::Internal, while preserving extended-data reporting and channel closure.

Changes

Diagnostic bundle error propagation

Layer / File(s) Summary
Propagate streaming outcomes
crates/minimald/src/diag.rs
serve_stream_diag_bundle returns Result<(), ConnectionError>, sends streaming error text through extended data, closes the channel, and returns the captured outcome.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

A rabbit watched the data stream,
Then caught an error midstream’s gleam.
“I’ll close the channel, report the flaw,
And return what I truly saw!”
Hop, hop—clear diagnostics spring.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is a concise Conventional Commit subject and accurately reflects the diag bundle handler return-type fix.
Description check ✅ Passed It includes a clear summary and testing evidence, and the missing checklist details are non-critical.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@norrietaylor
norrietaylor enabled auto-merge (squash) July 22, 2026 18:37
@norrietaylor
norrietaylor merged commit 356a08f into main Jul 22, 2026
28 of 29 checks passed
@norrietaylor
norrietaylor deleted the fix/diag-bundle-served-contract branch July 22, 2026 18:42
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

0