Repository navigation
fix(flags): load shared definitions without a secret key - #366
Conversation
posthog-go Compliance ReportDate: 2026-10-10 04:17:29 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
|
There was a problem hiding this comment.
Not approved — this change needs a human reviewer.
Re-adding the stamphog label gives the same result unless the changed files change.
stamphog can't auto-review this pull request because two gates refused it. The deny-list gate flagged it for matching crypto_secrets, which fits a change to how config.go, featureflags.go, and posthog.go handle the secret key and credential requirements. The tier gate classified it as T2-never (233 lines, 5 files, single-area fix), which is a category that is never auto-reviewed. The size gate passed, so splitting the PR wouldn't resolve either refusal.
The author should ask a human reviewer to take this one. The PR description already notes that human review is required.
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✗ | matches: crypto_secrets |
| size | ✓ | 39L, 3F substantive, 233L/5F incl. docs/generated/snapshots — within ceiling |
| tier | ✗ | classified as T2-never: T2-never (233L, 5F, single-area, fix) |
| stamphog 2.4.1 | .stamphog/policy.yml @ unknown · reviewed head 6236720 |
💡 Motivation and Context
Like PostHog/posthog-python#1039, a worker consuming shared feature flag definitions should not need a privileged secret key. Existing initialization gates prevent that supported cache-consumer configuration from evaluating flags locally.
Changes
Cache-only readers bypass the shared loader specification's decision-first provider step; credentialed consumers retain that step.
Existing public local-only evaluation and reload paths work through the existing definition poller; no provider-specific evaluator bypass is needed.
💚 How did you test it?
go test -json -race -count=10 -timeout=5m -run 'TestFlagDefinitionCache' ./...: passed.go build ./...,go vet ./...,make api-diffand gofmt checks: passed.Release scope
Patch release for posthog-go. Existing signatures, capture defaults and wire formats are unchanged.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Implemented with Pi worker agents and reviewed by separate fresh-context Pi reviewers. A simplify pass covered the scoped source/tests/docs before final local validation. Human review remains required.