Skip to content

Standardize batch error envelopes - #4969

Merged
Widthdom merged 3 commits into
mainfrom
fix-issue4871
Jul 29, 2026
Merged

Standardize batch error envelopes#4969
Widthdom merged 3 commits into
mainfrom
fix-issue4871

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Standardize batch --json-summary success and failure records on the versioned typed error envelope, including malformed input, schema/policy rejection, unsupported commands, child failures, timeouts, and cancellation.
  • Keep child stdout/stderr out of failure records by default and expose bounded raw_streams only through explicit --include-raw-streams opt-in.
  • Preserve deterministic input order and summaries across serial and parallel execution, including cancellation races, through a bounded per-reader input pump that retains an in-flight line for a subsequent batch invocation.

Validation

  • dotnet build CodeIndex.sln -c Debug --no-restore — passed, 0 warnings.
  • dotnet build CodeIndex.sln -c Release --no-restore — passed, 0 warnings.
  • Issue Standardize typed error envelopes for every batch failure #4871 tests — net8.0: 8/8 passed; net9.0: 8/8 passed.
  • All RunBatch tests — net8.0: 35/35 passed; net9.0: 35/35 passed.
  • dotnet format CodeIndex.sln --no-restore --verify-no-changes — passed.
  • dotnet run --project tools/CodeIndex.Changelog -- check — 41 fragments validated.
  • Full Release suite, net8.0 — 10,781 passed, 7 skipped, 1 unrelated existing watcher failure: RunCore_SubprojectObservesAncestorIgnoreFileChanges_Issue4592; its focused retry failed in this worktree, while the isolated origin/main baseline passed.
  • Full Release suite, net9.0 — 10,307 passed, 420 skipped, the same unrelated watcher failure.

Adversarial review

Two Codex adversarial-review rounds were completed. The actionable findings were addressed: cancellation now wakes blocked input subscriptions without an orphan per-invocation reader, consumed and concurrently prepared items receive ordered typed records, queued items drain before the final summary, and cancellation takes precedence over earlier failures and blank/oversized branches.

Documentation and changelog

  • Updated the English and Japanese batch contracts in DEVELOPER_GUIDE.md and TESTING_GUIDE.md.
  • Added bilingual fragment changelog.d/unreleased/4871.fixed.md.

Follow-up candidates

None in scope. The validation-only watcher instability is already tracked by #4592.

Fixes #4871

@Widthdom
Widthdom marked this pull request as ready for review July 29, 2026 01:34
@Widthdom
Widthdom merged commit 7b81222 into main Jul 29, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue4871 branch July 29, 2026 01:34
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.

Standardize typed error envelopes for every batch failure

1 participant