test-guided-migration-assistant — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited test-guided-migration-assistant (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Automatically update a codebase to a new language version, framework version, or library update while ensuring all tests continue to pass.
Before starting migration, establish the current state:
# Run full test suite
<test_command>
# Record baseline
# - Total tests: X
# - Passing: Y
# - Failing: Z (should be 0 or known failures)
# - Coverage: N%Document current state:
Gather information:
Consult migration guides:
Identify risks:
Update dependencies:
Incremental approach (recommended):
# Update one dependency at a time
npm install package@new-version
# or
pip install package==new-version
# Run tests immediately
<test_command>Batch approach (for experienced migrations):
# Update all dependencies
npm update
# or
pip install -U -r requirements.txt
# Run tests
<test_command>Update configuration:
Run tests and capture output:
# Pytest
pytest -v > test_output.txt 2>&1
# Jest
npm test > test_output.txt 2>&1
# Other frameworks
<test_command> > test_output.txt 2>&1Use analysis script:
python scripts/analyze_test_failures.py test_output.txtThe script categorizes failures into:
Follow priority order from analysis. See migration_strategy.md for detailed strategies.
Fix import errors first:
# Example: Module moved
# Old
from collections import Mapping
# New
from collections.abc import MappingFix API signature errors:
# Example: Parameter renamed
# Old
result = function(arg1, old_param=value)
# New
result = function(arg1, new_param=value)Fix type errors:
// Example: Stricter types
// Old
function process(value: string) { }
// New (handle undefined)
function process(value: string | undefined) {
if (value === undefined) return;
// ...
}Handle behavior changes:
# Example: Changed defaults
# Old behavior: returns None on error
# New behavior: raises exception
# Add error handling
try:
result = function()
except NewException:
result = None # Preserve old behaviorAfter each fix category:
# Run tests
<test_command>
# Commit if tests pass
git add .
git commit -m "Fix: migration import errors"Run full test suite multiple times:
# Catch flaky tests
for i in {1..3}; do
echo "Run $i"
<test_command>
doneVerify coverage unchanged:
# Generate coverage report
<coverage_command>
# Compare to baseline
# Should be same or betterCheck for warnings:
# Python
python -W all -m pytest
# Node.js
node --trace-warnings test
# Look for deprecation warningsSuccess criteria:
Create migration summary:
MIGRATION SUMMARY
=================
Migration: Python 3.8 → Python 3.12
Changes Made:
- Updated collections imports (Mapping → collections.abc.Mapping)
- Fixed asyncio.coroutine → async def
- Updated type hints for stricter checking
- Removed distutils usage
Test Results:
- Before: 156/156 passing
- After: 156/156 passing
- Coverage: 87% (unchanged)
Breaking Changes Addressed:
1. Collections ABC moved
2. asyncio.coroutine removed
3. Type checking stricter
Deprecation Warnings:
- None remainingTests Define Correctness: If tests pass, behavior is preserved.
Fix by Priority: Import errors block everything - fix first. Then API errors, then types, then behavior.
Incremental Changes: Fix one category, test, commit. Don't accumulate many changes.
Never Modify Tests: Fix the code to make tests pass. Don't change tests to match new behavior (unless behavior change is intentional and documented).
Fail Fast: Run tests immediately after migration attempt. Don't wait.
print statement → print() functionxrange() → range().iteritems() → .items()except Exception, e: → except Exception as e:ReactDOM.render() → ReactDOM.createRoot().render()django.conf.urls.url() → django.urls.re_path()ugettext → gettextUSE_L10N settingThe analyze_test_failures.py script automates failure categorization:
# Analyze pytest output
python scripts/analyze_test_failures.py test_output.txt
# Analyze Jest output
python scripts/analyze_test_failures.py test_output.txt --format jest
# Auto-detect format
python scripts/analyze_test_failures.py test_output.txt --format autoOutput provides:
If migration has too many failures (>20% of tests):
# Revert dependency changes
git checkout HEAD -- package.json package-lock.json
npm install
# Or revert commits
git revert <commit-hash>
# Verify tests pass
<test_command>Then plan incremental migration or allocate more time.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.