Skip to content

[FIX]: Fail pytest when a RAMPART trial gate fails - #114

Closed
Behnam (behnam-o) wants to merge 1 commit into
microsoft:mainfrom
behnam-o:exit-code-trial-group-status
Closed

Behnam (behnam-o) wants to merge 1 commit into
microsoft:mainfrom
behnam-o:exit-code-trial-group-status

Conversation

@behnam-o

Copy link
Copy Markdown
Contributor

Propagates failed aggregate trial gates to pytest’s exit status.

  • Sets session.exitstatus to TESTS_FAILED when any trial group fails.
  • Preserves existing non-zero exit statuses.
  • Keeps individual trial items passing while the aggregate threshold determines the process exit code.

@behnam-o
Behnam (behnam-o) requested a review from a team July 14, 2026 17:46

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.

Behnam (@behnam-o) Nina Chikanov (@nina-msft) Is this similar to #73 (comment) but also includes upgrading trial failures to exit status as well?

@spencrr Spencer Schoenberg (spencrr) changed the title FIX Fail pytest when a RAMPART trial gate fails [FIX]: Fail pytest when a RAMPART trial gate fails Jul 14, 2026

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.

Thanks Behnam (@behnam-o)! While we still have trial clones, I think this fits with my mental model of RAMPART: any trial group that did not pass (UNSAFE > 0 || SAFE / ALL < SAFE_THRESHOLD) should raise pytest exit status to failed. Bashir Partovi (@bashirpartovi) thoughts here?

@behnam-o

Copy link
Copy Markdown
Contributor Author

closing this in favor of the work the will re-layer the trials into the execution logic

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