migration — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited migration (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.
down methodEXPLAIN ANALYZE on affected queries before deployingEXPLAIN queries). If unavailable, perform these checks manually: identify table lock duration, confirm a rollback path exists, enumerate backfill steps, and run EXPLAIN ANALYZE on affected queries.HARD GATE — Migration Safety Check:
EXPLAINIf gate fails: Redesign the migration approach before proceeding.
Deploy each migration file independently.
Test each migration in sequence:
rails db:migrate && rails db:rollback && rails db:migrate
bundle exec rspec spec/models/order_spec.rb spec/features/order_flow_spec.rbHARD GATE — Development Tests:
If gate fails: Fix migration or application code before proceeding.
Prerequisites: Staging DB must match production in size, data shape, and PostgreSQL version.
RAILS_ENV=staging bundle exec rails db:migrate
curl https://staging.example.local/api/health
curl https://staging.example.local/api/orders
RAILS_ENV=staging bundle exec rails db:rollbackHARD GATE — Staging Verification:
If gate fails: Do not proceed to production. Fix and re-deploy to staging.
Pre-deployment checklist:
RAILS_ENV=production bundle exec rails db:migrate
# Monitor in real-time
tail -f log/production.log
heroku pg:diagnostics --app production-app
# Smoke tests
curl https://api.example.local/health
curl https://api.example.local/api/orders
# Rollback if needed
# RAILS_ENV=production bundle exec rails db:rollbackHARD GATE — Production Monitoring (first 15 minutes):
If gate fails: Roll back immediately if error rate or latency exceeds thresholds. Investigate before redeploying.
When completing a migration cycle, produce a Migration Report:
## Migration Report
**Plan**
- Change: <description>
- Pattern: <expand-contract | phased rollout | zero-downtime>
- Rollback strategy: <steps>
- Lock assessment: <duration and type>
**Development**
- Migration file(s): <paths>
- Idempotent cycle: PASS | FAIL
- Test suite: PASS | FAIL
- N+1 check: PASS | FAIL
**Staging**
- Migration time: <duration>
- Smoke tests: PASS | FAIL
- Rollback tested: YES | NO
**Production**
- Deploy timestamp: <datetime>
- Post-migration error rate: <rate> vs baseline <rate>
- p99 latency: <ms>
- Monitoring result: STABLE | ROLLED BACKMigration fails in production:
RAILS_ENV=production rails db:rollbackRollback itself fails:
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.