Skip to content

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

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

[FIX]: Fail pytest when a RAMPART trial gate fails#114
behnam-o wants to merge 1 commit into
microsoft:mainfrom
behnam-o:exit-code-trial-group-status

Conversation

@behnam-o

Copy link
Copy Markdown

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-o requested a review from a team July 14, 2026 17:46

@spencrr spencrr 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.

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

@spencrr 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

@spencrr spencrr 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.

Thanks @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. @bashirpartovi thoughts here?

@spencrr
spencrr requested a review from a team July 16, 2026 18:50
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