ci(weighted-edges): fix ruff-action glob so 'Static analysis — weighted-edge sources' can run#167
Open
alexzhu0 wants to merge 1 commit intoFlowElement-ai:mainfrom
Open
Conversation
The weighted_edges_tests quality-gate job invokes astral-sh/ruff-action
with args containing 'm_flow/knowledge/graph_ops/**'. ruff-action passes
the string directly to ruff without shell glob expansion, so ruff treats
'/**' as a literal path component and fails with:
E902 No such file or directory (os error 2)
--> m_flow/knowledge/graph_ops/**:1:1
ruff already recurses into directories, so passing the plain directory
path 'm_flow/knowledge/graph_ops' is the standard idiom and matches how
the upstream ruff-action examples are written.
Verified locally with ruff 0.15.10 (lockfile-pinned version):
$ uvx ruff@0.15.10 check m_flow/knowledge/graph_ops \
m_flow/tests/unit/interfaces/graph/test_weighted_edges.py \
examples/python/weighted_edges_example.py
All checks passed!
$ uvx ruff@0.15.10 format --check ...
17 files already formatted
Signed-off-by: Alexazhu <alexazzjjtt@163.com>
This was referenced May 5, 2026
Contributor
Author
|
Heads-up: this PR surfaces a second latent bug in the same workflow that I'm intentionally leaving out of scope. With the glob fix in place, That path doesn't exist on
Looks like the test was renamed/removed but Two reasons this hasn't bitten anyone until now:
Happy to open a separate PR for the stale test path once you tell me what the right target is (rename → |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I affirm that all code in every commit of this pull request conforms to the terms of the M-flow Developer Certificate of Origin
Summary
.github/workflows/weighted_edges_tests.ymlinvokesastral-sh/ruff-action@v2withm_flow/knowledge/graph_ops/**in the args string.ruff-actionpasses that verbatim to ruff without shell glob expansion, so ruff treats/**as a literal path and the job fails instantly on every fork PR with:Example failed runs (all fork PRs — same error regardless of PR content):
passstatements (ruff PIE790) #150 — run 25245818613__slots__tuples alphabetically (ruff RUF023) #152 — run 25245873702if TYPE_CHECKING:blocks and orphaned imports (ruff TC005) #153 had the same failure before the weighted-edges job was gated out of their touched pathsAs a result,
Static analysis — weighted-edge sourcesis permanently red on contributor PRs and blocks merges that would otherwise be clean.Fix
Drop the
/**. ruff already recurses into directories, so passing the plain directory path (m_flow/knowledge/graph_ops) is the canonical idiom and matches how the upstream ruff-action examples are written.Two lines changed —
argsfor both thecheckandformat --checksteps in thequality-gatejob.Verification
Ran locally with the repo's lockfile-pinned ruff (0.15.10):
$ uvx ruff@0.15.10 check \ m_flow/knowledge/graph_ops \ m_flow/tests/unit/interfaces/graph/test_weighted_edges.py \ examples/python/weighted_edges_example.py All checks passed! $ uvx ruff@0.15.10 format --check \ m_flow/knowledge/graph_ops \ m_flow/tests/unit/interfaces/graph/test_weighted_edges.py \ examples/python/weighted_edges_example.py 17 files already formattedThe quality-gate job will now actually exercise the files it is supposed to guard, rather than failing before it reaches them.
Out of scope
No application code touched. No rule set changes. Pure CI fix.
Signed-off-by: Alexazhu alexazzjjtt@163.com