Repository navigation
fix: retain response errors in poller flag events - #445
Merged
Merged
Conversation
Contributor
posthog-go Compliance ReportDate: 2026-11-12 10:33:56 UTC ✅ All Tests Passed!111/111 tests passed Capture_V1 Tests✅ 94/94 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
|
marandaneto
marked this pull request as ready for review
November 12, 2026 12:13
PR overviewNo security issues were found in this pull request. Reviews
|
dustinbyrne
approved these changes
Nov 12, 2026
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.
💡 Motivation and Context
When a direct flag read falls back through the local poller, the emitted event loses
errors_while_computing_flagseven though the remote response reports it. A failed flag still reportsevaluation_failed, so the event hides the separate response-wide failure.This implements the affected telemetry requirement from PostHog/sdk-specs#211. The poller now carries the response-wide error bit into the existing event diagnostics. Failed reads keep their nil result, error, and nil event-response sentinel. Healthy false results, local successes, event controls, dedupe, and value/payload handling are unchanged. No public API is added.
Includes an existing Changesets patch intent for
posthog-go.💚 How did you test it?
go test -race -count=1 -timeout=5m ./...: passed across all root-module packages.go vet ./...,make api-diff, scopedgofmt -l, andgit diff --check: passed.Validation used Go 1.26.4 on macOS arm64. Separate nested modules and the full supported toolchain/platform matrix were not run. An earlier independent review saw one timeout waiting for an event in an unchanged healthy no-poller test. Three isolated repetitions, its full-suite retry, and this publication run passed. This is not a claim of full shared-harness conformance.
📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset fileThe patch changeset is already included. The generator was not rerun during publication.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Pi agents used local shell, Git, Go tooling, and GitHub CLI to implement, validate, independently review, and publish this scoped fix. The committed branch also passed the autoreview helper using its configured Claude Code model. No externally accessible agent session link is available.
The fix propagates one internal diagnostic field through the existing evaluation path rather than changing value semantics or adding an API. Human review is required before merge.