Repository navigation
Conversation
…ions workflows (Graphify-Labs#5565) Extract script invocations and source imports from GitHub Actions workflow and composite action `run:` steps, connecting workflow definitions to the bash scripts and sourced functions they run. - Extract `extract_bash_source` helper from `extract_bash` with optional line offset, base directory, and GHA expression neutralization without disturbing standalone .sh extraction. - Cascade workflow-, job-, and step-level defaults for shells and working directories, requiring bash-compatible shells and rejecting Windows jobs unless explicit bash shell is specified. - Support composite actions, relative paths, in-memory expression neutralization, and fail-closed security for traversal and UNC paths. Fixes Graphify-Labs#5565 Replaces and fast-tracks Graphify-Labs#5584 rebased onto v0.9.123 (v8)
|
Thanks for the pull request, @m3lonxd. A maintainer will review it soon. Want to talk it through while it is in review? Come join us on our Discord server. For longer-form discussion there is also GitHub Discussions. A couple of things that speed up review: make sure the test suite passes on Python 3.11 and 3.13, and that the change keeps extraction deterministic. |
There was a problem hiding this comment.
Graphify review 
4 possible issues to check · High impact
The change extracts script and source relationships from eligible GitHub Actions workflow and composite-action run steps, then passes those relationships through the existing Bash resolver.
4 possible issues we couldn't confirm
- A workflow file that lists bash scripts now joins the shell cross-file pass, so one failure there skips call resolution for every shell scri ·
graphify/extract.py:13867 - The same ci.yml gets node id
github_workflows_ci_ymlin one test butgithub_workflows_ciin others ·tests/test_yaml_extraction.py:705 - Shopt test calls extract_yaml with no active scan root, unlike the fail-closed test which sets one ·
tests/test_yaml_extraction.py:756 - +1 more in Graphify
They don't change the score.
What this review covered
- Some lookups asked for files or lines that do not exist; the review was told and carried on.
- 4 of 4 changed files inspected. This is scope, not a correctness guarantee.
Code graph · 5438 functions depend on this change
- 9 functions became more coupled. Largest:
extract()(1434 callers),build_from_json()(354 callers),extract_yaml()(23 callers). - 386 of 658 test files are affected by this change.
- Gate, test list and every flagged function: in the Graphify check.
Reviewed 0ad1005 · 7 earlier findings not re-checked
Extractor accuracy (Swift #5641, Apex #5627, Python #5647, TypeScript #5604/#5614/#5612, Bash caller-var #5602), GitHub Actions run-step extraction (#5603), incremental correctness (#5634/#5638/#5636), symlink and semantic-cache fixes (#5617/#5618), export/report hardening and perf (#5643/#5644/#5645/#5646/#5619/#5620/#5621), and CLI/docs/skill/install work (#5629/#5628/#5626/#5624/#5623/#5625/#5642/#5583). AST cache schema 59 to 60; Swift/Apex/Python/Bash/GHA inputs re-extract on first build. Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
Landed in v0.9.124 (just released to PyPI), cherry-picked with your authorship preserved so it shows under your name in the history. Thanks @m3lonxd for extracting bash from GitHub Actions run: steps — verified green in the full suite and, where applicable, smoke-tested against the published package. 🙏 |
Fixes #5565
Replaces and fast-tracks #5584, cleanly rebased onto
v0.9.123(v8@5d962d2d) per @safishamsi's review.Summary of Changes
extract_bash_sourcehelper: Refactorsextract_bashto delegate to an in-memoryextract_bash_sourcehelper, keeping all eight landed bash extraction PRs (fix(bash): keep the literal suffix after the script-dir idiom's pwd) (#5560) #5568, fix(bash): a $(fn) in an argument or a test is a call (#5561) #5569, fix(bash): resolve the script-dir idiom written inline in source (#5562) #5570, fix(bash): read the call after a keyword parsed as a command name (#5572) #5576, fix(bash): a nested function's defines edge comes from its file (#5573) #5577, fix(bash): a run of "$(dirname "$0")/x.sh" is x.sh in the script's own folder (#5575) #5578, fix(bash): resolve cross-library calls between sibling sourced scripts #5589, fix(bash): resolve script calls through tracked directory variables #5597) 100% intact.run:bash commands from.github/workflows/*.yml|yamland compositeaction.yml|action.yamlfiles.shellandworking-directory. Enforces bash compatibility and disables execution for Windows runners unless an explicit bash shell is set.${{ ... }}) neutralized in memory preserving line counts.v8remains byte-identical.graphify/cache.pyremains 100% untouched.tests/test_yaml_extraction.py.