Skip to content

docs: exempt maintainers from the public API issue-first rule - #210

Merged
turnipdabeets merged 1 commit into
mainfrom
docs/public-api-maintainer-exemption
Sep 21, 2026
Merged

turnipdabeets merged 1 commit into
mainfrom
docs/public-api-maintainer-exemption

Conversation

@turnipdabeets

Copy link
Copy Markdown
Contributor

Problem

Port of PostHog/posthog-js#5044.

The "Public API changes" section in CONTRIBUTING.md and the matching line in AGENTS.md say the API shape must be agreed on an issue first. Nothing in either file exempts maintainers. So when a Client Libraries maintainer's agent changes public API in their own PR, it doesn't find an agreed issue and opens one. We end up closing duplicate issues and paying for the turns and tokens. For the team, the PR is where we discuss API shape.

Changes

  • CONTRIBUTING.md: says the issue-first rule is for external contributors, and adds a path for contributors who already have a PR open. They call out the public API change at the top of the PR description and link or open an issue to discuss it, instead of stopping.
  • AGENTS.md: agents skip the issue when the author is a PostHog maintainer (git email ends in @posthog.com). For contributors, agents stop and ask, or draft an issue body for the user to post. Agents never open an issue on their own.
  • Removed the separate "AI agents: stop and ask" bullet from CONTRIBUTING.md, because AGENTS.md now covers it.

Testing

Docs only. Same wording as posthog-js#5044, which was reviewed and approved.

🤖 Generated with Claude Code

@turnipdabeets
turnipdabeets requested a review from a team as a code owner September 21, 2026 14:35
@turnipdabeets turnipdabeets self-assigned this Sep 21, 2026
@greptile-apps

greptile-apps Bot commented Sep 21, 2026

Copy link
Copy Markdown

Retrigger

The PR should not merge until the agent guidance uses a reliable Client Libraries maintainer check consistent with CONTRIBUTING.md.

Reviews (1) · Last reviewed commit: "docs: exempt maintainers from the public..."

Comment thread AGENTS.md
- Read and follow [CONTRIBUTING.md](./CONTRIBUTING.md) before contributing to the SDK. It covers local development, integration tests, and pull requests.
- Read and follow [RELEASING.md](./RELEASING.md) when adding changesets (`sampo add`) or working on publishing.
- Before adding or changing public API, follow "Public API changes" in [CONTRIBUTING.md](./CONTRIBUTING.md): the API shape must be agreed on the issue first. For SDK design guidance, read https://posthog.com/handbook/engineering/sdks/guidelines.md.
- Public API changes (a new or changed public option, function, or type): if the author is a PostHog maintainer (git email ends in `@posthog.com`), the PR is the discussion, so don't open or suggest an issue. Otherwise, follow "Public API changes" in [CONTRIBUTING.md](./CONTRIBUTING.md): if there's no agreed issue, stop and tell the user. If a PR already exists, add a public-API note to its description and draft an issue body for the user to post. Never open an issue yourself. For SDK design guidance, read https://posthog.com/handbook/engineering/sdks/guidelines.md.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Unreliable maintainer check

The email suffix is neither reliable nor narrow enough to identify Client Libraries maintainers. Current maintainers have committed with @users.noreply.github.com addresses, so agents will still request issues from maintainers. Conversely, this exempts any PostHog employee even though CONTRIBUTING.md limits the exemption to Client Libraries maintainers. Determine membership from the PR author's GitHub identity or the Client Libraries team, and use the same criterion in both documents.

Prompt To Fix With AI
This is a comment left during a code review.
Path: AGENTS.md
Line: 5

Comment:
**Unreliable maintainer check**

The email suffix is neither reliable nor narrow enough to identify Client Libraries maintainers. Current maintainers have committed with `@users.noreply.github.com` addresses, so agents will still request issues from maintainers. Conversely, this exempts any PostHog employee even though `CONTRIBUTING.md` limits the exemption to Client Libraries maintainers. Determine membership from the PR author's GitHub identity or the Client Libraries team, and use the same criterion in both documents.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

@github-actions

Copy link
Copy Markdown
Contributor

posthog-elixir Compliance Report

Date: 2026-09-21T14:39:02.197193+00:00
Duration: 108518ms

⚠️ Some Tests Failed

40/47 tests passed, 7 failed


Capture Tests

⚠️ 29/30 tests passed, 1 failed

View Details
Test Status Duration
Format Validation.Event Has Required Fields ✅ 610ms
Format Validation.Event Has Uuid ✅ 609ms
Format Validation.Event Has Lib Properties ✅ 610ms
Format Validation.Distinct Id Is String ✅ 609ms
Format Validation.Token Is Present ✅ 610ms
Format Validation.Custom Properties Preserved ✅ 610ms
Format Validation.Event Has Timestamp ✅ 610ms
Format Validation.Non Utc Event Timestamp Is Converted To Utc ❌ 610ms
Retry Behavior.Retries On 503 ✅ 5614ms
Retry Behavior.Does Not Retry On 400 ✅ 2613ms
Retry Behavior.Does Not Retry On 401 ✅ 2613ms
Retry Behavior.Respects Retry After Header ✅ 5615ms
Retry Behavior.Implements Backoff ✅ 15625ms
Retry Behavior.Retries On 500 ✅ 5617ms
Retry Behavior.Retries On 502 ✅ 5615ms
Retry Behavior.Retries On 504 ✅ 5613ms
Retry Behavior.Max Retries Respected ✅ 15618ms
Deduplication.Generates Unique Uuids ✅ 620ms
Deduplication.Preserves Uuid On Retry ✅ 5616ms
Deduplication.Preserves Uuid And Timestamp On Retry ✅ 10621ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 5619ms
Deduplication.No Duplicate Events In Batch ✅ 616ms
Deduplication.Different Events Have Different Uuids ✅ 611ms
Compression.Sends Gzip When Enabled ✅ 610ms
Batch Format.Uses Proper Batch Structure ✅ 611ms
Batch Format.Flush With No Events Sends Nothing ✅ 608ms
Batch Format.Multiple Events Batched Together ✅ 614ms
Error Handling.Does Not Retry On 403 ✅ 2611ms
Error Handling.Does Not Retry On 413 ✅ 2613ms
Error Handling.Retries On 408 ✅ 5617ms

Failures

format_validation.non_utc_event_timestamp_is_converted_to_utc

Event 0 field 'timestamp' instant '2026-09-21T14:37:18.137801Z' != expected '2025-01-02T03:04:05Z'

Feature_Flags Tests

⚠️ 11/17 tests passed, 6 failed

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

Failures

request_payload.groups_default_to_empty_object

Field 'groups' not found in /flags request body at path 'groups'. Available keys: ['distinct_id', 'api_key', 'flag_keys_to_evaluate']

request_payload.disable_geoip_omitted_defaults_to_false

Field 'geoip_disable' not found in /flags request body at path 'geoip_disable'. Available keys: ['distinct_id', 'api_key', 'flag_keys_to_evaluate']

request_lifecycle.mock_response_value_is_returned_to_caller

Last action result missing field 'value'. Keys: ['error', 'success']

retry_behavior.retries_flags_on_502

Last action result missing field 'value'. Keys: ['error', 'success']

retry_behavior.retries_flags_on_504

Last action result missing field 'value'. Keys: ['error', 'success']

side_effect_events.get_feature_flag_captures_feature_flag_called_event

Expected 1 events with name '$feature_flag_called', got 0

@turnipdabeets
turnipdabeets enabled auto-merge (squash) September 21, 2026 14:39

@dustinbyrne dustinbyrne left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The maintainer exemption looks good. One non-blocking clarification about identifying maintainers.

AI-assisted review: source inspection and existing CI; no new tests executed.

Comment thread AGENTS.md
- Read and follow [CONTRIBUTING.md](./CONTRIBUTING.md) before contributing to the SDK. It covers local development, integration tests, and pull requests.
- Read and follow [RELEASING.md](./RELEASING.md) when adding changesets (`sampo add`) or working on publishing.
- Before adding or changing public API, follow "Public API changes" in [CONTRIBUTING.md](./CONTRIBUTING.md): the API shape must be agreed on the issue first. For SDK design guidance, read https://posthog.com/handbook/engineering/sdks/guidelines.md.
- Public API changes (a new or changed public option, function, or type): if the author is a PostHog maintainer (git email ends in `@posthog.com`), the PR is the discussion, so don't open or suggest an issue. Otherwise, follow "Public API changes" in [CONTRIBUTING.md](./CONTRIBUTING.md): if there's no agreed issue, stop and tell the user. If a PR already exists, add a public-API note to its description and draft an issue body for the user to post. Never open an issue yourself. For SDK design guidance, read https://posthog.com/handbook/engineering/sdks/guidelines.md.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor (non-blocking): Could we treat @posthog.com as one signal of maintainer status rather than the exclusive test? A confirmed Client Libraries maintainer can use a GitHub noreply address, which sends them through the external-contributor issue-first flow despite the exemption in CONTRIBUTING.md. Consider accepting independently confirmed maintainer identity too.

@turnipdabeets
turnipdabeets merged commit 4df6b66 into main Sep 21, 2026
31 checks passed
@turnipdabeets
turnipdabeets deleted the docs/public-api-maintainer-exemption branch September 21, 2026 21:04
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