behavior-preservation-checker

Solid

Compare runtime behavior between original and migrated repositories to detect behavioral differences, regressions, and semantic changes. Use when validating code migrations, refactorings, language ports, framework upgrades, or any transformation that should preserve behavior. Automatically compares test results, execution traces, API responses, and observable outputs between two repository versions. Provides actionable guidance for fixing deviations and ensuring behavioral equivalence.

Code & Development 160 stars 17 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 87/100

Stars 20%
73
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Behavior Preservation Checker ## Overview Validate that a migrated or refactored codebase preserves the original behavior by automatically comparing runtime behavior, test results, execution traces, and observable outputs between two repository versions. ## Core Workflow ### 1. Setup Repositories Prepare both repositories for comparison: ```bash # Clone or locate repositories ORIGINAL_REPO=/path/to/original MIGRATED_REPO=/path/to/migrated # Ensure both are at comparable states cd $ORIGINAL_REPO && git checkout main cd $MIGRATED_REPO && git checkout main ``` ### 2. Run Behavior Comparison Use the comparison script to analyze behavioral differences: ```bash python scripts/behavior_checker.py \ --original $ORIGINAL_REPO \ --migrated $MIGRATED_REPO \ --output behavior_report.json ``` ### 3. Review Results Examine the generated report for: - Test result differences - Execution trace divergences - Output mismatches - Performance regressions - API contract violations ### 4. Fix Deviations Follow actionable guidance to resolve behavioral differences. ## Comparison Methods ### Method 1: Test-Based Comparison Run the same test suite on both repositories and compare results: **Workflow**: 1. Identify common test suite (or create equivalent tests) 2. Run tests on original repository 3. Run tests on migrated repository 4. Compare pass/fail status, assertions, and outputs **Example**: ```bash # Run on original cd $ORIGINAL_REPO pytest tests/ --json-report -...

Details

Author
ArabelaTso
Repository
ArabelaTso/Skills-4-SE
Created
6 months ago
Last Updated
today
Language
Python
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category