Skip to content

Record dependency-free workflows in the lockfile - #124

Open
umireon wants to merge 5 commits into
github:mainfrom
umireon:umireon/fix-call-only-workflow
Open

Record dependency-free workflows in the lockfile#124
umireon wants to merge 5 commits into
github:mainfrom
umireon:umireon/fix-call-only-workflow

Conversation

@umireon

@umireon umireon commented Sep 9, 2026

Copy link
Copy Markdown

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 build
  • make test (including the race detector)
  • make fmt-check
  • make vet
  • make test-stub (35/35 passed)
  • make test-integration (105/105 passed)
  • Confirmed each of the commits contains one logical change
  • Verified good GPG signatures on all commits
  • Confirmed there are no Signed-off-by or Co-authored-by trailers
  • Confirmed doc comments, test structure, and commit messages follow the
    repository guidelines

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.
@umireon
umireon marked this pull request as ready for review September 9, 2026 19:30
Copilot AI balanced review requested due to automatic review settings September 9, 2026 19:30
@umireon
umireon requested a review from a team as a code owner September 9, 2026 19:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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-onboard support.
  • 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.

Comment thread internal/pin/commit.go Outdated
Comment thread internal/pipeline/diagnose.go
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.
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.

2 participants