Skip to content

checks: make suite failure reporting configurable#2418

Merged
kevinmessiaen merged 9 commits into
Giskard-AI:mainfrom
harsh21234i:fix/suite-result-log-limit
Jun 26, 2026
Merged

checks: make suite failure reporting configurable#2418
kevinmessiaen merged 9 commits into
Giskard-AI:mainfrom
harsh21234i:fix/suite-result-log-limit

Conversation

@harsh21234i

@harsh21234i harsh21234i commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

#2417

Summary

This PR makes SuiteResult failure reporting configurable instead of hard-coding the rich-report output to 20 failed/errored
scenarios.

Changes

  • Added max_reported_failures to Suite with a default of 20
  • Added max_reported_failures to SuiteResult with support for None to show all failures
  • Updated Suite.run() to propagate the configured value into the returned SuiteResult
  • Updated SuiteResult.__rich_console__ to honor the configured limit in both the detailed and summary sections
  • Added tests for:
    • propagation from Suite.run()
    • bounded rich rendering
    • unbounded rich rendering when set to None

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a configurable max_reported_failures parameter to the Suite and SuiteResult classes, allowing users to control the number of failed scenarios displayed in reports. The default is set to 20, and the logic in rich_console has been updated to respect this setting. Feedback includes suggestions to allow a minimum value of 0 for complete suppression of failure details, refactoring duplicated logic in the reporting output, and merging redundant imports in the test suite.

Comment thread libs/giskard-checks/src/giskard/checks/core/result.py Outdated
Comment thread libs/giskard-checks/src/giskard/checks/core/result.py Outdated
Comment thread libs/giskard-checks/src/giskard/checks/scenarios/suite.py Outdated
Comment thread libs/giskard-checks/tests/core/test_suite.py

@davidberenstein1957 davidberenstein1957 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

instead of this argument, could you define this as an overridable environment variable and simplify the code implementation and tests?

@davidberenstein1957

Copy link
Copy Markdown
Member

@harsh21234i could you resolve the conflict please?

@harsh21234i

Copy link
Copy Markdown
Contributor Author

hey @davidberenstein1957

I kept both the SuiteResult failure-reporting tests from this PR and the newer upstream parallel suite tests. I also
stabilized the parallel timing assertion by comparing against an actual serial baseline.

@harsh21234i
harsh21234i force-pushed the fix/suite-result-log-limit branch from d7dbacd to b19f843 Compare June 10, 2026 03:52
except ValueError:
return DEFAULT_MAX_REPORTED_FAILURES

return max(0, value)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would allow -1 as unlimited, and make DEFAULT_MAX_REPORTED_FAILURES -1.

I'll create a separate issue for this

@kevinmessiaen
kevinmessiaen merged commit 4c51afc into Giskard-AI:main Jun 26, 2026
49 of 50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants