From 6fd84282c900dd1838a5d34afbbef0e01ea552a6 Mon Sep 17 00:00:00 2001 From: Aaron Liang <76561968+AaronL725@users.noreply.github.com> Date: Wed, 15 Jul 2026 11:59:49 +0800 Subject: [PATCH] chore: add temporary minimal fix verifier --- .../temp-minimal-regression-fixes.yml | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/temp-minimal-regression-fixes.yml diff --git a/.github/workflows/temp-minimal-regression-fixes.yml b/.github/workflows/temp-minimal-regression-fixes.yml new file mode 100644 index 0000000..81a14d1 --- /dev/null +++ b/.github/workflows/temp-minimal-regression-fixes.yml @@ -0,0 +1,55 @@ +name: Temporary minimal regression fixes + +on: + pull_request: + branches: [main] + paths: + - tools/apply_minimal_regression_fixes.py + - .github/workflows/temp-minimal-regression-fixes.yml + workflow_dispatch: + +permissions: + contents: write + +jobs: + apply-and-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref || github.ref_name }} + fetch-depth: 0 + - uses: actions/setup-python@v5 + with: + python-version: '3.9' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -r requirements.txt + - name: Apply minimal fixes and test on Python 3.9 + run: | + python -m py_compile tools/apply_minimal_regression_fixes.py + python tools/apply_minimal_regression_fixes.py + python -m compileall -q . + python -m unittest discover -s tests -p 'test_*.py' + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Install dependencies on Python 3.12 + run: | + python -m pip install --upgrade pip + python -m pip install -r requirements.txt + - name: Test on Python 3.12 + run: | + python -m compileall -q . + python -m unittest discover -s tests -p 'test_*.py' + - name: Commit verified changes to fix branch + if: github.event_name == 'pull_request' + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add -A + if ! git diff --cached --quiet; then + git commit -m "fix: harden postprocessing and recovery boundaries" + git push origin HEAD:${{ github.head_ref }} + fi