From 9713f3ab30dfa8a63394e01de0d5a742c2689f05 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Tue, 27 Oct 2026 16:18:33 +0100 Subject: [PATCH 1/3] ci(repo): resolve sibling packages from the checkout in pana Pana resolves a package on its own, so stream_core_flutter's dependency on stream_core came from pub.dev and missed changes in the same checkout. Point it at ../stream_core and pass the project root, as the chat repo does. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_012vTgFwqhUc2wKCWrw635yC --- .github/actions/pana/action.yml | 10 +++++++++- .github/workflows/pana.yml | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/actions/pana/action.yml b/.github/actions/pana/action.yml index 2fa3bee4..ec788a69 100644 --- a/.github/actions/pana/action.yml +++ b/.github/actions/pana/action.yml @@ -20,6 +20,14 @@ inputs: runs: using: "composite" steps: + # Pana resolves the package on its own, so a dependency on a sibling package would come from pub.dev and miss + # the changes in this checkout. Point it at the sibling's directory instead. + - name: Resolve Sibling Packages From The Checkout + uses: mikefarah/yq@v4 + with: + cmd: | + yq eval 'with(select(.dependencies.stream_core != null); .dependencies.stream_core = {"path": "../stream_core"})' -i packages/stream_core_flutter/pubspec.yaml + - name: Install Flutter uses: subosito/flutter-action@v2 with: @@ -37,7 +45,7 @@ runs: working-directory: ${{ inputs.working_directory }} shell: bash run: | - PANA=$(pana . --no-warning); PANA_SCORE=$(echo $PANA | sed -n "s/.*Points: \([0-9]*\)\/\([0-9]*\)./\1\/\2/p") + PANA=$(pana . --no-warning --project-root "${{ github.workspace }}"); PANA_SCORE=$(echo $PANA | sed -n "s/.*Points: \([0-9]*\)\/\([0-9]*\)./\1\/\2/p") echo "Score: $PANA_SCORE" IFS='/'; read -a SCORE_ARR <<< "$PANA_SCORE"; SCORE=SCORE_ARR[0]; if (( $SCORE < ${{inputs.min_score}} )); then echo "The minimum score of ${{inputs.min_score}} was not met!"; exit 1; fi diff --git a/.github/workflows/pana.yml b/.github/workflows/pana.yml index 11890eb4..a7aa0a2b 100644 --- a/.github/workflows/pana.yml +++ b/.github/workflows/pana.yml @@ -37,7 +37,7 @@ jobs: uses: ./.github/actions/pana with: working_directory: packages/stream_core_flutter - min_score: 120 # Missing 10 points for no license, 10 points for no example, and 20 points for static analysis issues. + min_score: 110 # Missing 10 points for no license, 10 points for no example, 20 points for static analysis issues (including the path dependency on stream_core that the pana action sets up), and 10 points for outdated dependencies (shimmer 4.0.0). stream_thumbnail: runs-on: ubuntu-latest From caf1b6a7d6615d486f8a382004ff2a37296362f6 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Tue, 27 Oct 2026 16:24:31 +0100 Subject: [PATCH 2/3] ci(repo): only point stream_core at the checkout when it is a dependency Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_012vTgFwqhUc2wKCWrw635yC --- .github/actions/pana/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/pana/action.yml b/.github/actions/pana/action.yml index ec788a69..7de52eec 100644 --- a/.github/actions/pana/action.yml +++ b/.github/actions/pana/action.yml @@ -26,7 +26,7 @@ runs: uses: mikefarah/yq@v4 with: cmd: | - yq eval 'with(select(.dependencies.stream_core != null); .dependencies.stream_core = {"path": "../stream_core"})' -i packages/stream_core_flutter/pubspec.yaml + yq eval '(.dependencies | select(has("stream_core")) | .stream_core) = {"path": "../stream_core"}' -i packages/stream_core_flutter/pubspec.yaml - name: Install Flutter uses: subosito/flutter-action@v2 From 3fdd421bb08225c8490a78d0a60c0809dc91b498 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Tue, 27 Oct 2026 16:36:11 +0100 Subject: [PATCH 3/3] ci(repo): always report analyze_legacy_version The workflow-level paths filter skipped the whole workflow on PRs that don't touch packages, so the required check never reported and the PR stayed blocked. Decide in a gate job instead, as the chat repo does: a job skipped by `if` reports success. The gate also runs the analysis on pushes, which the old draft check skipped. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_012vTgFwqhUc2wKCWrw635yC --- .github/workflows/legacy_version_analyze.yml | 33 +++++++++++++++----- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/.github/workflows/legacy_version_analyze.yml b/.github/workflows/legacy_version_analyze.yml index 76940ddf..f742bb11 100644 --- a/.github/workflows/legacy_version_analyze.yml +++ b/.github/workflows/legacy_version_analyze.yml @@ -10,16 +10,10 @@ on: branches: - main - develop - paths: - - "packages/**" - - ".github/workflows/legacy_version_analyze.yml" pull_request: branches: - main - develop - paths: - - "packages/**" - - ".github/workflows/legacy_version_analyze.yml" concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -30,14 +24,39 @@ permissions: pull-requests: read jobs: + # Decides whether the analysis runs: on every push, and on a pull request + # that is not a draft and changes a package. A job skipped this way reports + # `success` to branch protection, while a workflow skipped by `on.paths` + # never reports and leaves a required check waiting forever. See + # https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks + gate: + runs-on: ubuntu-latest + outputs: + should_run: ${{ github.event_name == 'push' || (steps.filter.outputs.packages == 'true' && github.event.pull_request.draft != true) }} + steps: + # paths-filter diffs against git history on push events, so it needs a + # checkout there. On pull requests it uses the API instead. + - name: "Git Checkout" + uses: actions/checkout@v4 + + - name: "Detect Path Changes" + uses: dorny/paths-filter@v4 + id: filter + with: + filters: | + packages: + - 'packages/**' + - '.github/workflows/legacy_version_analyze.yml' + # Does a sanity check that packages at least pass analysis on the N-1 # versions of Flutter stable if the package claims to support that version. # This is to minimize accidentally making changes that break old versions # (which we don't commit to supporting, but don't want to actively break) # without updating the constraints. analyze_legacy_version: + needs: gate + if: needs.gate.outputs.should_run == 'true' timeout-minutes: 15 - if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - name: "Git Checkout"