Skip to content

feat: filter reported errors#70

Merged
gabyx merged 2 commits into
mainfrom
feat/filter-reported-errors
Apr 15, 2026
Merged

feat: filter reported errors#70
gabyx merged 2 commits into
mainfrom
feat/filter-reported-errors

Conversation

@gabyx
Copy link
Copy Markdown
Contributor

@gabyx gabyx commented Apr 15, 2026

Proposed Changes

  • Add sentinel wrapping with errorfilter.FitlerReportedErrors to reduce error chains.
    Used on status.go::Log.

Types of Changes

What types of changes does your contribution introduce? Put an x in the boxes
that apply

  • A bug fix (non-breaking change which fixes an issue). Use MR tag
    bugfix.
  • A new feature (non-breaking change which adds functionality). Use MR
    tag feature.
  • A breaking change (fix or feature that would cause existing
    functionality to not work as expected). Use MR tag feature.
  • A non-productive update (documentation, tooling, etc. if none of the
    other choices apply). Use MR tag chore.

Checklist

Put an x in the boxes that apply. You can also fill these out after creating
the PR. If you're unsure about any of them, don't hesitate to ask. We're here to
help! This is simply a reminder of what we are going to look for before merging
your code.

Further Comments

Copilot AI review requested due to automatic review settings April 15, 2026 11:13
@gabyx gabyx force-pushed the feat/filter-reported-errors branch from 9867af6 to 929d49c Compare April 15, 2026 11:14
@gabyx gabyx force-pushed the feat/filter-reported-errors branch from 929d49c to aa8cc6d Compare April 15, 2026 11:16
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces an “already reported” error sentinel and a filter to drop those sentinel-wrapped errors from the final CLI error output, aiming to reduce redundant/long error chains when errors have already been logged earlier in execution.

Changes:

  • Add WrapAsReported / FilterAlreadyReported utilities (plus tests) to mark and filter “already reported” errors.
  • Wrap Summary.allErrors after DAG summary logging, and filter the final CLI error before printing an error summary.
  • Rename stack dequeue API (PopFrontPopBottom) and adjust BFS usage accordingly.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pkg/errors/filter/drop.go Implements sentinel wrapper + filtering logic over multierror trees.
pkg/errors/filter/drop_test.go Adds tests for the filter behavior with nested and flat multierror inputs.
pkg/dag/status.go Moves runner-status logging to an internal method and wraps Summary.allErrors as “already reported”.
pkg/dag/run.go Uses summary.Log() and unexports executeNormal.
pkg/dag/run-concurrent.go Uses summary.Log() and unexports executeConcurrent.
pkg/dag/execution-order.go Updates BFS traversal to use PopBottom().
pkg/common/stack/stack.go Adds Top()/Bottom() helpers and renames bottom-pop API to PopBottom().
pkg/common/stack/stack_test.go Updates tests to match the new PopBottom() API.
pkg/cli/cmd/root/root.go Removes ErrorSummary CLI/config setting.
pkg/cli/cli-impl.go Filters already-reported errors before calling log.ErrorE(...).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/cli/cli-impl.go
Comment thread pkg/dag/status.go Outdated
Comment thread pkg/common/stack/stack.go Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 15, 2026

Codecov Report

❌ Patch coverage is 96.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.59%. Comparing base (f1be3b9) to head (36a6e05).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/errors/filter/already-reported.go 95.12% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #70      +/-   ##
==========================================
+ Coverage   67.30%   67.59%   +0.29%     
==========================================
  Files         116      117       +1     
  Lines        5389     5435      +46     
==========================================
+ Hits         3627     3674      +47     
- Misses       1440     1441       +1     
+ Partials      322      320       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gabyx gabyx force-pushed the feat/filter-reported-errors branch 2 times, most recently from 7733293 to fc59bd0 Compare April 15, 2026 11:26
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@gabyx gabyx force-pushed the feat/filter-reported-errors branch from fc59bd0 to 36a6e05 Compare April 15, 2026 11:27
@gabyx gabyx merged commit a67e84d into main Apr 15, 2026
8 checks passed
@gabyx gabyx deleted the feat/filter-reported-errors branch April 15, 2026 13: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