Settings refactor: modern UI default with persistence and behavior parity #14
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/phase2_catalog_migration.py' | |
| - 'tests/test_settings_audit.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: Complete Phase 2 catalog migration | |
| if: github.event_name == 'pull_request' && github.event.pull_request.head.ref == 'agent/settings-refactor-phase1-safety' | |
| run: python3 scripts/phase2_catalog_migration.py | |
| - name: Commit Phase 2 catalog 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-catalog.json; then | |
| echo 'Catalog is already migrated.' | |
| else | |
| git config user.name 'github-actions[bot]' | |
| git config user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
| git add src/settings-catalog.json | |
| git commit -m 'Complete settings catalog coverage for phase 2' | |
| git push origin HEAD:${{ github.event.pull_request.head.ref }} | |
| fi | |
| - name: Test audit parser | |
| run: python3 -m unittest tests/test_settings_audit.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 |