mit einem Klick
check-for-breaking-changes
// Detect breaking changes by analyzing git diff against dev branch. Checks for state access changes in call/genesis handlers, state item ordering violations, and demo-rollup-schema.json changes.
// Detect breaking changes by analyzing git diff against dev branch. Checks for state access changes in call/genesis handlers, state item ordering violations, and demo-rollup-schema.json changes.
Analyze compilation time and test durations from CI logs. Use when the user asks about slow builds, slow tests, or wants to optimize CI time.
Identify flaky tests by comparing failures across multiple CI runs. Use when the user suspects flaky tests, sees intermittent failures, or wants to analyze test reliability.
Debug failed CI tests by fetching workflow logs from GitHub Actions and analyzing failures. Use when the user mentions CI failures, test failures, or wants to understand why their PR's CI is failing.
| name | check-for-breaking-changes |
| description | Detect breaking changes by analyzing git diff against dev branch. Checks for state access changes in call/genesis handlers, state item ordering violations, and demo-rollup-schema.json changes. |
Analyze the current branch for breaking changes compared to dev.
New state accesses in call()/genesis handlers
#[state] field that wasn't touched before.get(), .set(), .get_or_err(), .remove() callsStored struct definition changes
#[state] container (e.g. as a value in StateMap<K, V> or StateValue<V>)State item ordering violations
#[state] items NOT added as the last item in module structdemo-rollup-schema.json changes
examples/demo-rollup/demo-rollup-schema.jsonException: Accessory state (AccessoryStateMap, AccessoryStateValue) accesses are NOT breaking.
git diff dev...HEAD --name-only
If examples/demo-rollup/demo-rollup-schema.json appears in changed files:
For each changed file that contains #[derive( and ModuleInfo:
#[state] fields were added#[state] fields#[state] attribute lines and their field declarationsFlag as BREAKING if: A new #[state] field was inserted before existing state fields
Example detection:
// SAFE - new field at end
#[state]
existing_field: StateMap<K, V>,
#[state]
new_field: StateValue<X>, // Added at end ✓
// BREAKING - new field inserted in middle
#[state]
new_field: StateValue<X>, // Inserted here ✗
#[state]
existing_field: StateMap<K, V>,
For each #[state] field in a module, identify the value type stored (e.g. Token<S> in StateMap<TokenId, Token<S>>). Then check if any of those struct definitions were modified in the diff:
#[state] fields across modulesFlag as BREAKING if: A struct stored in any #[state] container has fields added, removed, or reordered. This changes its Borsh serialization layout.
Example:
// In module definition:
#[state]
tokens: StateMap<TokenId, Token<S>>,
// BREAKING - Token gained a field, changing serialization
pub struct Token<S: Spec> {
pub name: String,
pub total_supply: Amount,
+ pub decimals: u8, // ✗ Breaks existing serialized Token values
}
Note: Enum variants are also sensitive — adding a new variant is safe only if it's appended at the end AND the enum uses default Borsh discriminants.
For files with changes to fn call( or fn init( (genesis):
.get(, .get_or_err(, .get_or_default(.set(, .set_or_err(.remove(.push(, .pop(.iter(, .keys(, .values(Skip if the access is on:
AccessoryStateMapAccessoryStateValueAccessory in its type nameFlag as POTENTIAL BREAKING with hints:
self.tokens in call() - verify gas impact"self.balances - check if this changes access count"self.config - check if this changes access count"## Breaking Change Analysis
### demo-rollup-schema.json
✗ BREAKING / ✓ No changes
### State Item Ordering
✗ BREAKING: [field] added at position [N] in [module] / ✓ No violations
### Stored Struct Definitions
✗ BREAKING: [struct] has fields added/removed, stored in [module].[field] / ✓ No changes
### State Access Patterns
#### [Module/File]
- [POTENTIAL BREAKING] New access to `field_name` in `fn call()`
- [INFO] Accessory state access (safe): `accessory_field`
### Summary
- Breaking changes detected: [N]
- Potential issues requiring review: [N]
- Safe changes: [N]
crates/module-system/module-implementations/ for module changes