Skip to content

Stamp the action version on service calls and the /review URL#142

Merged
reuvenharrison merged 1 commit into
mainfrom
feature/log-action-version
Jun 5, 2026
Merged

Stamp the action version on service calls and the /review URL#142
reuvenharrison merged 1 commit into
mainfrom
feature/log-action-version

Conversation

@reuvenharrison

Copy link
Copy Markdown
Contributor

Why

When a run misbehaves (e.g. a /review URL carrying a mutable base_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

  • Service-calling actions (pr-comment, verify) now send User-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 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. The /review page ignores the extra query param.

<ref> is GITHUB_ACTION_REF (the tag, branch, or SHA the user pinned), falling back to unknown. A missing action_version on a /review hit is itself signal: the run is older than this change.

No behavior change for users; logging only.

🤖 Generated with Claude Code

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>
@reuvenharrison reuvenharrison merged commit 3c7e613 into main Jun 5, 2026
68 checks passed
@reuvenharrison reuvenharrison deleted the feature/log-action-version branch June 5, 2026 19:35
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