From 873aa2a302e92d59c5919f458cf8ac5bb988b2ca Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 12 Aug 2026 20:06:24 +0000 Subject: [PATCH 1/3] ci: merge all Python SDK verification into dirsql-python-ci One workflow now owns PR verification for packages/python, replacing python-lint.yml, python-typecheck.yml and python-test.yml (all deleted) and absorbing the python-sdk and rust-python-binding conventions lanes (job ids preserved). Eight jobs: the two gate suites, ruff lint, ty typecheck, and the unit / hermetic-integration / binding / distcheck tiers. packages/rust/** fans in because the core compiles into the PyO3 binding and [e2e].extra_scope stales this package's attestation on core changes. The root testing-conventions.toml governs the python-sdk lane, so it triggers too. changelog.d and migrations.d are excluded -- fragments feed changelog-check, not tests -- while e2e-attestations stays in scope because the e2e-verify gate reads it. The distcheck job still executes internals/distcheck, but internals/** does not trigger this workflow: per the epic discussion, internals changes are guarded by internals CI alone. skip-changelog: CI configuration only, no packages/** change Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01GECJQGPKgycnh4hrhzrDYP --- .github/workflows/conventions.yml | 17 --- .../{python-test.yml => dirsql-python-ci.yml} | 101 ++++++++++++++++-- .github/workflows/python-lint.yml | 48 --------- .github/workflows/python-typecheck.yml | 42 -------- 4 files changed, 94 insertions(+), 114 deletions(-) rename .github/workflows/{python-test.yml => dirsql-python-ci.yml} (64%) delete mode 100644 .github/workflows/python-lint.yml delete mode 100644 .github/workflows/python-typecheck.yml diff --git a/.github/workflows/conventions.yml b/.github/workflows/conventions.yml index 6ae787cea..03f9e1ee9 100644 --- a/.github/workflows/conventions.yml +++ b/.github/workflows/conventions.yml @@ -13,14 +13,6 @@ permissions: contents: read jobs: - python-sdk: - uses: thekevinscott/testing-conventions/.github/workflows/testing-conventions.yml@v0 - with: - languages: '["python"]' - source: packages/python/dirsql - config: testing-conventions.toml - base: ${{ github.event.pull_request.base.sha || 'origin/main' }} - typescript-sdk: uses: thekevinscott/testing-conventions/.github/workflows/testing-conventions.yml@v0 with: @@ -47,12 +39,3 @@ jobs: config: testing-conventions.toml base: ${{ github.event.pull_request.base.sha || 'origin/main' }} gates: '["colocated-test", "unit-lint"]' - - rust-python-binding: - uses: thekevinscott/testing-conventions/.github/workflows/testing-conventions.yml@v0 - with: - languages: '["rust"]' - source: packages/python - config: testing-conventions.toml - base: ${{ github.event.pull_request.base.sha || 'origin/main' }} - gates: '["colocated-test", "unit-lint"]' diff --git a/.github/workflows/python-test.yml b/.github/workflows/dirsql-python-ci.yml similarity index 64% rename from .github/workflows/python-test.yml rename to .github/workflows/dirsql-python-ci.yml index 0a68a02b4..6dff7aeef 100644 --- a/.github/workflows/python-test.yml +++ b/.github/workflows/dirsql-python-ci.yml @@ -1,8 +1,14 @@ -name: Python Test - -env: - FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true - +name: dirsql Python CI + +# All PR verification for the Python SDK (packages/python): lint, typecheck, +# the four test tiers, and the testing-conventions gate suites for the SDK +# and the PyO3 binding crate. Merged from python-lint.yml, python-typecheck.yml, +# python-test.yml and two conventions.yml lanes so one paths filter governs +# the whole set. +# +# packages/rust/** fans in: the core compiles into the binding, and +# [e2e].extra_scope means a core change stales this package's attestation. +# No self-path on pull_request, per the #834 stack convention. on: push: branches: [main] @@ -11,16 +17,97 @@ on: - 'packages/rust/**' - 'Cargo.toml' - 'Cargo.lock' - - '.github/workflows/python-test.yml' + - 'testing-conventions.toml' + - '.github/workflows/dirsql-python-ci.yml' pull_request: paths: - - '.github/CI-DISABLED-PLACEHOLDER' + - 'packages/python/**' + - '!packages/python/changelog.d/**' + - '!packages/python/migrations.d/**' + - '!packages/python/README.md' + - 'packages/rust/**' + - 'Cargo.toml' + - 'Cargo.lock' + - 'testing-conventions.toml' concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: + contents: read + jobs: + # Job ids `python-sdk` / `rust-python-binding` kept from their + # conventions.yml lanes so check-run names are unchanged. + python-sdk: + uses: thekevinscott/testing-conventions/.github/workflows/testing-conventions.yml@v0 + with: + languages: '["python"]' + source: packages/python/dirsql + config: testing-conventions.toml + base: ${{ github.event.pull_request.base.sha || 'origin/main' }} + + rust-python-binding: + uses: thekevinscott/testing-conventions/.github/workflows/testing-conventions.yml@v0 + with: + languages: '["rust"]' + source: packages/python + config: testing-conventions.toml + base: ${{ github.event.pull_request.base.sha || 'origin/main' }} + gates: '["colocated-test", "unit-lint"]' + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Install uv + uses: astral-sh/setup-uv@v7 + + - name: Install just + uses: extractions/setup-just@v2 + + # Lint/format only touch the `.py` source and never execute the + # compiled extension, so skip installing/building the local maturin + # project (`uv sync` would otherwise pay a full Rust build just to run + # ruff). `uv run --no-sync` keeps the `ruff` invocations from + # re-triggering the project install that a plain `uv run` performs + # implicitly. + - name: Install dependencies + run: uv sync --no-install-project + working-directory: packages/python + + - name: Lint + run: uv run --no-sync ruff check . + working-directory: packages/python + + - name: Format check + run: uv run --no-sync ruff format --check . + working-directory: packages/python + + ty: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Install uv + uses: astral-sh/setup-uv@v7 + + # `ty` type-checks the `.py` source statically and never imports the + # compiled extension, so skip installing/building the local maturin + # project (`uv sync` would otherwise pay a full Rust build just to + # typecheck). `uv run --no-sync` keeps the `ty` invocation from + # re-triggering the project install that a plain `uv run` performs + # implicitly. + - name: Install dependencies + run: uv sync --no-install-project + working-directory: packages/python + + - name: Type check (all rules promoted to error) + run: uv run --no-sync ty check --error all --error-on-warning dirsql/ + working-directory: packages/python + unit: name: Unit tests runs-on: ubuntu-latest diff --git a/.github/workflows/python-lint.yml b/.github/workflows/python-lint.yml deleted file mode 100644 index 1fa7d39dc..000000000 --- a/.github/workflows/python-lint.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Python Lint - -env: - FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true - -on: - push: - branches: [main] - paths: - - 'packages/python/**/*.py' - - 'packages/python/pyproject.toml' - pull_request: - paths: - - '.github/CI-DISABLED-PLACEHOLDER' - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - name: Install uv - uses: astral-sh/setup-uv@v7 - - - name: Install just - uses: extractions/setup-just@v2 - - # Lint/format only touch the `.py` source and never execute the - # compiled extension, so skip installing/building the local maturin - # project (`uv sync` would otherwise pay a full Rust build just to run - # ruff). `uv run --no-sync` keeps the `ruff` invocations from - # re-triggering the project install that a plain `uv run` performs - # implicitly. - - name: Install dependencies - run: uv sync --no-install-project - working-directory: packages/python - - - name: Lint - run: uv run --no-sync ruff check . - working-directory: packages/python - - - name: Format check - run: uv run --no-sync ruff format --check . - working-directory: packages/python diff --git a/.github/workflows/python-typecheck.yml b/.github/workflows/python-typecheck.yml deleted file mode 100644 index 0b14e1139..000000000 --- a/.github/workflows/python-typecheck.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Python Typecheck - -env: - FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true - -on: - push: - branches: [main] - paths: - - 'packages/python/**/*.py' - - 'packages/python/**/*.pyi' - - 'packages/python/pyproject.toml' - pull_request: - paths: - - '.github/CI-DISABLED-PLACEHOLDER' - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - ty: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - name: Install uv - uses: astral-sh/setup-uv@v7 - - # `ty` type-checks the `.py` source statically and never imports the - # compiled extension, so skip installing/building the local maturin - # project (`uv sync` would otherwise pay a full Rust build just to - # typecheck). `uv run --no-sync` keeps the `ty` invocation from - # re-triggering the project install that a plain `uv run` performs - # implicitly. - - name: Install dependencies - run: uv sync --no-install-project - working-directory: packages/python - - - name: Type check (all rules promoted to error) - run: uv run --no-sync ty check --error all --error-on-warning dirsql/ - working-directory: packages/python From f8b1381600f5cffe48edd3c4e66d4002559459d8 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 14 Aug 2026 13:43:25 +0000 Subject: [PATCH 2/3] ci: exclude rust fragments/README from dirsql-python-ci PR paths A rust changelog fragment or README edit cannot alter this workflow's verdict; mirror dirsql-rust-ci's exclusions. Also disambiguate the two check names this workflow shares verbatim with dirsql-typescript-ci. skip-changelog: CI configuration only --- .github/workflows/dirsql-python-ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dirsql-python-ci.yml b/.github/workflows/dirsql-python-ci.yml index 6dff7aeef..17443c926 100644 --- a/.github/workflows/dirsql-python-ci.yml +++ b/.github/workflows/dirsql-python-ci.yml @@ -26,6 +26,9 @@ on: - '!packages/python/migrations.d/**' - '!packages/python/README.md' - 'packages/rust/**' + - '!packages/rust/changelog.d/**' + - '!packages/rust/migrations.d/**' + - '!packages/rust/README.md' - 'Cargo.toml' - 'Cargo.lock' - 'testing-conventions.toml' @@ -58,6 +61,7 @@ jobs: gates: '["colocated-test", "unit-lint"]' lint: + name: lint (python) runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 @@ -261,7 +265,7 @@ jobs: # gate does NOT do (that gate only asserts no test files ship in the # artifact). No mocks. The flow lives in the internals/distcheck package # (#520); this job invokes its `dirsql-distcheck python` entry point. - name: Packaging distcheck (install + run) + name: Packaging distcheck (python) runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 From 1d9673fa886efd5d2bb64e82d585b346eb7eecf9 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 14 Aug 2026 15:29:32 +0000 Subject: [PATCH 3/3] ci: trigger dirsql-python-ci.yml on edits to their own files The pull_request self-path was omitted while this stack was being probed, so definition layers reported zero checks and the probe PRs measured cleanly. The probes are read and closed, and the YAML layers were always separate PRs from them, so the suppression has no remaining purpose -- it only leaves CI-config-only PRs with no checks at all, which merge vacuously green under the post-#881 Mergify gate. skip-changelog: CI configuration only --- .github/workflows/dirsql-python-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dirsql-python-ci.yml b/.github/workflows/dirsql-python-ci.yml index 17443c926..8e9064273 100644 --- a/.github/workflows/dirsql-python-ci.yml +++ b/.github/workflows/dirsql-python-ci.yml @@ -32,6 +32,7 @@ on: - 'Cargo.toml' - 'Cargo.lock' - 'testing-conventions.toml' + - '.github/workflows/dirsql-python-ci.yml' concurrency: group: ${{ github.workflow }}-${{ github.ref }}