Skip to content

feat: improve stable action resolution#4

Merged
qartik merged 4 commits into
mainfrom
codex-robust-resolver-rewrite
May 23, 2026
Merged

feat: improve stable action resolution#4
qartik merged 4 commits into
mainfrom
codex-robust-resolver-rewrite

Conversation

@qartik

@qartik qartik commented May 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • expand action updates from latest stable major only to latest eligible stable version
  • rewrite the resolver around explicit Version, Precision, Candidate, Eligibility, and Decision types
  • preserve moving-ref precision while allowing exact refs to upgrade within the same major
  • add standard Go flag help output for -h / --help and keep invalid flag diagnostics on stderr
  • document moving major, moving minor, exact fallback, cooldown, and representation-only no-op behavior

Behavior

This replaces the edge-case patch stack from #3 with a fresh branch from main. The resolver now treats stable refs as moving major (v6), moving minor (v6.2), or exact (v6.2.1) candidates and applies one ordered policy: prefer moving major, then moving minor, then exact fallback.

Moving refs keep their precision within the same major, so v3 is not rewritten to v3.4 and v3.4 is not rewritten to v3.4.1. Exact refs can upgrade to the latest eligible stable version, including same-major updates such as v3.0 to v3.3, while representation-only changes such as v3.0 to v3.0.0 remain no-ops.

Cooldown verification still uses annotated tag timestamps or lightweight tag commit timestamps. Candidate eligibility is checked lazily in policy order so eligible moving tags avoid unnecessary fallback timestamp lookups.

CLI

Help now uses Go standard flag usage generation for the flag list while preserving the project summary and command synopsis. Help output goes to stdout, and invalid flag errors stay on stderr.

Validation

  • go test ./...
  • git diff --check main...HEAD
  • GOCACHE=/private/tmp/go-cache-actupdate go run ./cmd/actupdate --help --repo .

@qartik qartik marked this pull request as ready for review May 23, 2026 21:51
@qartik qartik force-pushed the codex-robust-resolver-rewrite branch from 4f9cb8b to b958ea5 Compare May 23, 2026 22:07

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.

Pull request overview

This PR refactors GitHub Action version resolution into explicit policy types and updates CLI/help behavior and documentation to match the broader “latest eligible stable version” model.

Changes:

  • Reworked resolver policy around Version, Precision, Candidate, Eligibility, and Decision.
  • Updated workflow planning to resolve each action reference independently.
  • Added generated flag help output and expanded resolver documentation/tests.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Documents eligible stable versions, moving tag precedence, cooldowns, and no-op representation changes.
internal/github/client.go Implements the new resolver policy and eligibility handling.
internal/github/client_test.go Adds resolver regression, model, and property-style tests.
cmd/actupdate/main.go Adds flag-generated help and switches planning to per-reference stable resolution.
cmd/actupdate/main_test.go Adds CLI regression coverage for mixed refs in the same repository.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/github/client.go Outdated
Comment thread cmd/actupdate/main.go Outdated

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.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment thread cmd/actupdate/main.go

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.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@qartik qartik changed the title refactor: rewrite action resolver policy feat: improve stable action resolution May 23, 2026
@qartik qartik merged commit 9b9b3bd into main May 23, 2026
5 checks passed
@qartik qartik deleted the codex-robust-resolver-rewrite branch May 23, 2026 23:46
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