Skip to content

ci(release): explain stale release runs when main has moved - #339

Merged
marandaneto merged 1 commit into
mainfrom
ci/release-stale-main-message
Dec 1, 2026
Merged

marandaneto merged 1 commit into
mainfrom
ci/release-stale-main-message

Conversation

@marandaneto

Copy link
Copy Markdown
Member

💡 Motivation and Context

A Release run is prepared from one main commit and then waits for environment approval. If another release finishes first and moves main, approving the older run fails at the first check in the publish step. The check was a bare test under set -e, so the job failed with only Process completed with exit code 1 and no message. One example is run 46621976172. Its changes had already shipped in a newer release, but the log didn't say so.

This PR replaces that test in the three places it's used (both publish jobs and the resume publish job). When main has moved, the step now prints a GitHub error annotation with the current main SHA and the SHA the run was prepared from, and tells the reader to use the latest release run instead of re-running this one. The check still blocks the release in the same cases as before. If the gh api call fails, the step still fails because of set -e.

💚 How did you test it?

  • actionlint .github/workflows/release.yml passes.
  • Ran the new shell snippet locally with matching and different SHAs. It passed when they matched, and printed the error and exited with 1 when they differed.

📝 Checklist

  • All commits are signed (see Commit signing)
  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

  • Pi (Claude) looked into the failed Release run and found the cause. Run 46654061117, started later for feat(flags): support device id bucketing in local evaluation #337, was approved first and published 4.29.0 and Laravel 0.7.0. That moved main, so this run's main SHA check failed.
  • Only the error message changed. The release rules themselves are the same.

@marandaneto marandaneto self-assigned this Dec 1, 2026
@marandaneto
marandaneto marked this pull request as ready for review December 1, 2026 15:27
@marandaneto
marandaneto requested a review from a team as a code owner December 1, 2026 15:27
@marandaneto
marandaneto enabled auto-merge (squash) December 1, 2026 15:27
@veria-ai

veria-ai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

PR overview

No security issues were found in this pull request.

Reviews

@stamphog stamphog Bot 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.

Not approved — this change needs a human reviewer.

Asking again through the PostHog MCP or with @posthog stamp gives the same result unless the changed files change.

stamphog can't approve this pull request automatically. The deny-list gate matched .github/workflows/release.yml as infra_cicd (CI/CD and release infrastructure), and the tier gate then placed the PR in the never-auto-approve tier (T2-never). The size gate passed, so the refusal comes from the file path, not from how large the change is.

A human reviewer will need to look at this PR. Ask a maintainer who owns the release workflow to review it, since changes to that file always need a person's sign-off.

Gate mechanics and policy version
Gate Result
prerequisites ✓ all clear
deny-list ✗ matches: infra_cicd in .github/workflows/release.yml
every_file_attested ✓ not a bot PR
size ✓ 18L, 1F substantive — within ceiling
tier ✗ T2-never because the deny-list matched infra_cicd
stamphog 2.9.1 .stamphog/policy.yml @ unknown · reviewed head 034df40

@stamphog stamphog Bot removed the stamphog label Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

posthog-php-lib_curl Compliance Report

Date: 2026-12-01T15:30:04.680700+00:00
Duration: 119481ms

✅ All Tests Passed!

47/47 tests passed


Capture Tests

✅ 30/30 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields ✅ 31ms
Format Validation.Event Has Uuid ✅ 525ms
Format Validation.Event Has Lib Properties ✅ 527ms
Format Validation.Distinct Id Is String ✅ 526ms
Format Validation.Token Is Present ✅ 528ms
Format Validation.Custom Properties Preserved ✅ 527ms
Format Validation.Event Has Timestamp ✅ 529ms
Format Validation.Non Utc Event Timestamp Is Converted To Utc ✅ 528ms
Retry Behavior.Retries On 503 ✅ 5836ms
Retry Behavior.Does Not Retry On 400 ✅ 2529ms
Retry Behavior.Does Not Retry On 401 ✅ 2530ms
Retry Behavior.Respects Retry After Header ✅ 8537ms
Retry Behavior.Implements Backoff ✅ 16252ms
Retry Behavior.Retries On 500 ✅ 5635ms
Retry Behavior.Retries On 502 ✅ 5634ms
Retry Behavior.Retries On 504 ✅ 5635ms
Retry Behavior.Max Retries Respected ✅ 17043ms
Deduplication.Generates Unique Uuids ✅ 241ms
Deduplication.Preserves Uuid On Retry ✅ 5636ms
Deduplication.Preserves Uuid And Timestamp On Retry ✅ 10841ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 5638ms
Deduplication.No Duplicate Events In Batch ✅ 532ms
Deduplication.Different Events Have Different Uuids ✅ 529ms
Compression.Sends Gzip When Enabled ✅ 529ms
Batch Format.Uses Proper Batch Structure ✅ 527ms
Batch Format.Flush With No Events Sends Nothing ✅ 521ms
Batch Format.Multiple Events Batched Together ✅ 514ms
Error Handling.Does Not Retry On 403 ✅ 2528ms
Error Handling.Does Not Retry On 413 ✅ 2530ms
Error Handling.Retries On 408 ✅ 5633ms

Feature_Flags Tests

✅ 17/17 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id ✅ 525ms
Request Payload.Flags Request Uses V2 Query Param ✅ 524ms
Request Payload.Flags Request Hits Flags Path Not Decide ✅ 524ms
Request Payload.Flags Request Omits Authorization Header ✅ 524ms
Request Payload.Token In Flags Body Matches Init ✅ 526ms
Request Payload.Groups Round Trip ✅ 524ms
Request Payload.Groups Default To Empty Object ✅ 524ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False ✅ 525ms
Request Payload.Disable Geoip Omitted Defaults To False ✅ 524ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key ✅ 524ms
Request Lifecycle.No Flags Request On Init Alone ✅ 520ms
Request Lifecycle.No Flags Request On Normal Capture ✅ 509ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests ✅ 530ms
Request Lifecycle.Mock Response Value Is Returned To Caller ✅ 526ms
Retry Behavior.Retries Flags On 502 ✅ 628ms
Retry Behavior.Retries Flags On 504 ✅ 627ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event ✅ 527ms

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

posthog-php-socket Compliance Report

Date: 2026-12-01T15:30:16.420533+00:00
Duration: 118189ms

✅ All Tests Passed!

47/47 tests passed


Capture Tests

✅ 30/30 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields ✅ 23ms
Format Validation.Event Has Uuid ✅ 518ms
Format Validation.Event Has Lib Properties ✅ 518ms
Format Validation.Distinct Id Is String ✅ 519ms
Format Validation.Token Is Present ✅ 519ms
Format Validation.Custom Properties Preserved ✅ 520ms
Format Validation.Event Has Timestamp ✅ 520ms
Format Validation.Non Utc Event Timestamp Is Converted To Utc ✅ 519ms
Retry Behavior.Retries On 503 ✅ 5827ms
Retry Behavior.Does Not Retry On 400 ✅ 2524ms
Retry Behavior.Does Not Retry On 401 ✅ 2520ms
Retry Behavior.Respects Retry After Header ✅ 8529ms
Retry Behavior.Implements Backoff ✅ 16241ms
Retry Behavior.Retries On 500 ✅ 5626ms
Retry Behavior.Retries On 502 ✅ 5626ms
Retry Behavior.Retries On 504 ✅ 5626ms
Retry Behavior.Max Retries Respected ✅ 16243ms
Deduplication.Generates Unique Uuids ✅ 523ms
Deduplication.Preserves Uuid On Retry ✅ 5629ms
Deduplication.Preserves Uuid And Timestamp On Retry ✅ 10833ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 5625ms
Deduplication.No Duplicate Events In Batch ✅ 525ms
Deduplication.Different Events Have Different Uuids ✅ 519ms
Compression.Sends Gzip When Enabled ✅ 519ms
Batch Format.Uses Proper Batch Structure ✅ 519ms
Batch Format.Flush With No Events Sends Nothing ✅ 516ms
Batch Format.Multiple Events Batched Together ✅ 509ms
Error Handling.Does Not Retry On 403 ✅ 2521ms
Error Handling.Does Not Retry On 413 ✅ 2521ms
Error Handling.Retries On 408 ✅ 5627ms

Feature_Flags Tests

✅ 17/17 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id ✅ 518ms
Request Payload.Flags Request Uses V2 Query Param ✅ 518ms
Request Payload.Flags Request Hits Flags Path Not Decide ✅ 518ms
Request Payload.Flags Request Omits Authorization Header ✅ 517ms
Request Payload.Token In Flags Body Matches Init ✅ 517ms
Request Payload.Groups Round Trip ✅ 518ms
Request Payload.Groups Default To Empty Object ✅ 518ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False ✅ 519ms
Request Payload.Disable Geoip Omitted Defaults To False ✅ 517ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key ✅ 518ms
Request Lifecycle.No Flags Request On Init Alone ✅ 514ms
Request Lifecycle.No Flags Request On Normal Capture ✅ 507ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests ✅ 520ms
Request Lifecycle.Mock Response Value Is Returned To Caller ✅ 520ms
Retry Behavior.Retries Flags On 502 ✅ 619ms
Retry Behavior.Retries Flags On 504 ✅ 619ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event ✅ 521ms

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

posthog-php-fork_curl Compliance Report

Date: 2026-12-01T15:30:21.380451+00:00
Duration: 118756ms

✅ All Tests Passed!

47/47 tests passed


Capture Tests

✅ 30/30 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields ✅ 39ms
Format Validation.Event Has Uuid ✅ 531ms
Format Validation.Event Has Lib Properties ✅ 533ms
Format Validation.Distinct Id Is String ✅ 533ms
Format Validation.Token Is Present ✅ 533ms
Format Validation.Custom Properties Preserved ✅ 533ms
Format Validation.Event Has Timestamp ✅ 534ms
Format Validation.Non Utc Event Timestamp Is Converted To Utc ✅ 533ms
Retry Behavior.Retries On 503 ✅ 5858ms
Retry Behavior.Does Not Retry On 400 ✅ 2537ms
Retry Behavior.Does Not Retry On 401 ✅ 2536ms
Retry Behavior.Respects Retry After Header ✅ 8552ms
Retry Behavior.Implements Backoff ✅ 16277ms
Retry Behavior.Retries On 500 ✅ 5654ms
Retry Behavior.Retries On 502 ✅ 5653ms
Retry Behavior.Retries On 504 ✅ 5651ms
Retry Behavior.Max Retries Respected ✅ 16265ms
Deduplication.Generates Unique Uuids ✅ 52ms
Deduplication.Preserves Uuid On Retry ✅ 5649ms
Deduplication.Preserves Uuid And Timestamp On Retry ✅ 10865ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 5651ms
Deduplication.No Duplicate Events In Batch ✅ 543ms
Deduplication.Different Events Have Different Uuids ✅ 535ms
Compression.Sends Gzip When Enabled ✅ 535ms
Batch Format.Uses Proper Batch Structure ✅ 533ms
Batch Format.Flush With No Events Sends Nothing ✅ 521ms
Batch Format.Multiple Events Batched Together ✅ 520ms
Error Handling.Does Not Retry On 403 ✅ 2539ms
Error Handling.Does Not Retry On 413 ✅ 2533ms
Error Handling.Retries On 408 ✅ 5646ms

Feature_Flags Tests

✅ 17/17 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id ✅ 527ms
Request Payload.Flags Request Uses V2 Query Param ✅ 524ms
Request Payload.Flags Request Hits Flags Path Not Decide ✅ 525ms
Request Payload.Flags Request Omits Authorization Header ✅ 524ms
Request Payload.Token In Flags Body Matches Init ✅ 526ms
Request Payload.Groups Round Trip ✅ 523ms
Request Payload.Groups Default To Empty Object ✅ 527ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False ✅ 524ms
Request Payload.Disable Geoip Omitted Defaults To False ✅ 524ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key ✅ 524ms
Request Lifecycle.No Flags Request On Init Alone ✅ 530ms
Request Lifecycle.No Flags Request On Normal Capture ✅ 521ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests ✅ 532ms
Request Lifecycle.Mock Response Value Is Returned To Caller ✅ 525ms
Retry Behavior.Retries Flags On 502 ✅ 628ms
Retry Behavior.Retries Flags On 504 ✅ 625ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event ✅ 535ms

@marandaneto
marandaneto merged commit 5547228 into main Dec 1, 2026
37 checks passed
@marandaneto
marandaneto deleted the ci/release-stale-main-message branch December 1, 2026 15:31
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