Settings refactor: modern UI default with persistence and behavior parity #44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Settings audit | |
| on: | |
| pull_request: | |
| paths: | |
| - 'src/settings*.qml' | |
| - 'src/settings-catalog.json' | |
| - 'scripts/settings_audit.py' | |
| - 'scripts/phase4_behavior_parity.py' | |
| - 'tests/test_settings_audit.py' | |
| - 'tests/test_settings_behavior_migration.py' | |
| - 'tests/test_modern_settings_preview.py' | |
| - 'tests/test_settings_behavior_parity.py' | |
| - '.github/workflows/settings-audit.yml' | |
| - 'docs/settings-refactor-status.md' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| audit: | |
| runs-on: ubuntu-latest | |
| env: | |
| PYTHONDONTWRITEBYTECODE: "1" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref_name }} | |
| fetch-depth: 1 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Apply Phase 4 behavior parity migration | |
| if: github.event_name == 'pull_request' && github.event.pull_request.head.ref == 'agent/settings-refactor-phase1-safety' | |
| run: python3 scripts/phase4_behavior_parity.py | |
| - name: Commit Phase 4 behavior parity migration | |
| if: github.event_name == 'pull_request' && github.event.pull_request.head.ref == 'agent/settings-refactor-phase1-safety' | |
| shell: bash | |
| run: | | |
| if git diff --quiet -- src/settings.qml src/settings-catalog.json; then | |
| echo 'Phase 4 migration already applied.' | |
| else | |
| 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:${{ github.event.pull_request.head.ref }} | |
| fi | |
| - name: Test settings refactor infrastructure | |
| 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 | |
| - name: Resolve and fetch ABI base | |
| id: base | |
| shell: bash | |
| run: | | |
| if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
| BASE_SHA="${{ github.event.pull_request.base.sha }}" | |
| git fetch --no-tags --depth=1 origin "$BASE_SHA" | |
| echo "sha=$BASE_SHA" >> "$GITHUB_OUTPUT" | |
| else | |
| git fetch --no-tags --depth=1 origin master | |
| echo "sha=FETCH_HEAD" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Audit persistent settings ABI and catalog | |
| run: >- | |
| python3 scripts/settings_audit.py | |
| --base "${{ steps.base.outputs.sha }}" | |
| --report settings-audit.json | |
| - name: Upload audit inventory | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: settings-audit | |
| path: settings-audit.json | |
| if-no-files-found: ignore |