Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements a new fault injection system that replaces probability-based faults with a more controllable mechanism. The system allows faults to be enabled/disabled by name and supports forcing specific fault triggers, making it more suitable for integration testing scenarios.
Key changes:
- Introduced a new
FaultEntrystructure with enable/disable and forced-trip capabilities via atomic operations - Renamed
maybe_fault!macro tosometimes_fault!and removed the probability parameter - Added fault catalog initialization and lookup functions (
get_fault_by_name,enable_all,disable_all)
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/fault.rs | New module implementing the fault catalog and FaultEntry structure with atomic-based control mechanisms |
| src/macros.rs | Updated fault macro from maybe_fault to sometimes_fault, removed probability parameter, integrated with new fault system |
| src/macros_stubs.rs | Renamed stub macro to match new sometimes_fault naming |
| src/lib.rs | Integrated fault initialization into the main init flow, removed old global fault enable/disable functions |
| src/dispatch.rs | Added choose helper function for random selection from slices |
| src/random.rs | Removed inline attributes from RngCore implementation |
| src/catalog.rs | Fixed grammatical error in comment ("it's" → "its") |
| src/dispatch/antithesis.rs | Fixed spelling error ("initalization" → "initialization") |
| src/dispatch/test.rs | Removed inline attribute from random method |
| src/dispatch/noop.rs | Removed inline attribute from random method |
| .zed/settings.json | Added editor-specific configuration (non-code change) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ys cause a trigger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The new fault system allows faults to be turned on/off by name or to force the next fault trip to trigger. This makes it easier to use faults in integration tests where you may want to force a specific fault to trigger.