Skip to content

docs: agree on public API changes before implementing them - #577

Open
turnipdabeets wants to merge 2 commits into
mainfrom
docs/public-api-changes
Open

docs: agree on public API changes before implementing them#577
turnipdabeets wants to merge 2 commits into
mainfrom
docs/public-api-changes

Conversation

@turnipdabeets

@turnipdabeets turnipdabeets commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

💡 Motivation and Context

Port of PostHog/posthog-js#4906 to posthog-flutter.

On contributor PRs we sometimes only settle the public API after several rounds of implementation review. By then the contributor, or their agent, has built each suggestion along the way, and a late change of direction wastes their work. This asks contributors to agree on the API shape on the issue first, and tells their agents to stop and ask.

  • CONTRIBUTING.md: new "Public API changes" section, same as posthog-js. The last paragraph points at make updateApiDart / make checkApiDart and the api/posthog_flutter.api.json snapshot.
  • AGENTS.md: new file, since this repo didn't have one. Modeled on the posthog-js one: it points agents to CONTRIBUTING.md, RELEASING.md, and the new section, and asks to keep shared guidance out of AGENTS.md.

💚 How did you test it?

Docs only. Checked that the commands and file paths it mentions exist in this repo.

📝 Checklist

  • 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.

If releasing new changes

  • Ran pnpm changeset to generate a changeset file

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

  • Written with Claude Code, porting the posthog-js section and adapting the API-snapshot paragraph and beforeSend example to this SDK.

🤖 Generated with Claude Code

https://claude.ai/code/session_016syAmdpp8imNvs7PWkpwvb

@turnipdabeets turnipdabeets self-assigned this Sep 11, 2026
@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

posthog-flutter Compliance Report

Date: 2026-09-11 14:21:52 UTC
Duration: 96877ms

✅ All Tests Passed!

45/45 tests passed


Capture Tests

29/29 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields 144ms
Format Validation.Event Has Uuid 119ms
Format Validation.Event Has Lib Properties 118ms
Format Validation.Distinct Id Is String 116ms
Format Validation.Token Is Present 117ms
Format Validation.Custom Properties Preserved 117ms
Format Validation.Event Has Timestamp 118ms
Retry Behavior.Retries On 503 5334ms
Retry Behavior.Does Not Retry On 400 2117ms
Retry Behavior.Does Not Retry On 401 2121ms
Retry Behavior.Respects Retry After Header 8128ms
Retry Behavior.Implements Backoff 15440ms
Retry Behavior.Retries On 500 5228ms
Retry Behavior.Retries On 502 5226ms
Retry Behavior.Retries On 504 5227ms
Retry Behavior.Max Retries Respected 15445ms
Deduplication.Generates Unique Uuids 125ms
Deduplication.Preserves Uuid On Retry 5225ms
Deduplication.Preserves Uuid And Timestamp On Retry 10335ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 5233ms
Deduplication.No Duplicate Events In Batch 124ms
Deduplication.Different Events Have Different Uuids 117ms
Compression.Sends Gzip When Enabled 117ms
Batch Format.Uses Proper Batch Structure 114ms
Batch Format.Flush With No Events Sends Nothing 110ms
Batch Format.Multiple Events Batched Together 126ms
Error Handling.Does Not Retry On 403 2117ms
Error Handling.Does Not Retry On 413 2119ms
Error Handling.Retries On 408 5224ms

Feature_Flags Tests

16/16 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id 14ms
Request Payload.Flags Request Uses V2 Query Param 10ms
Request Payload.Flags Request Hits Flags Path Not Decide 10ms
Request Payload.Flags Request Omits Authorization Header 11ms
Request Payload.Token In Flags Body Matches Init 9ms
Request Payload.Groups Round Trip 11ms
Request Payload.Groups Default To Empty Object 9ms
Request Payload.Person Properties Distinct Id Auto Populated When Caller Omits It 10ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False 10ms
Request Payload.Disable Geoip Omitted Defaults To False 10ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key 10ms
Request Lifecycle.No Flags Request On Init Alone 5ms
Request Lifecycle.No Flags Request On Normal Capture 114ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests 16ms
Request Lifecycle.Mock Response Value Is Returned To Caller 10ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event 116ms

@turnipdabeets
turnipdabeets marked this pull request as ready for review September 11, 2026 14:16
@turnipdabeets
turnipdabeets requested a review from a team as a code owner September 11, 2026 14:16
@greptile-apps

greptile-apps Bot commented Sep 11, 2026

Copy link
Copy Markdown

Reviews (1): Last reviewed commit: "docs: agree on public API changes before..." | Re-trigger Greptile

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