You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ci): use find as single source of truth for framework project detection
Each framework workflow (anchor, native, pinocchio, quasar, solana-asm)
previously had two competing answers to the question "which projects are
build targets":
1. workflow_dispatch / schedule: `find . -type d -name <framework>` —
exact directory-name match. Correct.
2. pull_request / push: a substring pipeline
`dirname "$file" | grep <framework> | sed 's#/<framework>/.*#/<framework>#g'`
— substring match. Wrong.
The substring path let ghost paths leak into the build list. For example,
a change to `tokens/nft-meta-data-pointer/anchor-example/app/pages/api/...`
was matched by `grep anchor` (substring of "anchor-example") and was not
collapsed by `sed 's#/anchor/.*#/anchor#g'` because the path contains no
literal `/anchor/` segment. The path then survived the trailing
`awk '$NF == "anchor"'` filter only because the previous commit added it
as a post-hoc patch — but the underlying design still allowed paths that
were never returned by `find -name anchor` to enter the candidate list.
This commit removes the substring approach entirely. Every workflow now
uses a single source of truth — `get_projects()`, which calls
`find . -type d -name <framework>` — and a new `filter_by_changes()`
helper that intersects that authoritative list with the changed files
via a prefix match (`<project>/`). A path cannot enter the build list
unless `find` already returned it, so ghost siblings like
`anchor-example/`, `wasm/`, `plasma/`, `pinocchio-example/` are
impossible by construction rather than filtered out after the fact.
Behaviour for `workflow_dispatch`, `schedule`, and workflow-file-changed
events is unchanged (those paths already called `get_projects()` directly).
Empty `changed_files` on push still falls through to all projects.
0 commit comments