Skip to content

Add phase 4 settings migration workflow #1

Add phase 4 settings migration workflow

Add phase 4 settings migration workflow #1

name: Settings refactor phase 4 migration
on:
push:
branches:
- agent/settings-refactor-phase1-safety
paths:
- 'scripts/phase4_behavior_parity.py'
- 'tests/test_settings_behavior_parity.py'
- '.github/workflows/settings-refactor-phase4.yml'
workflow_dispatch:
permissions:
contents: write
jobs:
migrate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: agent/settings-refactor-phase1-safety
fetch-depth: 1
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Apply Phase 4 migration
run: python3 scripts/phase4_behavior_parity.py
- name: Validate settings parity
run: |
python3 -m unittest tests/test_settings_audit.py tests/test_settings_behavior_migration.py tests/test_modern_settings_preview.py tests/test_settings_behavior_parity.py
python3 scripts/settings_audit.py --report settings-audit.json
- name: Commit Phase 4 migration
shell: bash
run: |
if git diff --quiet -- src/settings.qml src/settings-catalog.json; then
echo 'Phase 4 migration is already applied.'
exit 0
fi
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add src/settings.qml src/settings-catalog.json
git commit -m 'Preserve legacy settings behavior in modern UI'
git push origin HEAD:agent/settings-refactor-phase1-safety