Skip to content

OSAC-4049/4018: GitHub Actions YAML extraction, ci-select, metadata.json contract doc - #5

Merged
eliorerz merged 5 commits into
v8from
feat/gh-actions-yaml-extract
Aug 25, 2026
Merged

OSAC-4049/4018: GitHub Actions YAML extraction, ci-select, metadata.json contract doc#5
eliorerz merged 5 commits into
v8from
feat/gh-actions-yaml-extract

Conversation

@eliorerz

Copy link
Copy Markdown
Owner

Restores/proposes the work that was previously sitting directly on v8 (not on its own branch), before v8 got reset to match Graphify-Labs/graphify:v8 exactly. Nothing was lost -- this branch already had the identical content -- but it now needs its own PR since v8 is a clean upstream mirror going forward.

Commits

  • Add graphify ci-select subcommand for graph-informed CI test selection -- the token-saving CI test-selection feature referenced by docs/ci/graph-informed-ci-setup.md. Not yet in any published graphifyy release (verified: graphifyy==0.9.41 on PyPI has no ci_select module), so this is what actually ships it.
  • OSAC-4018: Document metadata.json schema as a canonical contract
  • OSAC-4049: Extract GitHub Actions workflow job/needs/uses under --code-only + 3 follow-up fix commits (CodeRabbit review findings, git executable resolution via shutil.which(), extractor-precedence/comment-in-sequence bugs)

Test plan

  • Review each commit individually (they were written in sequence, each with its own fixes)
  • Confirm graphify ci-select behaves as documented in docs/ci/graph-informed-ci-setup.md

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 14 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 49b53e5d-0c9f-4602-a11c-b8c6a6ef68b7

📥 Commits

Reviewing files that changed from the base of the PR and between 282976b and ffc72c3.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (18)
  • ARCHITECTURE.md
  • README.md
  • docs/graph-bundle-metadata.md
  • docs/graph-bundle-metadata.schema.json
  • graphify/__main__.py
  • graphify/cache.py
  • graphify/ci_select.py
  • graphify/cli.py
  • graphify/detect.py
  • graphify/export.py
  • graphify/extract.py
  • graphify/extractors/github_actions.py
  • pyproject.toml
  • tests/test_cache.py
  • tests/test_ci_select.py
  • tests/test_github_actions.py
  • tests/test_install_references.py
  • tests/test_non_regular_files.py

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.

@eliorerz
eliorerz force-pushed the feat/gh-actions-yaml-extract branch 2 times, most recently from 4b59ebb to 14adeac Compare August 25, 2026 14:51
… CI test selection

Add a new subcommand that uses the knowledge graph to determine which tests
need to run based on changed files. Supports cross-repository test selection
when changes in one repo affect dependencies in another repo.
Add a JSON Schema for the metadata.json file that accompanies published
graph bundles. This schema serves as the single source of truth for both
the CI job that generates the bundle and the fetch script that consumes it,
preventing drift between writer and reader implementations.

The schema defines fields for version tracking (source_sha, graphify_version),
staleness detection (generated_at), and bundle file paths (graph.json,
GRAPH_REPORT.md, manifest.json).
- Add looks_like_workflow_shape() content check to prevent non-workflow files
  at workflow paths from being misclassified
- Fix UnicodeDecodeError handling in cache corruption detection
- Harden install_references write probe for root/elevated contexts
- Gate test platform capabilities (mkfifo, AF_UNIX, symlinks) on actual availability
- Fix whitespace and comment clarity throughout

These are real bug fixes caught in code review, not just style improvements.
… bugs

- Move workflow-shape gate to top of _get_extractor() before manifest checks
- Fix comment-before-value parsing in block sequence items (prevents comments
  from being read as dependency names)
- Consolidate .yaml/.yml dispatch logic
@eliorerz
eliorerz force-pushed the feat/gh-actions-yaml-extract branch from 14adeac to e398e7b Compare August 25, 2026 14:56
1. Check diff command exit status and report failures (was silently using empty output)
2. Kill timed-out diff subprocess to prevent orphaned processes
3. Fix repo-relative path detection - paths like 'internal/servers/file.go' were
   incorrectly split as repo='internal', file='servers/file.go'. Now only treats
   single-component prefixes (no slashes) as repo names.
4. Add inline security note that --diff-cmd executes through shell

Addresses findings from PR Graphify-Labs#3087 review:
- 'ci-select ignores failed diff command exit status'
- 'Timed-out diff command can leave child processes running'
- 'Repo-relative source files with directories are treated as cross-repo'
- 'User-controlled --diff-cmd is executed through the shell' (documented, by design)
@eliorerz
eliorerz merged commit 4d3da20 into v8 Aug 25, 2026
5 checks passed
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.

1 participant