Skip to content

fix: resolve --skip-to from workflow DAG instead of hardcoded job list#25

Open
tylerpayne wants to merge 1 commit into
mainfrom
worktree-fix-skip-to-custom-jobs
Open

fix: resolve --skip-to from workflow DAG instead of hardcoded job list#25
tylerpayne wants to merge 1 commit into
mainfrom
worktree-fix-skip-to-custom-jobs

Conversation

@tylerpayne

Copy link
Copy Markdown
Owner

Summary

  • --skip-to used a hardcoded _JOB_ORDER list that only knew the five standard jobs (validate, build, release, publish, bump). Workflows with custom jobs between them were not handled correctly.
  • Now reads the actual release.yml, builds the needs: DAG, and computes ancestors of the target job via BFS. Falls back to the default linear order when no workflow file exists.
  • Custom CI-only job names are merged into plan.skip after plan construction so the workflow if: !contains(...) condition gates them properly.
  • Parallel branches in the DAG are correctly excluded from the skip set (only true ancestors of the target are skipped).

Test plan

  • All 541 existing tests pass
  • New unit tests for compute_ancestors (linear chain, custom job, root node, missing target, diamond, parallel branch)
  • New integration tests for --skip-to with custom workflow jobs, targeting custom jobs, and unknown jobs with workflow file present

🤖 Generated with Claude Code

--skip-to used a hardcoded _JOB_ORDER list that only knew the five
standard jobs. Workflows with custom jobs between them (e.g. a checks
job before build) were not handled correctly.

Now reads the actual release.yml, builds the needs DAG, and computes
ancestors of the target job via BFS. Falls back to the default order
when no workflow file exists. Custom CI-only job names are merged into
plan.skip so the workflow if-condition gates them properly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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