Record dependency-free workflows in the lockfile - #124
Open
umireon wants to merge 5 commits into
Open
Conversation
Dependency resolution failures and workflows without dependencies can both produce empty dependency slices. Preserve resolver failure state through planning and pass the existing no-onboard policy to Commit so it can distinguish these cases before writing new lockfile entries. This allows dependency-free workflows to receive empty lockfile entries without adding entries for unresolved or skipped workflows.
Remove a duplicate lockfile import and update the stale newSlowPathFixtures call to match its current signature.
Verify that ResolveAllRecursive errors remain available in workflow plans and that successful partial results are committed. Cover recording a dependency-free workflow while skipping unresolved workflows and new workflow entries disabled by the caller.
There was a problem hiding this comment.
🟡 Changes recommended
The no-onboard guard can skip the lockfile entry only after workflow rewrites have already been applied, and critical blocking-error behavior lacks regression coverage.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Records dependency-free workflows while distinguishing valid empty dependency sets from resolution failures.
Changes:
- Propagates blocking and planning resolution failures.
- Adds conditional empty lockfile entries with
--no-onboardsupport. - Expands planning and commit tests.
File summaries
| File | Description |
|---|---|
internal/pipeline/diagnose.go |
Marks blocking resolver failures. |
internal/pipeline/checks/finding.go |
Adds resolver-error state to reports. |
internal/pin/record.go |
Preserves resolution errors in workflow plans. |
internal/pin/plan.go |
Plans valid empty workflows and retains failures. |
internal/pin/plan_test.go |
Updates fixtures and resolution assertions. |
internal/pin/commit.go |
Conditionally writes empty workflow entries. |
internal/pin/commit_test.go |
Tests empty and partial-resolution commits. |
cmd/gh-actions-lock/run.go |
Passes onboarding policy into commit. |
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Filter workflows with no existing lockfile entry before the Commit phase rewrites workflow or self-action files when new entries are disabled. Add a regression test that verifies both source files and the lockfile remain unchanged.
Verify that planning excludes workflow reports marked with a blocking resolver error.
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.
What
GitHub Actions policy requires dependency-free workflows to be listed in the
lockfile, so generate lockfile entries even when their dependency list is empty.
How
Preserve dependency resolution failures through planning and pass the existing
new-workflow policy to the Commit phase, allowing it to distinguish failed
resolution from a valid empty dependency list while retaining partial results.
Fix the existing plan test compilation errors by removing a duplicate import and
updating a stale test-helper call.
Add tests covering dependency-free workflows, resolution failures, partial
resolution, and skipping new workflow entries.
Together, these changes ensure dependency-free workflows are recorded correctly
in the lockfile.
Testing
make buildmake test(including the race detector)make fmt-checkmake vetmake test-stub(35/35 passed)make test-integration(105/105 passed)Signed-off-byorCo-authored-bytrailersrepository guidelines