Stamp the action version on service calls and the /review URL#142
Merged
Conversation
Make it possible to tell which oasdiff-action version a run used from the server logs, so we can correlate stuck/odd behavior (e.g. a mutable base_sha=main in a /review URL) with an outdated pinned version. - Service-calling actions (pr-comment, verify) now send User-Agent: oasdiff-action/<ref>. Cloud Run already records the User-Agent, so this surfaces the version with no service change (the log line that read "curl 8.x" now reads "oasdiff-action/v0.0.54"). - Free actions (breaking, changelog) and pr-comment append action_version=<ref> to the emitted /review URL, so w3's request log carries the version for the free cohort that never calls the service. <ref> is GITHUB_ACTION_REF (the tag/branch/SHA the user pinned), falling back to "unknown". The /review page ignores the extra query param. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Why
When a run misbehaves (e.g. a
/reviewURL carrying a mutablebase_sha=main, which is the pre-#117 shape), we currently can't tell from the logs which action version produced it. This adds the version to the log signal so stuck or odd behavior can be correlated with an outdated pinned version.What
pr-comment,verify) now sendUser-Agent: oasdiff-action/<ref>on their POST to the service. Cloud Run already records the User-Agent, so this surfaces the version with no service-side change: a log line that readcurl 8.xnow readsoasdiff-action/v0.0.54.breaking,changelog) andpr-commentappendaction_version=<ref>to the emitted/reviewURL, so w3's request log carries the version for the free cohort that never calls the service. The/reviewpage ignores the extra query param.<ref>isGITHUB_ACTION_REF(the tag, branch, or SHA the user pinned), falling back tounknown. A missingaction_versionon a/reviewhit is itself signal: the run is older than this change.No behavior change for users; logging only.
🤖 Generated with Claude Code