Skip to content

Avoid duplicating errors for ignored batch values - #100

Merged
inhere merged 1 commit into
gookit:masterfrom
rupayon123:fix/batch-error-aggregation-20261029
Oct 29, 2026
Merged

inhere merged 1 commit into
gookit:masterfrom
rupayon123:fix/batch-error-aggregation-20261029

Conversation

@rupayon123

Copy link
Copy Markdown
Contributor

FireBatch documents unsupported inputs as ignored, but a nil or other non-event value after a failed event appends that event's error again. A batch with two actual failures can return four errors.

Keep the temporary error inside each iteration. Real event errors retain their order and identity, and ignored values no longer duplicate an earlier failure.

Go 1.26.0 / macOS arm64 validation:

  • Four regressions fail before the fix; all new cases and the valid-batch controls pass afterward.
  • The required full coverage run passes 45 leaf cases across both packages. Affected batch cases also pass with the race detector.
  • Build, vet, tidy, formatting and Staticcheck pass. Revive has the same 34 existing warnings as the base.
  • Independent native consumers compare 100 batches with individual dispatches, covering error identity/order, listener effects, wildcard/abort handling and invalid event names.

The full race run still fails four existing async/shared-data tests, all reproduced on the pristine base. Those failures are not suppressed or changed here. Hosted Linux/Go CI remains unverified locally.

@inhere
inhere merged commit c16eb03 into gookit:master Oct 29, 2026
9 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.

2 participants