Skip to content

ci(repo): pass the project root to pana - #2881

Merged
xsahil03x merged 1 commit into
masterfrom
ci/pana-project-root
Aug 12, 2026
Merged

ci(repo): pass the project root to pana#2881
xsahil03x merged 1 commit into
masterfrom
ci/pana-project-root

Conversation

@xsahil03x

@xsahil03x xsahil03x commented Aug 12, 2026

Copy link
Copy Markdown
Member

Problem

Every pana job has been failing on every branch since 2026-08-12 09:36 UTC, when pana 0.23.18 was published. The action runs flutter pub global activate pana unpinned, so runs picked it up automatically.

0.23.18 ships a breaking change:

--project-root CLI option to specify the project's root directory. When specified, pana copies the entire tree for analysis.
BREAKING CHANGE: the git-based detection is no longer used, users must specify the directory explicitly.

The action's "Temporary Override Local Dependencies" step rewrites the inter-package deps to relative path deps (stream_chat: {path: ../stream_chat}). Until now pana's git detection copied the whole repo to temp, so those paths resolved. 0.23.18 copies only packages/<pkg>/, and resolution fails:

Because stream_chat_flutter_core depends on stream_chat from path which doesn't exist
(could not find package stream_chat at "../stream_chat"), version solving failed.
Score: 40/160
The minimum score of 100 was not met!

stream_chat is the only job still green — it's the only package with no local path deps.

Fix

Pass --project-root "${{ github.workspace }}" so pana copies the full tree again. Using github.workspace rather than a relative ../.. keeps this correct for any working_directory the action is called with; pana requires only that the package's pubspec be within the given root.

This unblocks the pana checks on all open PRs.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Improved automated project verification by ensuring analysis runs against the correct project workspace.
    • Existing score extraction and threshold validation remain unchanged.

pana 0.23.18 dropped its git-based project-root detection, so it now
copies only the package directory instead of the whole repo. That broke
the relative path dependencies this action injects, dropping every
multi-package score to 40/160. Point pana at the workspace root so the
sibling packages are copied along with it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8514fc8b-dd9b-472d-bf1d-f093d820b4f8

📥 Commits

Reviewing files that changed from the base of the PR and between 56462e1 and e4453bb.

📒 Files selected for processing (1)
  • .github/actions/pana/action.yml

📝 Walkthrough

Walkthrough

The Pana GitHub Action now passes the GitHub workspace as the project root while analyzing the configured working directory. Score extraction and threshold validation are unchanged.

Changes

Pana project root

Layer / File(s) Summary
Configure Pana project root
.github/actions/pana/action.yml
The Pana command now includes --project-root "${{ github.workspace }}". Score parsing and threshold validation remain unchanged.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main CI change: passing the project root to Pana.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/pana-project-root

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@xsahil03x
xsahil03x merged commit 59a1d57 into master Aug 12, 2026
26 of 27 checks passed
@xsahil03x
xsahil03x deleted the ci/pana-project-root branch August 12, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants