instance_id
stringlengths
10
65
repo
stringlengths
5
59
pr_number
int64
1
313k
task_type
stringclasses
1 value
base_commit
stringlengths
40
40
review_commit
stringlengths
40
40
title
stringlengths
2
282
body
stringlengths
7
3k
patch
stringlengths
202
204k
n_defects
int64
1
72
n_supported
int64
1
65
n_major
int64
0
32
defects
stringlengths
140
18.8k
certifier_count
int64
Portkey-AI__gateway__1332
Portkey-AI/gateway
1,332
defect
4837c8f0a4caf16f04b15843869e00efcdc2d0e7
1348a1db99f9f8645bfdf7c8047f459d2837ae1e
feat: add javelin guardrails
Here's a complete PR description for your Javelin guardrails integration: ## Description This PR adds Javelin AI Security guardrails integration to the Portkey AI Gateway. The integration includes three guardrail types: Trust & Safety, Prompt Injection Detection, and Language Detection. Users can now configure Jave...
diff --git a/plugins/index.ts b/plugins/index.ts index 9501b444d..6b5d7debf 100644 --- a/plugins/index.ts +++ b/plugins/index.ts @@ -52,6 +52,9 @@ import { handler as defaultjwt } from './default/jwt'; import { handler as defaultrequiredMetadataKeys } from './default/requiredMetadataKeys'; import { handler as walleda...
1
1
0
[{"id": "G0", "claim": "Deleting the stack property from caught error objects may cause serialization issues and destroys stack traces; the three plugins' catch blocks should not mutate the error and should just assign `error = e`.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introdu...
null
Portkey-AI__gateway__1398
Portkey-AI/gateway
1,398
defect
128280cdfc0a97eef46810e7ab4f875d99d2bdbc
3a46e44a478dc51326f9346154378ab1f81e75ab
feat: add support for linked Security Profile API keys, additional tests
## Description This PR enhances the PANW Prisma AIRS guardrail plugin with additional error handling, comprehensive test coverage, and support for additional configuration parameters. **Key Changes:** - Implemented test suite with proper HTTP mocking for deterministic, reliable tests - Added support for `profil...
diff --git a/plugins/panw-prisma-airs/intercept.ts b/plugins/panw-prisma-airs/intercept.ts index 34e72a9fd..d7c628a77 100644 --- a/plugins/panw-prisma-airs/intercept.ts +++ b/plugins/panw-prisma-airs/intercept.ts @@ -26,6 +26,16 @@ export const handler: PluginHandler = async ( process.env.AIRS_API_KEY || ''; ...
1
1
1
[{"id": "G0", "claim": "The timeout parameter added to the plugin manifest is unnecessary and should be removed, because the gateway already supplies the timeout via the x-portkey-timeout header in the parameters object.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
Portkey-AI__gateway__1514
Portkey-AI/gateway
1,514
defect
7799507909db680e72b10292bc10e44150c67842
40db02de4ba12636369ebb0518f2535c35c57462
feat(plugins): add Zscaler AI Guard plugin
This commit introduces a new guardrail plugin for Zscaler AI Guard. This plugin allows the Portkey Gateway to perform security checks on prompts and LLM responses using Zscaler's Detections Policy. Key changes include: A new plugin handler in plugins/zscaler/main-function.ts that calls the Zscaler execute-policy ...
diff --git a/conf.json b/conf.json index 940c8bdd6..b97b29fca 100644 --- a/conf.json +++ b/conf.json @@ -10,7 +10,8 @@ "pangea", "promptsecurity", "panw-prisma-airs", - "walledai" + "walledai", + "zscaler" ], "credentials": { "portkey": { diff --git a/plugins/build.ts b/plugins/build....
5
5
3
[{"id": "G0", "claim": "The test file only contains integration tests that require real API credentials; unit tests should be added covering missing credentials, empty content, afterRequestHook behavior, and mocked error-handling paths.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introd...
null
Portkey-AI__gateway__1542
Portkey-AI/gateway
1,542
defect
a6340b0a4d8db6c0ad4196431dc3227604e63822
e240bb860c537f7b40088a2ec13c18e3bce0cce6
feat: propagate strict parameter for Anthropic tool definitions
When using the OpenAI chat completions interface with an underlying Anthropic model, the strict field on tool definitions was being dropped during the OpenAI-to-Anthropic transformation. This adds support for forwarding strict to Anthropic's native tool format, enabling constrained decoding for tool call arguments. ...
diff --git a/src/providers/anthropic/chatComplete.ts b/src/providers/anthropic/chatComplete.ts index 038cccc83..8dc447458 100644 --- a/src/providers/anthropic/chatComplete.ts +++ b/src/providers/anthropic/chatComplete.ts @@ -59,6 +59,11 @@ interface AnthropicTool extends PromptCache { * Example inputs demonstrating...
1
1
1
[{"id": "G0", "claim": "Add or extend a unit/integration test asserting that when an OpenAI-format tool has function.strict set (both true and false), the Anthropic request payload produced by the transform includes strict with the same boolean value, so the new forwarding behavior does not regress silently.", "categor...
null
Portkey-AI__gateway__494
Portkey-AI/gateway
494
defect
35f26ce7b7337655c572bc5a505d419d1a792f94
43b0343f1681adc5ba707e754c751d9e4d2d6c4a
Feat: Provider Tests
**Title:** - Tests for providers to make sure they are OpenAI compliant Initial idea for this sprung from reading the very descriptive GitHub issue raised by @raulraja https://github.com/Portkey-AI/gateway/issues/116 **Motivation:** (optional) - Multiple provider's transformers are not OpenAI spec compliant, t...
diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 000000000..f22307146 --- /dev/null +++ b/jest.config.js @@ -0,0 +1,8 @@ +/** @type {import('ts-jest').JestConfigWithTsJest} **/ +export default { + testEnvironment: 'node', + transform: { + '^.+.tsx?$': ['ts-jest', {}], + }, + testTimeout: 3...
3
1
1
[{"id": "G0", "claim": "The providersConfig map should be given a strict type (a ProviderTestConfig with name, provider/ApiKey, operations of type LlmOperation, and an optional skip flag) instead of Record<keyof typeof Providers, any>.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduc...
null
Portkey-AI__gateway__586
Portkey-AI/gateway
586
defect
69d96825afab21cf5437b93fd1e6fc3d0b79fb08
5e6cf0c39a5801849eb1ef0a3980d21b166449e4
Enhance JSON Schema and JSON Keys plugins with improved error handling and explanations
## Description This PR addresses the issues raised in #[Issue Number] by enhancing our JSON Schema and JSON Keys plugins with improved error handling, more detailed explanations, and better JSON extraction capabilities. ## Changes Made 1. Updated both plugins to handle JSON within code blocks and in plain text. 2...
diff --git a/plugins/default/default.test.ts b/plugins/default/default.test.ts index 4f03b7613..5f527a0cc 100644 --- a/plugins/default/default.test.ts +++ b/plugins/default/default.test.ts @@ -15,7 +15,7 @@ describe('jsonSchema handler', () => { it('should validate JSON in response text', async () => { const co...
1
1
1
[{"id": "G0", "claim": "Remove the `.only` from the `describe('jsonKeys handler', ...)` statement in plugins/default/default.test.ts so the rest of the test suite is not skipped.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
Portkey-AI__gateway__648
Portkey-AI/gateway
648
defect
b56a7bf4bb0bfc5e9bb92314b83ea6073d9b578c
57ede85a1e1d8579096cf04f24ab82da52519038
lowercase-plugin
**Lowercase-plugin** - Added a plugin to check if the given string is lowercase or not. **Related Issues:** - #514
diff --git a/plugins/default/alllowercase.ts b/plugins/default/alllowercase.ts new file mode 100644 index 000000000..b08c0741f --- /dev/null +++ b/plugins/default/alllowercase.ts @@ -0,0 +1,31 @@ +import { + HookEventType, + PluginContext, + PluginHandler, + PluginParameters, +} from '../types'; +import { getText }...
2
2
2
[{"id": "G0", "claim": "The manifest.json entry added by the PR seems to contain conflict artifacts, and the reviewer asks that it be fixed.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new allLowercase tests only cover afterRequestHook, and t...
null
Portkey-AI__gateway__756
Portkey-AI/gateway
756
defect
955473717d8b8dd8b84548c82bb0be5284c8bfdf
e1919bf12c269106859eabeec25b42952d5f8e61
feat: add mistral as a new guardrail provider
**Title:** - Mistral Moderations support for guardrail plugins. **Related Issues:** (optional) - /closes #755
diff --git a/plugins/index.ts b/plugins/index.ts index 03e7c6785..3bccb8fbf 100644 --- a/plugins/index.ts +++ b/plugins/index.ts @@ -32,6 +32,20 @@ import { handler as patronusnoRacialBias } from './patronus/noRacialBias'; import { handler as patronusretrievalAnswerRelevance } from './patronus/retrievalAnswerRelevance...
4
3
2
[{"id": "G0", "claim": "The manifest schema does not mention the `model` parameter although the plugin code references it.", "category": "documentation", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Tests should be added for the mistral plugin like the other plugins have.", "ca...
null
Portkey-AI__gateway__794
Portkey-AI/gateway
794
defect
a66c3a34d57f8724293000a7dc4b4b3399e308ed
b93c553d335b7d47a00b657241d6698dd7f18ab9
[Feature] Pangea Cloud Plugin
**Title: Pangea Cloud Plugin** - Add a new plugin to call Pangea Cloud AI Guard service **Description:** (optional) - This plugin include a `before` and `after` request hooks to call AI Guard service to process LLM inputs and outputs to analyze and redact text to avoid manipulation of the model, addition of malic...
diff --git a/conf.json b/conf.json index f4f0e2ba1..5e76bc118 100644 --- a/conf.json +++ b/conf.json @@ -5,7 +5,8 @@ "aporia", "sydelabs", "pillar", - "patronus" + "patronus", + "pangea" ], "credentials": { "portkey": { diff --git a/plugins/pangea/manifest.json b/plugins/pangea/manife...
4
4
3
[{"id": "G0", "claim": "Rename the manifest credential `token` to `apiKey` to match the naming used by the other plugins so users can switch to the new plugin easily.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The guard only works with compl...
null
Portkey-AI__gateway__879
Portkey-AI/gateway
879
defect
33d11c7f4a137ee694a39006b5ae194f3ca7dc60
618ebeb8f2777068e65d6a29785196b7ed65c224
Feat/bedrock guardrails
**Title:** - Adds bedrock guardrail support **Related Issues:** (optional) - /closes #859
diff --git a/plugins/bedrock/index.test.ts b/plugins/bedrock/index.test.ts new file mode 100644 index 000000000..45fe5fdde --- /dev/null +++ b/plugins/bedrock/index.test.ts @@ -0,0 +1,184 @@ +import { PluginContext, PluginParameters } from '../types'; +import { BedrockParameters, pluginHandler } from './index'; +import...
1
1
0
[{"id": "G0", "claim": "Plugins should be isolated and must not import modules from the gateway code, so generateAWSHeaders should be implemented in the plugin provider util itself.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
Portkey-AI__gateway__966
Portkey-AI/gateway
966
defect
fda78afe583628bf1450ff5b033e1cadf719ceda
44aa70b13116e57f7cd4990988a7b8019ac49c66
acuvity integration: fix guards and return data.
**Title:** - Minor changes on the acuvity integration
diff --git a/plugins/acuvity/manifest.json b/plugins/acuvity/manifest.json index 5469c02ba..aca0791bc 100644 --- a/plugins/acuvity/manifest.json +++ b/plugins/acuvity/manifest.json @@ -178,24 +178,15 @@ "language_values": { "type": "string", "enum": [ - "eng_Latn", - ...
1
1
0
[{"id": "G0", "claim": "Remove transformed and transformedData from the scanResult data because they are already returned at the top level of the handler response and are redundant since they will not be used anywhere.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
PostHog__posthog-go__102
PostHog/posthog-go
102
defect
4b578dd209921141d227e9aa29012e522175361c
8dad297fdb7e8946e95bd15f4f33ac5f24701ad1
fix: the local evaluation was not using rollout percentage
When evaluating the flag locally, it was always rolled out to 100% of calls, this fixes issue: #100 * updates the tests * make code a bit more go * improves the hash calculation Includes changes from: #101
diff --git a/feature_flags_local_test.go b/feature_flags_local_test.go index 717c288e..c28a080a 100644 --- a/feature_flags_local_test.go +++ b/feature_flags_local_test.go @@ -10,9 +10,10 @@ import ( "reflect" "strings" "sync/atomic" + "testing" "time" - "testing" + "github.com/stretchr/testify/require" ) ...
3
3
2
[{"id": "G0", "claim": "The expected hash values in TestCalculateHash differ from the values the Rust implementation computes for the same identifiers, so the two implementations should produce the same numbers.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", ...
null
PostHog__posthog-go__107
PostHog/posthog-go
107
defect
60c2ae5a38fec9c42e5694975655f1ac98064e8d
6c54b3b7b15c7b0bd95699e004e03502533db3c4
fix: race in accessing feature flags
Fixes 2 problems when accessing feature flags: 1. data access race 2. not returning an error if the feature flags were not correctly fetched/initialized
diff --git a/featureflags.go b/featureflags.go index 751c986b..cd9a82a2 100644 --- a/featureflags.go +++ b/featureflags.go @@ -22,22 +22,24 @@ import ( const LONG_SCALE = 0xfffffffffffffff type FeatureFlagsPoller struct { - loaded chan bool - shutdown chan bool - forceReload chan bool - featureFlag...
3
1
0
[{"id": "G0", "claim": "The removed code misread the comma-ok receive as 'closed' when it actually reports whether the channel is open, so `closed` was always false at that place and the \"flags were not successfully fetched yet\" error was never returned.", "category": "correctness", "verdict": "uncertain", "priority"...
null
PostHog__posthog-go__110
PostHog/posthog-go
110
defect
46fb2e5d097b1b8ca8e4ba46c39712e5490e808e
187a15d8284f8b4c269d78ff8f2e7ca777d57c28
fix: Ignore new `flag` filter type in local evaluation
Add support for the new "flag" filter type to prevent serialization errors during local feature flag evaluation. Flag dependencies are not yet implemented in local evaluation, so these conditions are skipped to allow other conditions to be evaluated properly.
diff --git a/feature_flags_local_test.go b/feature_flags_local_test.go index 0296f6b7..8c7dd57f 100644 --- a/feature_flags_local_test.go +++ b/feature_flags_local_test.go @@ -916,6 +916,61 @@ func TestComputeInactiveFlagsLocally(t *testing.T) { } } +func TestFeatureFlagWithDependencies(t *testing.T) { + server := ...
1
1
0
[{"id": "G0", "claim": "When local evaluation encounters a flag-dependency condition and skips it, it may make sense to print a warning so the skip is not silent.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
PostHog__posthog-go__115
PostHog/posthog-go
115
defect
cadda594419d02f3cebbdca0af8a942ae35be30a
e29e3571e2466e8090b10c685c1eecf40bb5ac3f
feat(flags): make the `SendFeatureFlags` parameter more declarative and ergonomic
### Problem The current `SendFeatureFlags` boolean parameter provides limited control over feature flag evaluation behavior. Users couldn't specify evaluation preferences or custom properties per capture event. ### Solution Modified `SendFeatureFlags` to accept either: - `bool` (existing behavior, fully backw...
diff --git a/capture.go b/capture.go index bc46658d..7f2fd80b 100644 --- a/capture.go +++ b/capture.go @@ -2,6 +2,38 @@ package posthog import "time" +// SendFeatureFlagsOptions allows for more granular control over feature flag evaluation +type SendFeatureFlagsOptions struct { + // OnlyEvaluateLocally forces eval...
6
2
1
[{"id": "G0", "claim": "Copying SendFeatureFlags straight into the API struct without handling could cause serialization issues, and the API should receive a boolean (suggested: SendFeatureFlags: msg.shouldSendFeatureFlags()).", "category": "correctness", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, ...
null
PostHog__posthog-go__118
PostHog/posthog-go
118
defect
a2a73424dc3368b0e2feda9793953599f1f26bd0
9c670f63286ffe4e574dd2b0529f066e9ef90315
fix(flags): Pass project API key in remote_config requests
Fixes the remote_config endpoint to include the project API key as a token parameter for deterministic project routing, matching the implementation in other server-side SDKs. - Add token parameter to remote_config URL construction - Add test to verify the token parameter is included in requests See https://githu...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a18787c..0a189e47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.6.2 + +* Fix: Pass project API key in remote_config requests +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v1.6.1...v1.6.2) + ## 1.6.1 * [Full Changelog](https://g...
2
1
0
[{"id": "G0", "claim": "The mock response written in posthog_test.go contains excessive escaping, making it hard to read and maintain; a raw string literal should be used instead.", "category": "maintainability", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The token should be ...
null
PostHog__posthog-go__131
PostHog/posthog-go
131
defect
26c140924d3c89c6ea862acdf52779d69b822cda
e529d35d7cef1c374bd2519b8a4ec75b62730bdd
feat: Add SDK parity for date operators and inconclusive evaluation
- Fixed bug where inconclusive feature flag evaluations returned `false` instead of `nil`: When local evaluation couldn't determine a flag's value due to missing properties, it returned `false` (with an error), potentially causing flags to appear disabled when they should be inconclusive. Now properly returns `nil` wit...
diff --git a/feature_flags_local_test.go b/feature_flags_local_test.go index 890af9b4..7ac24518 100644 --- a/feature_flags_local_test.go +++ b/feature_flags_local_test.go @@ -307,6 +307,265 @@ func TestMatchPropertyContains(t *testing.T) { } } +func TestMatchPropertyDateComparison(t *testing.T) { + t.Run("RFC3339 ...
1
1
0
[{"id": "G0", "claim": "The reviewer asks why the inconclusive-match return value was changed from `false` to `nil`, questioning the unexplained change to the error-path return of matchFeatureFlagProperties.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
PostHog__posthog-go__139
PostHog/posthog-go
139
defect
3da392f4450f862958a66cab49748957d925ddbe
68392f1e906a244519c6bd0e1f27fe63049f656f
feat(flags): Add ETag support for local evaluation polling
Add support for HTTP conditional requests using ETags to reduce bandwidth when polling for feature flag definitions. When flag definitions haven't changed, the server returns 304 Not Modified and the SDK skips processing. Based on https://github.com/PostHog/posthog-python/pull/381
diff --git a/featureflags.go b/featureflags.go index b6045015..e124ae0e 100644 --- a/featureflags.go +++ b/featureflags.go @@ -42,6 +42,7 @@ type FeatureFlagsPoller struct { flagTimeout time.Duration decider decider disableGeoIP bool + flagsEtag ...
4
3
0
[{"id": "G0", "claim": "The comment should be reworded because it says the ETag is cleared if the server stops sending it, while the logic (correctly) preserves it on 304.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The test may store the If-No...
null
PostHog__posthog-go__141
PostHog/posthog-go
141
defect
c4e9b4ff92e4c2cbf813c18bd606f8654275429e
a218e5a8a6bf083f8153c0351a7ce04b8630035b
test: Add network failure and retry behavior tests
Introduces `Config.MaxRetiries` allowing to limit retries. Test and document the behaviour of failed requests and retry behavior. The failure scenarios are basically: reseting the connection when a request/response is been sent. Add comprehensive test suite for validating client behavior under network failure ...
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index f5d94a47..29acfc8e 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -9,10 +9,10 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - name: Set up Go 1.21 + - name: Set...
7
6
4
[{"id": "G0", "claim": "The CI workflow's test command `go test -timeout 30s -v .` does not run the tests this PR adds under extras/, so the new tests are never exercised by CI; it should be changed to run `./...` instead.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id":...
null
PostHog__posthog-go__157
PostHog/posthog-go
157
defect
9453c9b605abad106d740163badb9d9ab1f4d19b
971e0ac66b90c1063981117e06feb41e89ba240c
feat: Add device_id parameter to /flags requests
## Problem Need consistent feature-flag evaluation and reporting when flags use device-based bucketing; local evaluation and event metadata were missing device_id support. ## Changes - Add device_id to flags requests and SendFeatureFlagsOptions. - Use device_id for local evaluation bucketing when configured. - I...
diff --git a/feature_flag_config.go b/feature_flag_config.go index 4bbc430c..118d6afa 100644 --- a/feature_flag_config.go +++ b/feature_flag_config.go @@ -3,6 +3,7 @@ package posthog type FeatureFlagPayload struct { Key string DistinctId string + DeviceId *string Groups ...
2
2
1
[{"id": "G0", "claim": "On the getFeatureVariantsWithOptions code path the newly added device_id argument to getFeatureFlagVariants is always passed as nil, and the reviewer asks whether that is intentional.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "cla...
null
PostHog__posthog-go__160
PostHog/posthog-go
160
defect
ec1796379c6fdaf4dcf598fdf77b85907f270f20
b043511d7aa7a5f9dca327106818aa6aef26acf8
ci: Validate `go fmt` has been run
I've noticed that we're not running `go fmt` regularly. This change ensures that every PR has clean formatting.
diff --git a/.github/workflows/fmt.yml b/.github/workflows/fmt.yml new file mode 100644 index 00000000..3d5562e6 --- /dev/null +++ b/.github/workflows/fmt.yml @@ -0,0 +1,23 @@ +name: Check Formatting + +on: + pull_request: + merge_group: + +jobs: + fmt: + name: Check formatting + runs-on: ubuntu-latest + st...
1
1
1
[{"id": "G0", "claim": "The new workflow does not limit the GITHUB_TOKEN's permissions and should set an explicit permissions block with contents: read as a minimal starting point.", "category": "security", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
PostHog__posthog-go__162
PostHog/posthog-go
162
defect
945f3c8958cd74d18419088337a43d7dddfa3d9c
25b63606515323efc571222fed94080d824695b2
fix(flags): avoid setting flags to false on transient errors
## Problem When the PostHog `/flags` endpoint encounters transient errors (e.g., database timeouts) evaluating a specific flag, it returns that flag with `enabled: false` along with an `errorsWhileComputingFlags: true` signal. SDKs that cache flag values and merge new responses over cached data would overwrite previ...
diff --git a/feature_flags_remote_test.go b/feature_flags_remote_test.go index 0c45a414..c6f33b9b 100644 --- a/feature_flags_remote_test.go +++ b/feature_flags_remote_test.go @@ -555,3 +555,93 @@ func TestGetErrorStringWithRequestErrors(t *testing.T) { }) } } + +func TestFailedFlagShouldNotReturnValue(t *testing....
1
1
0
[{"id": "G0", "claim": "The failed-evaluation branch in getFeatureFlagFromRemote should be its own condition, e.g. another value in $feature_flag_error like evaluation_failed, instead of folding failed flags into flag_missing.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
PostHog__posthog-go__164
PostHog/posthog-go
164
defect
c5bb4da8c1181e61b6bfdc35810deac884c1ce15
eacc5c93edcf9399d9fef6f73b696536c8f9d2fa
fix: be compliant on retries and compression
## Problem The SDK was not compliant with the SDK harness tests on retries and compression. <img width="613" height="1275" alt="Screenshot 2026-02-05 at 10 37 29" src="https://github.com/user-attachments/assets/5852b6ba-0689-4f5e-b00d-d08ddadb912a" /> ## Changes - Add structured HTTP error handling and retrya...
diff --git a/posthog.go b/posthog.go index f9a16887..ae0a316b 100644 --- a/posthog.go +++ b/posthog.go @@ -9,6 +9,8 @@ import ( "io" "net/http" "net/url" + "strconv" + "strings" "sync" "sync/atomic" "time" @@ -826,6 +828,12 @@ func (c *client) send(pb preparedBatch) { return } + var httpErr *httpE...
3
1
1
[{"id": "G0", "claim": "The Retry-After delay comparison in send could be simplified using Go's built-in max function instead of the explicit greater-than test.", "category": "maintainability", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Unit tests should be added to the new p...
null
PostHog__posthog-go__166
PostHog/posthog-go
166
defect
a8315023568eafdad2827738e9cf4e9479000f19
00dbb72be9339ce1405539ae9aee580a95c26433
feat(flags): add semver targeting to local evaluation
## Summary - Add 9 semver comparison operators to the property matching logic used during local feature flag evaluation - Implement inline semver parsing without external dependencies (~170 lines) - Add comprehensive test coverage (~650 lines) This matches the behavior already implemented in: - PostHog Python SDK: Po...
diff --git a/feature_flags_matching_test.go b/feature_flags_matching_test.go index a3284664..1869ed21 100644 --- a/feature_flags_matching_test.go +++ b/feature_flags_matching_test.go @@ -2,6 +2,7 @@ package posthog import ( "errors" + "strconv" "testing" "time" @@ -556,3 +557,651 @@ func TestMatchPropertyDat...
3
3
2
[{"id": "G0", "claim": "The semver error messages say \"person property value\", but matchProperty is used for both person and group properties and does not check the property type there, so the diagnostics should use a neutral \"property value\" in every semver operator branch.", "category": "documentation", "verdict"...
null
PostHog__posthog-go__167
PostHog/posthog-go
167
defect
1e277f9a97e72d053468e20b030544df6f527692
6fa8f743d7774d27722867e6e056c2943372cdad
feat: add automatic system context to all events
## Summary This PR: - Adds automatic system context to all events sent by the Go SDK. - Includes `$os` for all platforms, `$os_version` where available, `$os_distro` on Linux, and a new property `$go_version`. - Fixes a bug in user properties merge in `capture.go`. - Updates fixtures and tests to handle dynamic ...
diff --git a/alias.go b/alias.go index c6775c84..6f544f8a 100644 --- a/alias.go +++ b/alias.go @@ -49,6 +49,7 @@ type AliasInApiProperties struct { Alias string `json:"alias"` Lib string `json:"$lib"` LibVersion string `json:"$lib_version"` + OS string `json:"$os"` DisableGeoIP bool ...
6
4
3
[{"id": "G0", "claim": "The reviewer questions whether the osNameMap lookup works for all GOOS values and suggests the code should just set runtime.GOOS instead of mapping to human-friendly names.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "go-cmp was a...
null
PostHog__posthog-go__176
PostHog/posthog-go
176
defect
158fd47706847c52322430bb0c949f99967bf43d
4a628b597e51e2c5088db076a26dde8b1e7124a7
feat: add `locally_evaluated` property to `$feature_flag_called`
## :bulb: Motivation and Context Bring this in line with other SDKs by setting a `locally_evaluated` property on `$feature_flag_called` events to indicate whether the flag was evaluated locally. ## :green_heart: How did you test it? New unit tests ## :pencil: Checklist <!--- Put an `x` in the boxes that ...
diff --git a/feature_flags_local_test.go b/feature_flags_local_test.go index dda03c47..663b5a8c 100644 --- a/feature_flags_local_test.go +++ b/feature_flags_local_test.go @@ -9,6 +9,7 @@ import ( "net/http/httptest" "reflect" "strings" + "sync" "sync/atomic" "testing" "time" @@ -710,9 +711,28 @@ func TestGe...
2
2
0
[{"id": "G0", "claim": "The author should add an entry for this change to the CHANGELOG before merging, per RELEASING.md.", "category": "process", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "In GetFeatureFlag, `locallyEvaluated` should be computed as `err == nil && result !=...
null
PostHog__posthog-go__180
PostHog/posthog-go
180
defect
06502600a00123f1f54b1a1c5d926f6a8feaab6c
8dec84bbca00c9c25dcdc1576d08ea8c216f2fc9
feat: support custom properties on exception events
## :bulb: Motivation and Context Adds a Properties field to Exception, plus a SlogAttrsAsProperties helper and WithPropertiesFn option for the slog capture handler. Closes #132 * **Custom properties on exceptions**: `Exception` now has a `Properties` field for attaching arbitrary key/value metadata to a capt...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 45725ea2..958f2d4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,27 @@ +### New Features + +* **Custom properties on exceptions**: `Exception` now has a `Properties` field for attaching arbitrary key/value metadata to a captured exception. Custom keys are flatten...
1
1
0
[{"id": "G0", "claim": "The hand-added '### New Features' section in CHANGELOG.md will mess with the release workflow's CHANGELOG generation, so it should be removed and captured in the commit message/PR description instead.", "category": "process", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
PostHog__posthog-go__193
PostHog/posthog-go
193
defect
06421d21d58ff2c8c3550139bca9e995be752de5
fec8a4a55b10bb03a1449c74799b647e3945c7c2
Fix no-op client for empty API key
## :bulb: Motivation and Context This PR makes missing API key handling safe and consistent: - If the project API key is missing or blank after trimming whitespace, the SDK returns a disabled `noopClient` and all public methods become no-ops. - `noopClient` performs no validation and returns zero/non-error values. - ...
diff --git a/.changeset/noop-missing-api-keys.md b/.changeset/noop-missing-api-keys.md new file mode 100644 index 00000000..9dd470e2 --- /dev/null +++ b/.changeset/noop-missing-api-keys.md @@ -0,0 +1,5 @@ +--- +"posthog-go": patch +--- + +No-op SDK calls when the project API key is missing, and no-op Personal API key d...
3
2
2
[{"id": "G0", "claim": "The client's Personal-API-key-dependent methods (e.g. GetFeatureFlags, ReloadFeatureFlags) should keep returning an error (ErrNoPersonalAPIKey) instead of being changed into silent no-ops that return empty defaults and nil.", "category": "design", "verdict": "supported", "priority": "P1", "scope...
null
PostHog__posthog-go__2
PostHog/posthog-go
2
defect
e0ee8499d623753ae480d819f51efe48e50724e9
830537c342be48c81ebb8d54145d894061bfd6e8
Add Feature Flags
WIP because it's missing tests and could probably use some cleaning up given I'm not a Go dev by trade :D Errors also need better descriptors, etc. Everything works though with manual testing. ## What this does Mostly just adds feature flags, but also fixes broken tests and a few minor issues here and there. ...
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml new file mode 100644 index 00000000..38a22ebe --- /dev/null +++ b/.github/workflows/unit-tests.yml @@ -0,0 +1,26 @@ +name: Unit Tests + +on: + - pull_request + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + ...
6
5
2
[{"id": "G0", "claim": "The workflow's `go get` step should be replaced by initializing a Go module so the dependencies live in the generated go.mod file.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "featureflags.go is not gofmt-formatted and should be...
null
PostHog__posthog-go__26
PostHog/posthog-go
26
defect
f2ee529330e93f1bbcde95da07a0902bfd775d2c
e36dc52a93d0e8477abb0d3710205d2b7fbbbf44
Initialize properties map when sending feature flags
When capturing an event with SendFeatureFlags set to true and no properties defined posthog panics with nil pointer. Panic: ``` github.com/posthog/posthog-go.(*client).Enqueue(0x4000abba00, {0x420b130?, 0x40015705a0?)
 /root/go/pkg/mod/github.com/posthog/posthog-go@v0.0.0-20240110105835-f2ee529330e9/posthog.g...
diff --git a/posthog.go b/posthog.go index 4c2aa0d0..79ca2f78 100644 --- a/posthog.go +++ b/posthog.go @@ -189,6 +189,11 @@ func (c *client) Enqueue(msg Message) (err error) { if err != nil { c.Errorf("unable to get feature variants - %s", err) } + + if m.Properties == nil { + m.Properties = NewProper...
1
1
1
[{"id": "G0", "claim": "Add a testcase for sendFeatureFlags in capture, since the feature-flag behaviour added by this pull request is untested.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
PostHog__posthog-go__34
PostHog/posthog-go
34
defect
abe6962c309e2ad804f013fc0f40c29e56f39a3f
6a538c95805c2334e793235e8c7600e7633996e1
Support multiple cohorts in local evaluation
> 3. There's more than one cohort in the feature flag definition. This restriction is annoying. Copying what [NodeJS SDK does](https://github.com/PostHog/posthog-js-lite/pull/85). Ref: https://posthog.com/docs/feature-flags/local-evaluation PS Sorry I couldn't reopen my old PR somehow :/
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index d0b14c05..1bddd8a5 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -8,10 +8,10 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - name: Set up Go 1.15 + - name: Set...
1
1
1
[{"id": "G0", "claim": "The `send_cohorts` parameter should be added as a proper query parameter instead of being appended to the local_evaluation endpoint path.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
PostHog__posthog-go__4
PostHog/posthog-go
4
defect
8bebac98515efdfbaf100e9a5b2931309e8b1081
9ff1d0489a74d3ba255920366d09bb2a4573a37a
Add support for group analytics
Add support for group analytics **To add/identify a group:** ``` // basic: client.Enqueue(posthog.groupIdentify{ Type: "organization", Key: "id:5", }) // advanced: client.Enqueue(posthog.groupIdentify{ Type: "organization", Key: "id:5", Properties: posthog.NewPro...
diff --git a/capture.go b/capture.go index 980df81e..b52ed181 100644 --- a/capture.go +++ b/capture.go @@ -14,6 +14,7 @@ type Capture struct { Event string Timestamp time.Time Properties Properties + Groups Groups } func (msg Capture) internal() { @@ -63,6 +64,10 @@ func (msg Capture) APIfy() APIMes...
7
2
2
[{"id": "G0", "claim": "It is unclear how to test that .capture handles groups correctly, and the pull request ships no working test for it (TestGroupsCapture is only a commented-out stub).", "category": "testing", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The identify cal...
null
PostHog__posthog-go__5
PostHog/posthog-go
5
defect
93c17c49e2b02e3fa606204d0bf495280aa3815a
749715bd41526138629c647941df8fef31252d8f
feat(libraries): add multivariate support for posthog-go
Changes: - [x] Add multivariate support w/ decide v2 endpoint - [x] Add GetFeatureFlag method - [x] Add send_feature_flags option to capture Tests: - [x] Add a bunch of tests to posthog_test - [x] Add more e2e tests for feature flags and capture additions
diff --git a/featureflags.go b/featureflags.go index e82951b8..5a7253ed 100644 --- a/featureflags.go +++ b/featureflags.go @@ -47,7 +47,7 @@ type DecideRequestData struct { } type DecideResponse struct { - FeatureFlags []string `json:"featureFlags"` + FeatureFlags map[string]interface{} `json:"featureFlags"` } ...
2
1
0
[{"id": "G0", "claim": "Keep the client-facing method named `getFeatureFlag` (as in the JS libraries) instead of the more accurate `getFeatureFlagValue`, for consistency.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The decide v2 endpoint does n...
null
PostHog__posthog-go__84
PostHog/posthog-go
84
defect
b26aef840f7461c2927edfd39fc1da723db69ac2
14d9c15d2f0c3cac4241f7f3ddcdb96c06dbcefd
feat(flags): Add method for fetching decrypted remote config flag payload
Context: [PostHog/posthog#27414 (files)](https://github.com/PostHog/posthog/pull/27414/files)
diff --git a/examples/featureflags.go b/examples/featureflags.go index 72a97055..844271cd 100644 --- a/examples/featureflags.go +++ b/examples/featureflags.go @@ -61,4 +61,11 @@ func TestIsFeatureEnabled() { if variantErr != nil || variantResult == true { fmt.Println("error:", variantErr) } + + // Encrypted remo...
3
2
0
[{"id": "G0", "claim": "The User-Agent header should use the `sdk/version` format (e.g. 'posthog-go/1.0.0') instead of 'posthog-go (version: ...)' so it is easier to parse when doing something specific per SDK.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G2", "claim...
null
PostHog__posthog-go__85
PostHog/posthog-go
85
defect
ec95a60c64b0dd335dafa5c72e8a56c4edc0dbbd
cc4cf6eb0e51f48b4fd25eb0ba51a2cd92708659
feat(feature-flags): support quota limiting for feature flags
with https://github.com/PostHog/posthog/pull/28564, we now start to respond different with the /decide and /local_evaluation APIs if users have gone over their quota limit. Now we need to change the SDKs to handle these new responses.
diff --git a/featureflags.go b/featureflags.go index 3889da83..d71c0377 100644 --- a/featureflags.go +++ b/featureflags.go @@ -106,6 +106,7 @@ type DecideRequestData struct { type DecideResponse struct { FeatureFlags map[string]interface{} `json:"featureFlags"` FeatureFlagPayloads map[string]string `js...
1
1
0
[{"id": "G0", "claim": "The feature-flags quota-limit check is duplicated in a couple of places in posthog.go, so a helper method such as `isQuotaLimited(decideResponse)` would make sense.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
PostHog__posthog-go__87
PostHog/posthog-go
87
defect
7932062cb3b845a13ed04045d1bc86b3b3831c4d
56ffa91d90ad4b4e6e2440af6f1326b2046ac600
fix: Do not convert string variant results into bool
The words "true" and "false" are valid variant keys. It's incorrect to convert them to `true` and `false`. This could result in a case where `isEnabled` returns `false` when in fact, it's `true` but the variant selected is named "false". This PR fixes the bug by not converting flag values from `string` to `bool`. Th...
diff --git a/README.md b/README.md index fa80848c..f100547e 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,16 @@ Please see the main [PostHog docs](https://posthog.com/docs). Specifically, the [Go integration](https://posthog.com/docs/integrations/go-integration) details. -# Quickstart +## Quickstart Instal...
2
1
0
[{"id": "G0", "claim": "The comment in TestFeatureFlagWithFalseVariant suggesting the test will fail because \"false\" is incorrectly converted should be updated or removed, since the conversion bug is now fixed and the comment is confusing.", "category": "documentation", "verdict": "uncertain", "priority": "P2", "scop...
null
PostHog__posthog-go__96
PostHog/posthog-go
96
defect
773286f128bf8b725ed8552000833602740338de
b7b5cfc23767d6d21b83d059d935b76d93f0f9c9
chore(flags): use new `/flags` endpoint instead of `/decide`
update Go SDK to use the new `/flags` endpoint instead of the legacy `/decide` one.
diff --git a/feature_flags_decide_test.go b/feature_flags_decide_test.go index 84371d07..4687f07e 100644 --- a/feature_flags_decide_test.go +++ b/feature_flags_decide_test.go @@ -9,11 +9,11 @@ import ( ) /* -Tests of the feature flag api against the decide endpoint, no local evaluation. -This is primarily here to e...
2
1
0
[{"id": "G0", "claim": "The function names getFeatureFlagPayloadFromDecide and getFeatureFlagFromDecide still reference the legacy /decide endpoint and, for consistency with the updated /flags endpoint, should be renamed to getFeatureFlagPayloadFromFlags and getFeatureFlagFromFlags.", "category": "maintainability", "ve...
null
PostHog__posthog__52895
PostHog/posthog
52,895
defect
8c35632e701a99e6acfc68ca1555c3cd90c1c7de
bdc59335a264748a95f4562c01051bf15cc99a86
feat: Wire up SLOs in query service
## Problem `QueryRunner.run()` had no SLO instrumentation. Exports, subscription delivery, and alert checks already emit `slo_operation_started`/`slo_operation_completed`; this closes the query-path gap so it gets the same burn-rate, success-rate, and duration dashboards. ## Changes - Wrap `QueryRunner.run()` in `sl...
diff --git a/posthog/api/insight.py b/posthog/api/insight.py index 6914a8d2db99..e83969bfc8fb 100644 --- a/posthog/api/insight.py +++ b/posthog/api/insight.py @@ -57,6 +57,7 @@ from posthog.caching.fetch_from_cache import InsightResult, fetch_cached_response_by_key from posthog.clickhouse.cancel import cancel_query_o...
17
10
2
[{"id": "G0", "claim": "The standalone test test_slo_operation_full_rate_does_not_call_random essentially repeats the (1.0, None, True) row of the parameterised sample-rate test, and its mock_random.assert_not_called() assertion could live inside the parameterised test body (guarded by if sample_rate >= 1.0) instead of...
null
PostHog__posthog__53533
PostHog/posthog
53,533
defect
7d3036c4354cd5ba868cd210ecf9ec07f93d75d9
dc66db0e4f0cb24503c9f2a6a1ff605244ad3c3a
fix(llma): add $ai_evaluation to trace summarization event types
## Summary - Adds missing `$ai_evaluation` to `AI_EVENT_TYPES` in trace summarization constants - Updates two hardcoded SQL `WHERE event IN (...)` clauses in sampling queries to include `$ai_evaluation` Fixes #53532 ## Problem The trace summarization pipeline was silently excluding `$ai_evaluation` events because t...
diff --git a/posthog/temporal/llm_analytics/trace_summarization/constants.py b/posthog/temporal/llm_analytics/trace_summarization/constants.py index de5e70beefc3..9712fc448012 100644 --- a/posthog/temporal/llm_analytics/trace_summarization/constants.py +++ b/posthog/temporal/llm_analytics/trace_summarization/constants....
1
1
0
[{"id": "G0", "claim": "Both SQL queries in sampling.py hard-code the event type list instead of deriving it from AI_EVENT_TYPES in constants.py (the root cause of $ai_evaluation being omitted); importing and using AI_EVENT_TYPES for both clauses would mean future event-type additions require only a single change in co...
null
PostHog__posthog__55998
PostHog/posthog
55,998
defect
f7da141e1e02c77187f316df7501147a78832155
d341b5dcd9f860ad0d6f07827e04601671283c71
fix(stamphog): allow no-op migrations
## Problem Stamphog hard-denies any PR touching migration files, even when the existing CI migration risk analyzer already classified them as `Safe`. The signal wasn't reachable from stamphog. ## Changes Decoupled through a public CI contract. **1. Analyzer publishes a `Migration risk` check on the head commit.** `...
diff --git a/tools/pr-approval-agent/gates.py b/tools/pr-approval-agent/gates.py index 9b2af5fa25ca..424c8cb45d3d 100644 --- a/tools/pr-approval-agent/gates.py +++ b/tools/pr-approval-agent/gates.py @@ -297,9 +297,10 @@ def test_only(categories: dict[str, int]) -> bool: # ── Deny / allow detection ────────────────────...
8
8
5
[{"id": "G0", "claim": "subprocess.run with timeout=10 in _read_git_file_contents can raise an unhandled subprocess.TimeoutExpired that would propagate out of _classify() and crash the review pipeline; it should be caught so noop-detection stays best-effort.", "category": "correctness", "verdict": "supported", "priorit...
null
PostHog__posthog__56772
PostHog/posthog
56,772
defect
b560f069e37da4495eb61cdcd7522f7cc0a0f75d
157ea84a298449aa7d60fe1131f26e2316c00bb1
feat(subscriptions): auto-disable on terminal slack api errors
## Problem Stacks on #56727. That PR added auto-disable for missing Slack integration / unsupported target / no assets. `SlackApiError`s with user-config codes (`invalid_auth`, `account_inactive`, `token_revoked`, `is_archived`, `channel_not_found`, `not_in_channel`) share the same shape — won't self-heal, keep re-fir...
diff --git a/ee/api/subscription.py b/ee/api/subscription.py index c6676159549e..bb34a2eb7a3e 100644 --- a/ee/api/subscription.py +++ b/ee/api/subscription.py @@ -103,6 +103,7 @@ class Meta: "created_at", "created_by", "deleted", + "enabled", "title", ...
2
2
0
[{"id": "G0", "claim": "TERMINAL_SLACK_ERROR_CODES duplicates four codes (invalid_auth, account_inactive, is_archived, channel_not_found) from the existing SLACK_USER_CONFIG_ERRORS, and should be expressed in terms of that existing constant so there is a single source of truth.", "category": "maintainability", "verdict...
null
PostHog__posthog__57316
PostHog/posthog
57,316
defect
a0cbaec8add184c334ad50e4708c8e1a2dfe8734
00a9ba8f059ab215034e0721c1e4abea0a87f682
feat(hogli): enable signed commits inside Coder devboxes
## Problem Coder devboxes don't sign commits. Engineers have already configured local commit signing per the [PostHog handbook](https://posthog.com/handbook/engineering/security#commit-signing) (Secretive, 1Password, or another SSH agent) — give them signed commits inside devboxes by propagating that config, with the ...
diff --git a/tools/hogli-commands/hogli_commands/devbox/cli.py b/tools/hogli-commands/hogli_commands/devbox/cli.py index eba216bfe30d..3163524b3cc9 100644 --- a/tools/hogli-commands/hogli_commands/devbox/cli.py +++ b/tools/hogli-commands/hogli_commands/devbox/cli.py @@ -11,6 +11,7 @@ import socket import functools i...
2
1
0
[{"id": "G0", "claim": "The --configure-git-signing help text should be reworded because \"Pick a 1Password SSH key\" is misleading: the flag does not prompt for a key but reads `git config user.signingkey` and works with any SSH agent (Secretive, 1Password, or other).", "category": "documentation", "verdict": "support...
null
PostHog__posthog__57338
PostHog/posthog
57,338
defect
b4682f7469151a1d9bdcbdfd841533fbe3159fd8
1315e1a4edfb4073f8225c71e716377a66a9f894
feat(flags): Add bucketing change safeguards for v2 UI
## Problem Feature flag bucketing changes can have significant impact on user experience, but the v2 UI lacks safeguards: 1. No warning when changing bucketing options (which causes re-evaluation) 2. Users can save incompatible combinations (device ID + persist across auth) 3. No auto-disable of persist across auth wh...
diff --git a/frontend/src/scenes/feature-flags/FeatureFlagForm.tsx b/frontend/src/scenes/feature-flags/FeatureFlagForm.tsx index 2b2b65068d73..cd7810b7a0b5 100644 --- a/frontend/src/scenes/feature-flags/FeatureFlagForm.tsx +++ b/frontend/src/scenes/feature-flags/FeatureFlagForm.tsx @@ -649,37 +649,42 @@ export function...
18
17
6
[{"id": "G0", "claim": "The migration's select_related(\"team\") leaves flag.team.organization to be fetched with a separate SELECT per ActivityLog row (N+1); use select_related(\"team__organization\").", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": ...
null
PostHog__posthog__57472
PostHog/posthog
57,472
defect
a70f94dcb52223eea9f82aec942013b23d01f54f
618aa312ac6416205a9897b7395565d9fc5c16e5
feat(phai): evals for the exec tool
## Problem <s>We've had a few reports of double escaping – it didn't work well with large inputs. The command field was within a json object, so inlining long json inputs is hard for agents. This experiment uses an optional input property. </s> Fixes [56766](https://github.com/PostHog/posthog/issues/56766). Decid...
diff --git a/ee/hogai/eval/sandboxed/cli_mcp/__init__.py b/ee/hogai/eval/sandboxed/cli_mcp/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/ee/hogai/eval/sandboxed/cli_mcp/eval_input.py b/ee/hogai/eval/sandboxed/cli_mcp/eval_input.py new file mode 100644 index 000000000000..5c5c78f25562 --...
2
1
1
[{"id": "G0", "claim": "The test for discovery commands ignoring stray `input` only exercises `tools` and `info`, so the `search` and `schema` commands (which the PR description says also ignore `input`) should also be covered, preferably with a parameterised `it.each` test.", "category": "testing", "verdict": "uncerta...
null
PostHog__posthog__57541
PostHog/posthog
57,541
defect
9df800dd51c5a41ff7ef5a5fdec9fefa941a5392
9ab288ecdb7a3c20b45a0e1958d2923e338f73c6
chore(exports): Allow asset retrieve across teammates
## Problem People want to see session videos in PostHog Code on session replay signals, and PH Code already should be showing them - but it currently can't, as retrieval of exported assets is forbidden to project members other than the original exporter, even by ID. And the replay assets are currently "exported" by ...
diff --git a/posthog/api/exports.py b/posthog/api/exports.py index d504e68fcc4c..67f863cdc632 100644 --- a/posthog/api/exports.py +++ b/posthog/api/exports.py @@ -388,9 +388,21 @@ class ExportedAssetViewSet( serializer_class = ExportedAssetSerializer def safely_get_queryset(self, queryset): - queryse...
4
4
2
[{"id": "G0", "claim": "In safely_get_object, when export_context contains a session_recording_id but no SessionRecording DB row exists (deleted or never materialised), resource stays None and check_access_level_for_object is never called, so any project member can retrieve or stream the export content without any RBAC...
null
PostHog__posthog__57556
PostHog/posthog
57,556
defect
dde65dbc570c9eed47e0c8c4c3bfa57df868bc30
0ee671e13c250a65112bac29247fac5519e4bc63
fix(growth): shorten SDK Doctor team-events cache TTL to reduce out-of-date alerting
## Problem As reported by a customer in ticket [57380](https://posthoghelp.zendesk.com/agent/tickets/57380), SDK Doctor users sometimes see a red warning badge on the Health menu even though their actual SDK traffic is healthy. Clicking "Scan events" on the SDK Doctor page flips it back to green. After reviewing the c...
diff --git a/products/growth/backend/constants.py b/products/growth/backend/constants.py index d12773ef10c4..03035e9585ca 100644 --- a/products/growth/backend/constants.py +++ b/products/growth/backend/constants.py @@ -1,6 +1,16 @@ from typing import Literal, TypedDict -SDK_CACHE_EXPIRY = 60 * 60 * 24 * 7 # 7 days ...
1
1
0
[{"id": "G0", "claim": "The test subclasses django.test.TestCase even though it does not touch the database, which slows the suite; use SimpleTestCase instead.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
PostHog__posthog__57619
PostHog/posthog
57,619
defect
9dac258e40545ba5412a914c636d018381a1a148
d3bac1bc140171fca3a6577eaae7302e17f1e9ba
fix(llma): preserve sql editor filters in max
This is a bit legacy (work on old max, not MCP), but does fix an issue with PostHog AI and notebook nodes. Might as well get it in... ## Problem Max SQL edits for notebook SQL editor nodes could lose the `{filters}` placeholder model by rewriting date and property filters directly into SQL text, instead of preser...
diff --git a/ee/hogai/context/notebook/prompts.py b/ee/hogai/context/notebook/prompts.py index a1c9070a8656..00103a0d3097 100644 --- a/ee/hogai/context/notebook/prompts.py +++ b/ee/hogai/context/notebook/prompts.py @@ -13,4 +13,10 @@ The user has provided the following notebooks: {{{notebooks}}} + +Notebook SQL edi...
2
2
1
[{"id": "G0", "claim": "The 'clear filters' test feeds {source: {filters: null}} — a payload the backend never emits (it sends filters: {}) — and expects setSourceQuery to receive filters: undefined, so the real clear path (toolOutput.filters = {} -> source.filters = {}) is untested and an empty filters object versus a...
null
PostHog__posthog__57707
PostHog/posthog
57,707
defect
b6eb15d5f7fa1173b336166d0713f82bb562fbdd
d59ff6216eeaae6d35844065a3a93e25188e8e13
refactor(web-analytics): split web analytics stats table queries into multiple strategies
## Problem For humans: I think we must track the timing for those queries differently, so splitting the inner code paths is the first step for this and for later precomputing each different path. The `WebStatsTableQueryRunner` class has grown to contain multiple query building methods (`to_main_query`, `to_path...
diff --git a/posthog/hogql_queries/web_analytics/stats_table.py b/posthog/hogql_queries/web_analytics/stats_table.py index 28a76e6a126c..6b8d975f7b49 100644 --- a/posthog/hogql_queries/web_analytics/stats_table.py +++ b/posthog/hogql_queries/web_analytics/stats_table.py @@ -14,7 +14,7 @@ from posthog.hogql import as...
1
1
0
[{"id": "G0", "claim": "The post-`parse_select` block applying ordering and fill-fraction is identical across the path strategies and should be extracted into a shared `_finalize_query` helper on the base class so future changes are made in one place.", "category": "maintainability", "verdict": "supported", "priority":...
null
PostHog__posthog__57740
PostHog/posthog
57,740
defect
ddf3ea88199088713a822ef064e1e58f44c50717
b8dc7e3d9246c9c25b5caa8dd32c37928b22b0a5
feat: add logging around asyncify for better observability
## Problem When `asyncify` runs sync functions inside Temporal activities, we have no visibility into how long the wrapped call sits queued versus how long it actually executes. With `sync_to_async`'s default `thread_sensitive=True`, every asyncified call funnels through asgiref's single shared thread, so a slow ORM q...
diff --git a/posthog/temporal/common/utils.py b/posthog/temporal/common/utils.py index 2b0124b1cdb3..4b49a542d4f2 100644 --- a/posthog/temporal/common/utils.py +++ b/posthog/temporal/common/utils.py @@ -9,7 +9,7 @@ from django.db import close_old_connections from asgiref.sync import sync_to_async -from temporalio i...
5
2
0
[{"id": "G0", "claim": "The close_db_connections docstring and examples still tell callers to stack @close_db_connections underneath @asyncify, which now applies the decorator twice, so the docs should be updated to say the stacking is no longer needed.", "category": "documentation", "verdict": "supported", "priority":...
null
PostHog__posthog__57772
PostHog/posthog
57,772
defect
ce2544cd000b95cbebd55c840662bdbf96d0bbcc
71a1bb0084ec916fb72f2a179eb3054e2265c635
fix(ws): require credential re-entry when connection host changes
## Problem Project members with source write access can exfiltrate stored database credentials by modifying a data source's connection host to point at an attacker-controlled server. The backend then authenticates against the new host using the stored password ## Changes **`products/data_warehouse/backend/ap...
diff --git a/products/data_warehouse/backend/api/external_data_source.py b/products/data_warehouse/backend/api/external_data_source.py index 2cbcc1830a81..63540ef1247b 100644 --- a/products/data_warehouse/backend/api/external_data_source.py +++ b/products/data_warehouse/backend/api/external_data_source.py @@ -583,6 +58...
4
3
3
[{"id": "G0", "claim": "The `\"host\" in existing_job_inputs` guard means the credential re-entry requirement is silently skipped when the existing record has no stored `host` key, so an attacker could introduce a new host without supplying credentials and the stored password would be forwarded to it; using `.get(\"hos...
null
PostHog__posthog__57815
PostHog/posthog
57,815
defect
f6b2a65026f55041003a619179d2343e3dbfa1fb
881f086a92ba922aadbc924ec03f8d0bb668ff96
fix(posthog-ai): don't double-wrap DataVisualizationNode in notebooks
## Problem When PostHog AI creates a notebook that embeds a SQL chart, the notebook persistence helper (`save_notebook_to_db` in `ee/hogai/tools/create_notebook/helpers.py`) wraps the visualization artifact's stored query in an extra `InsightVizNode` layer when the artifact is already a top-level `DataVisualizationN...
diff --git a/ee/hogai/tools/create_notebook/helpers.py b/ee/hogai/tools/create_notebook/helpers.py index 6fe5c8f6926a..42d2b881592d 100644 --- a/ee/hogai/tools/create_notebook/helpers.py +++ b/ee/hogai/tools/create_notebook/helpers.py @@ -78,7 +78,10 @@ async def save_notebook_to_db( if not query: ...
1
1
0
[{"id": "G0", "claim": "The four structurally identical test methods in test_helpers.py should be collapsed into a single @parameterized.expand (or subTest) case that varies only in the input query dict and the two expected strings.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "in...
null
PostHog__posthog__57835
PostHog/posthog
57,835
defect
1f24191fc69bc204d7f7ea0d4a2569c7eddea773
ea4de8275e1896131b1fbe7642556c3fd9bc77f1
fix(signals): Consume `UserIntegration` on par with `Integration` for sandboxes
## Problem - If the user doesn't have team-level GitHub integration - sandboxes don't work <!-- Who are we building for, what are their needs, why is this important? --> <!-- Does this fix an issue? Uncomment the line below with the issue ID to automatically close it when merged --> <!-- Closes #ISSUE_ID --> ## Ch...
diff --git a/posthog/migrations/1147_integrationrepositorycacheentry_user_integration.py b/posthog/migrations/1147_integrationrepositorycacheentry_user_integration.py new file mode 100644 index 000000000000..3ac95b58f3d2 --- /dev/null +++ b/posthog/migrations/1147_integrationrepositorycacheentry_user_integration.py @@ ...
17
11
3
[{"id": "G0", "claim": "The new resolver returns only the first team GitHub integration (order_by id), so teams with multiple GitHub installations can lose every repository from later installations during candidate listing, cache hydration and eligibility filtering, unless the single-source contract is made explicit.",...
null
PostHog__posthog__57892
PostHog/posthog
57,892
defect
0dd8a39b2282d7cb5d81338f1b170f194a5fe7e6
aa00d446eaadab94977446b36aae25136ee9905f
chore(flags): drop has_encrypted_payloads from cached flag responses
## Problem Cached flag responses (the flags HyperCache for the feature-flags service, and the flag-definitions HyperCache for SDK local evaluation) included `has_encrypted_payloads` on every flag. The value was always `false`, because the cache layer already filters encrypted flags out before serialization. After PR...
diff --git a/posthog/api/feature_flag.py b/posthog/api/feature_flag.py index e2ef3684dc63..e85f79338ca3 100644 --- a/posthog/api/feature_flag.py +++ b/posthog/api/feature_flag.py @@ -2233,7 +2233,6 @@ class Meta: "deleted", "active", "ensure_experience_continuity", - "h...
1
1
1
[{"id": "G0", "claim": "The PR's change to _get_flags_response_for_local_evaluation_batch has no parameterised filter-matrix test in test_local_evaluation.py matching the ones added for the flags-cache paths, so a regression reverting this path to the old compound-Q filter would go undetected.", "category": "testing", ...
null
PostHog__posthog__57918
PostHog/posthog
57,918
defect
7022d860f07edc63867e3b63c52da235fb07af79
99431fcdc5e4fa5c37394346dd590862ce37a2e1
feat(cdp): shorten Slack channel refresh cooldown
## Problem In flows that pick a Slack channel (insight alerts, subscriptions, CDP / hog flow destinations), the **Refresh channels** / **Check again** button is gated by a 5-minute cooldown. This is much longer than the actual rate-limit headroom requires, and is long enough that users frequently feel the gate is br...
diff --git a/frontend/src/lib/integrations/SlackIntegrationHelpers.tsx b/frontend/src/lib/integrations/SlackIntegrationHelpers.tsx index dc0b8fdf9649..78249deae6c9 100644 --- a/frontend/src/lib/integrations/SlackIntegrationHelpers.tsx +++ b/frontend/src/lib/integrations/SlackIntegrationHelpers.tsx @@ -83,7 +83,8 @@ exp...
3
2
0
[{"id": "G0", "claim": "The three cooldown test cases differ only in the time offset and the expected outcome, so per the team's preference for parameterised tests they should be collapsed into a single it.each block.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1"...
null
PostHog__posthog__57965
PostHog/posthog
57,965
defect
177a93dace209932488a2ecb747812648bfe0db7
7d0e08cc2ea685944ecaaea63169fbbd0ab56744
feat(activity-logs): add organization-wide activity logs view
## Problem Activity logs are project-scoped today, so org admins/owners auditing across many projects have to hop between projects (and miss org-level changes entirely from a project view that doesn't opt in). ## Changes <img width="1245" height="674" alt="image" src="https://github.com/user-attachments/assets...
diff --git a/frontend/src/lib/components/ActivityLog/humanizeActivity.tsx b/frontend/src/lib/components/ActivityLog/humanizeActivity.tsx index a58e7892d279..06c75d11ce8e 100644 --- a/frontend/src/lib/components/ActivityLog/humanizeActivity.tsx +++ b/frontend/src/lib/components/ActivityLog/humanizeActivity.tsx @@ -43,6 ...
4
4
1
[{"id": "G0", "claim": "The logs tab object is identical in both branches of the scope ternary in AdvancedActivityLogsScene.tsx; build the tab list once and conditionally append the exports entry to avoid the duplication.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"},...
null
PostHog__posthog__57967
PostHog/posthog
57,967
defect
2339a20fae021c97e70302671fe34db6935764fe
bea87dd22e24aa86472ff5a02377e69a407087a7
fix(ducklake): use team config for import partition detection
## Problem DuckLake data imports metadata preparation detects Delta partition columns before the copy activity runs. In non-dev environments, that detection path was constructing Delta Lake storage options without team or organization context, which falls back to strict environment-based DuckLake config and can fail ...
diff --git a/posthog/temporal/ducklake/ducklake_copy_data_imports_workflow.py b/posthog/temporal/ducklake/ducklake_copy_data_imports_workflow.py index 838ae8b627ae..c59d1031b5ec 100644 --- a/posthog/temporal/ducklake/ducklake_copy_data_imports_workflow.py +++ b/posthog/temporal/ducklake/ducklake_copy_data_imports_workf...
1
1
1
[{"id": "G0", "claim": "In non-dev mode the team_id this PR adds makes _detect_data_imports_partition_column reach a synchronous Django ORM query (Team.objects.get) executed directly on the asyncio event loop, blocking it; the call should be wrapped with database_sync_to_async.", "category": "performance", "verdict": "...
null
PostHog__posthog__57980
PostHog/posthog
57,980
defect
d7cc6bc4da8288725f4d395f4c13d48cf5cfab6f
8cffb7c71d3a7ca4cfb6ae42c2fac038661849b4
chore(usage-reports): Optimizations for usage reports aggregator
+ Filter companies without usage so we only send usage reports for companies with usage reducing the amount of data we need to upload (and later download). + Fix a bug that was sending reports one by one instead of with the proper chunking. + Increased the # of organizations per chunk to 50_000 (from 10_000), chunks ...
diff --git a/posthog/tasks/usage_report.py b/posthog/tasks/usage_report.py index df9b21ed4672..cb67ee012e5d 100644 --- a/posthog/tasks/usage_report.py +++ b/posthog/tasks/usage_report.py @@ -1784,7 +1784,7 @@ def capture_report( # extend this with future usage based products -def has_non_zero_usage(report: FullUsa...
2
2
0
[{"id": "G0", "claim": "The docstring still says the writer streams, but the new `write()` plus `buffer.getvalue()` implementation buffers the whole body and no longer streams.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The concurrent chunk up...
null
PostHog__posthog__58042
PostHog/posthog
58,042
defect
fce03a5c77b4d4cc768b4e272f882ccd4c4fc4b9
42c557f873939cef337d1bc607e7c812736df721
fix(signals): If BOT comes to Task with repo+user id, but no team GitHub integration - allow to user user's GitHub integration
<!-- Authoring rules (agents: read). Title: <type>(<scope>): <description> — type=feat|fix|chore, scope required, lowercase, no period, <72 chars. ✅ feat(insights): add retention graph export ❌ feat: Added retention export. (capitalized, period, no scope) Description: high-level rationale,...
diff --git a/products/signals/backend/report_generation/select_repo.py b/products/signals/backend/report_generation/select_repo.py index 4608cb2f0a0f..693a40e7a49a 100644 --- a/products/signals/backend/report_generation/select_repo.py +++ b/products/signals/backend/report_generation/select_repo.py @@ -47,8 +47,10 @@ de...
2
1
1
[{"id": "G0", "claim": "Excluding integrations with `repository_cache=[]` also drops freshly created installations whose cache was never synced (`repository_cache_updated_at` is NULL), so Signals may ignore a valid installation and return `None`/fall back unexpectedly; the reviewer asks to exclude only when the cache h...
null
PostHog__posthog__58044
PostHog/posthog
58,044
defect
8e38549f22ecd6dae8fdb51a7a44ad61d6efe728
dfac0227bcc9da27f4225aa522d34432ee567821
fix(data-warehouse): gate cdc_available on source-level cdc_enabled
## Problem The `incremental_fields` endpoint on external data schemas was returning `cdc_available=true` for postgres sources whose `job_inputs` had no `cdc_enabled` flag set, as long as the team-level CDC feature flag was on. The frontend `SyncMethodForm` trusts this value, so users on a CDC-enabled team saw CDC offe...
diff --git a/products/data_warehouse/backend/api/external_data_schema.py b/products/data_warehouse/backend/api/external_data_schema.py index 08ceb7f3c10d..5dcfe19c7a5a 100644 --- a/products/data_warehouse/backend/api/external_data_schema.py +++ b/products/data_warehouse/backend/api/external_data_schema.py @@ -716,11 +7...
1
1
0
[{"id": "G0", "claim": "The `source.job_inputs and` guard in the `source_cdc_enabled` expression is redundant because the early-return check on lines 685-686 already ensures `source.job_inputs` is truthy, so the superfluous part should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2...
null
PostHog__posthog__58064
PostHog/posthog
58,064
defect
88a8f3a605da4203f4b59ffd2317b3bc3959c7bc
0848a8789bc8cf682f018777d8f28729274fd9fe
fix(ducklake): replace PRAGMA table_info in duckgres verification
## Problem After #58043 made the data imports copy-to-DuckLake path go through duckgres in prod, the workflow now fails verification with: > DuckLake copy verification failed: [{'name': 'data_imports.schema_hash', 'passed': False, ..., 'error': \"the last operation didn't produce a result\"}] The error originates fr...
diff --git a/posthog/temporal/ducklake/ducklake_copy_data_imports_workflow.py b/posthog/temporal/ducklake/ducklake_copy_data_imports_workflow.py index 89776b0a0ecb..6436ad095146 100644 --- a/posthog/temporal/ducklake/ducklake_copy_data_imports_workflow.py +++ b/posthog/temporal/ducklake/ducklake_copy_data_imports_workf...
1
1
0
[{"id": "G0", "claim": "The four new cursor-description tests should be collapsed into one parametrized test per function (@pytest.mark.parametrize over the duckgres/duckdb cursor descriptions) so the 2x2 matrix is explicit in one place.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope"...
null
PostHog__posthog__58065
PostHog/posthog
58,065
defect
2b6c26885047789102528099d1de7a4002539874
1cbe0b4ee7fc803a416d011925675f15f66fdacd
chore(groups): django group list view to personhog
## Problem The groups list and find endpoints (`/api/projects/:id/groups/` and `/groups/find`) read directly from the Django ORM against the persons database. As part of the personhog migration, all person/group data access should route through the personhog gRPC client so we can eventually decommission direct ORM...
diff --git a/ee/clickhouse/views/groups.py b/ee/clickhouse/views/groups.py index 80da628f76d8..8b7ed0084e51 100644 --- a/ee/clickhouse/views/groups.py +++ b/ee/clickhouse/views/groups.py @@ -1,9 +1,10 @@ +import json as _json +import base64 from collections import defaultdict from typing import Any, Optional, cast +f...
2
2
1
[{"id": "G0", "claim": "The ORM cursor filter's ±1 ms window can include items whose created_at is greater than the cursor's true timestamp, duplicating them across pages, and switching to an exact comparison is only safe once the cursor encoder/decoder carries full microsecond precision.", "category": "correctness", "...
null
PostHog__posthog__58140
PostHog/posthog
58,140
defect
f41d2df5383d73cf8d49ca3138523e3dfc2c5663
e0348ff48bffc16cb21b52e986abe8d9fc258f0f
chore(batch-exports): require Integration for BigQuery destinations
## Problem BigQuery batch-export destinations could be created with either a linked Google Cloud Service Account Integration or inline credentials in the destination config. The frontend now only offers the integration path, but the API still accepted both. ## Changes - `posthog/batch_exports/http.py`: - New typed...
diff --git a/posthog/api/test/batch_exports/test_create.py b/posthog/api/test/batch_exports/test_create.py index 707f26542a86..2747bbc8c174 100644 --- a/posthog/api/test/batch_exports/test_create.py +++ b/posthog/api/test/batch_exports/test_create.py @@ -1373,61 +1373,23 @@ def test_creating_http_batch_export_only_allo...
3
1
0
[{"id": "G0", "claim": "The parametrized filter-validation test in test_create.py should be simplified to use only S3 destinations instead of a mix of destinations, so the test does not need to create an integration.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id...
null
PostHog__posthog__58159
PostHog/posthog
58,159
defect
d20667a2e80bc9d9413fb9bb99e6e6266b740b89
9953d62b9b8f220cdc83ff422efbfa23f53121aa
fix(hogli): handle key:: prefix in user.signingkey
## Problem `hogli` reads `git config user.signingkey` to forward the engineer's commit-signing key into devbox sessions. Tools like [Secretive](https://github.com/maxgoedjen/secretive) write the key with a `key::` prefix (the literal-key marker that newer Git versions accept), which `_resolve_local_signing_key()` did ...
diff --git a/tools/hogli-commands/hogli_commands/devbox/cli.py b/tools/hogli-commands/hogli_commands/devbox/cli.py index 2bf0988009ed..7ec02ff07597 100644 --- a/tools/hogli-commands/hogli_commands/devbox/cli.py +++ b/tools/hogli-commands/hogli_commands/devbox/cli.py @@ -353,8 +353,9 @@ def _resolve_local_identity_agent...
2
1
0
[{"id": "G0", "claim": "test_returns_literal_ssh_string and test_strips_key_prefix should be collapsed into a single @pytest.mark.parametrize case per the team's convention, to avoid duplicating the monkeypatch.setattr boilerplate.", "category": "testing", "verdict": "uncertain", "priority": "P2", "scope": "introduced"...
null
PostHog__posthog__58163
PostHog/posthog
58,163
defect
b3d0badfec34cbaf54749c6164a6d1e47416f31d
8813f128a7eb7b4ecc5cb627eaffdf6760113ba8
fix(phai): Freezegun leaks and fails concurrent Temporal workers
<!-- Authoring rules (agents: read). Title: <type>(<scope>): <description> — type=feat|fix|chore, scope required, lowercase, no period, <72 chars. ✅ feat(insights): add retention graph export ❌ feat: Added retention export. (capitalized, period, no scope) Description: high-level rationale,...
diff --git a/products/posthog_ai/scripts/hogql_example/__init__.py b/products/posthog_ai/scripts/hogql_example/__init__.py index 7d6040402808..2511a4e75ed9 100644 --- a/products/posthog_ai/scripts/hogql_example/__init__.py +++ b/products/posthog_ai/scripts/hogql_example/__init__.py @@ -8,18 +8,44 @@ from __future__ ...
3
3
1
[{"id": "G0", "claim": "The post-context assertion `freezegun.freeze_time is original_freeze_time` is superfluous because patch.object always restores the attribute on exit, so it should be removed.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The cla...
null
PostHog__posthog__58169
PostHog/posthog
58,169
defect
16a4765b43fc7c8a7551c12e44c572a2a15aafcf
af6694400782e564558ce556cd9bf78e418c0095
feat(dags): add max_batches knob to get_all_team_ids_op
## Problem Running `backfill_persons_on_events_mode_job` against all teams OOM-killed the dagster runner. The shared dynamic-output op `get_all_team_ids_op` fans every team batch into a parallel `.map`, so peak parallelism (and the per-batch resident set) scales with total team count with no upper bound. ## Changes ...
diff --git a/posthog/dags/common/ops.py b/posthog/dags/common/ops.py index 0befa9371909..c27c00ff0be1 100644 --- a/posthog/dags/common/ops.py +++ b/posthog/dags/common/ops.py @@ -39,6 +39,12 @@ def _filter_team_ids_for_rollout(team_ids: list[int], rollout_percentage: float) is_required=False, ...
1
1
0
[{"id": "G0", "claim": "The four happy-path test methods in TestGetAllTeamIdsOp share an identical structure and should be collapsed into a single parameterized test case, with test_negative_max_batches_rejected kept separate.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
PostHog__posthog__58175
PostHog/posthog
58,175
defect
2199010b70b839184bfd47ab47890bd451e82363
62627a66634237c37b8d5aaae7a2b52e82abe396
fix(clickhouse): route sharded ALTER on satellite clusters via any_ho…
…st_by_roles ## Problem `run_sql_with_exceptions` asserted that any sharded `ALTER TABLE` must target `NodeRole.DATA`. PostHog also runs single-shard satellite clusters (`AI_EVENTS`, `AUX`, `OPS`, `SESSIONS`) hosting replicated MergeTree tables; #58144 loosened the static test guard for those, but the matching ru...
diff --git a/posthog/clickhouse/client/connection.py b/posthog/clickhouse/client/connection.py index 18bbf28c03e4..e41698171c4f 100644 --- a/posthog/clickhouse/client/connection.py +++ b/posthog/clickhouse/client/connection.py @@ -40,6 +40,16 @@ class NodeRole(StrEnum): SESSIONS = "sessions" +# Roles that host...
1
1
1
[{"id": "G0", "claim": "The new any_host_by_roles routing branch has no unit test coverage: nothing asserts that node_roles=[NodeRole.SESSIONS] with sharded=True and is_alter_on_replicated_table=True calls any_host_by_roles rather than map_one_host_per_shard, and a parameterised test patching get_migrations_cluster ove...
null
PostHog__posthog__58180
PostHog/posthog
58,180
defect
940ee1e57bd334a6551bb1ae3c796b46f1f39365
84b41bc29937bd0273d8108df0838663906f99a4
feat(workflows): add manual opt-out entry for messaging preferences
## Problem Customers using workflows and opt-out lists currently have no way to manually add a recipient to their opt-out list. The only paths for adding opt-outs are automated: Customer.io API import, CSV upload, webhook sync, or self-service unsubscribe links. When a customer explicitly requests to be removed from...
diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts index 88eff03a6f8e..fb714c0ceca8 100644 --- a/frontend/src/lib/api.ts +++ b/frontend/src/lib/api.ts @@ -1934,6 +1934,10 @@ export class ApiRequest { return this.environments().current().addPathComponent('messaging_preferences').addPathComponent('op...
6
6
4
[{"id": "G0", "claim": "The addOptOut loader catches errors and returns null instead of rethrowing, so kea-loaders dispatches addOptOutSuccess and closes the modal on API failure, losing the user's input; the catch should rethrow to route to the failure path and keep the modal open.", "category": "correctness", "verdic...
null
PostHog__posthog__58217
PostHog/posthog
58,217
defect
46a1946347615523d95f4cf1e7b5b2ea17ebe919
f2b68b8e0253125b2025c9567b161dbe71fc3fa7
fix(caching): cache empty active-teams result to avoid repeated SELECT
## Problem `is_team_active(team_id)` is a Redis-backed pre-filter that decides whether a team's insights are eligible for background cache refresh, if the team hasn't ingested events in 3 days, none of its insights get pre-computed. The bug: when that SELECT returned `[]`, `_populate_active_teams` returned withou...
diff --git a/posthog/caching/test/test_caching_utils.py b/posthog/caching/test/test_caching_utils.py index 80a3c3e16541..63a1b0a7acfd 100644 --- a/posthog/caching/test/test_caching_utils.py +++ b/posthog/caching/test/test_caching_utils.py @@ -1,16 +1,25 @@ import pytest from unittest.mock import patch -from posthog...
1
1
1
[{"id": "G0", "claim": "When the ClickHouse query returns empty, _populate_active_teams only sets the populated marker without deleting the existing zset, so stale team entries persist and is_team_active, which checks zscore first, can incorrectly return True for no-longer-active teams; the zset must be cleared (pipe.d...
null
PostHog__posthog__58269
PostHog/posthog
58,269
defect
ad2742128f96cfdfbfa755db0f318d5c35012939
3069b4aba9ae8f9964452ab810c9179da956cf32
perf(hogql): cache parsed ASTs with separate built-in / user buckets
## Problem See this trace https://posthog.slack.com/archives/C076E99B152/p1778517796601029 It's not uncommon for us to spend nearly half of the time servicing a request just parsing hogql. Let's try to reduce some of this work by adding a hogql parsing cache. I've split the cache into two, one is for user-generated...
diff --git a/posthog/hogql/parser.py b/posthog/hogql/parser.py index a4f4e2313508..52510884fd82 100644 --- a/posthog/hogql/parser.py +++ b/posthog/hogql/parser.py @@ -1,8 +1,13 @@ +import sys +import copy from collections.abc import Callable -from typing import Literal, cast +from enum import StrEnum +from types impor...
4
4
3
[{"id": "G0", "claim": "The module-level cachetools LRUCache globals are not thread-safe, so in a threaded app concurrent writers can transiently violate the bounded-size invariant; wrapping both caches with a threading.Lock would close the gap.", "category": "correctness", "verdict": "supported", "priority": "P1", "sc...
null
PostHog__posthog__58273
PostHog/posthog
58,273
defect
5adac1ec2bc6c94d946524cd84b3e0e637b6be51
9de9053c30bbcaa83dbf94f54e3642fe095f11d3
feat(replay-vision): add /observe/ endpoint and stub ApplyLensWorkflow
## Problem Phase 1 of Replay Vision needs a way to apply a configured lens to a specific session on demand, end-to-end through Temporal, before any of the heavy machinery (rasterization, provider upload, vision call, signal/event emission) is built. ## Changes - `POST /api/environments/{team_id}/vision/lenses/{id}/o...
diff --git a/.github/workflows/container-images-cd.yml b/.github/workflows/container-images-cd.yml index f52e52112562..cea6269fd3b4 100644 --- a/.github/workflows/container-images-cd.yml +++ b/.github/workflows/container-images-cd.yml @@ -267,6 +267,11 @@ jobs: run: | echo "changed=$((...
8
8
6
[{"id": "G0", "claim": "The two distinct failure modes in test_raises_when_lens_missing_or_wrong_team should be split into separate @pytest.mark.parametrize cases so a first-assertion failure cannot silently skip the second.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id...
null
PostHog__posthog__58314
PostHog/posthog
58,314
defect
8bdd482d7b6b385552a2dbcc17401651f02b5203
34150ab534ba43ad07f8fd9c5520e56f055004e3
fix(data-warehouse): Expand the column
## Problem The top level customerio rows needed a table transformer - otherwise all the `data` is rendered into a single column ## Changes Added the webhook table transformer for customer.io ## How did you test this code? unit tests
diff --git a/posthog/temporal/data_imports/sources/customer_io/source.py b/posthog/temporal/data_imports/sources/customer_io/source.py index 74315b47cc56..c1779379ab39 100644 --- a/posthog/temporal/data_imports/sources/customer_io/source.py +++ b/posthog/temporal/data_imports/sources/customer_io/source.py @@ -1,6 +1,8 ...
6
1
1
[{"id": "G0", "claim": "The transformer drops every top-level field other than event_id and timestamp, including `metric`, which is the only way to distinguish Customer.io email event types within the single email_events table, so `metric` should be preserved (object_type may stay dropped).", "category": "correctness",...
null
PostHog__posthog__58327
PostHog/posthog
58,327
defect
36da565ec093afdc6b86dec89f4d8ef87e83b551
f08f255f30dfd5ffcb1ff23e24d67f0b52d29269
feat(replay-vision): rasterize the session video and fetch analytics events
## Problem Phase 1's `ApplyLensWorkflow` was a stub. This PR makes it fetch the session's analytics events and rasterize the recording video. The provider call lands next. ## Changes Stacked on #58273. Workflow path: ``` create_observation → mark_running → fetch_session_events_activity (NEW: ClickHouse → Redis) →...
diff --git a/products/replay_vision/backend/temporal/__init__.py b/products/replay_vision/backend/temporal/__init__.py index 4cdd8b4eae33..9784a3eadffc 100644 --- a/products/replay_vision/backend/temporal/__init__.py +++ b/products/replay_vision/backend/temporal/__init__.py @@ -3,6 +3,8 @@ from products.replay_visio...
4
2
1
[{"id": "G0", "claim": "The `redis_key is None` guard in fetch_session_events_activity is dead code — get_redis_state_client only returns None when label or state_id is falsy and both are always provided here — so remove it.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced...
null
PostHog__posthog__58328
PostHog/posthog
58,328
defect
2640e596d55ea9fe2a8f28f67deed1b35a64920e
c8da68da0bc4675f87830a8de22fadd9ec7955f4
fix(hogql): fix timezone_info override on compare/previous period ranges
## Problem the special QueryDateRange subclasses QueryCompareToDateRange / QueryPreviousPeriodDateRange were not correctly handling timezone_info overrides <!-- Who are we building for, what are their needs, why is this important? --> <!-- Does this fix an issue? Uncomment the line below with the issue ID to a...
diff --git a/posthog/hogql_queries/utils/query_compare_to_date_range.py b/posthog/hogql_queries/utils/query_compare_to_date_range.py index 35ca0780987f..ce70c90a315b 100644 --- a/posthog/hogql_queries/utils/query_compare_to_date_range.py +++ b/posthog/hogql_queries/utils/query_compare_to_date_range.py @@ -35,7 +35,7 @@...
1
1
1
[{"id": "G0", "claim": "The new test uses the hour-based string \"-48h\", which yields an identical delta mapping under US/Pacific and UTC, so the test would pass even without the timezone fix and needs a day-based relative string (e.g. \"-2d\") to catch a regression.", "category": "testing", "verdict": "supported", "p...
null
PostHog__posthog__58333
PostHog/posthog
58,333
defect
449f5f32df0f467590f28e2fff38263cb44d0bf6
af21a873c18ca5bf177f3767751208bdece91d9e
fix(web-analytics): resolve authorized_urls health issue on team save
## Problem The unified health page (`/health`) showed a stale **Authorized URLs** warning even after a user configured one — the warning persisted until the daily scheduled health-check job ran again (cron `15 8 * * *`). The opposite was also true: removing all authorized URLs did not surface the warning until the n...
diff --git a/posthog/models/team/team.py b/posthog/models/team/team.py index 619560711570..b7c67a3546ea 100644 --- a/posthog/models/team/team.py +++ b/posthog/models/team/team.py @@ -1091,6 +1091,14 @@ def delete_team_in_cache_on_delete(sender, instance: Team, **kwargs): set_team_in_cache(instance.api_token, None)...
2
2
1
[{"id": "G0", "claim": "The post_save signal queues an authorized_urls health-check task on every Team save, and should skip dispatch when a partial update's update_fields does not include app_urls.", "category": "performance", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "eva...
null
PostHog__posthog__58363
PostHog/posthog
58,363
defect
696b444135bb47cb87e210529759f4a646e05c9b
3ea01cbd1e57a362be66f595b857c403945ee43d
chore(web-analytics): Paginate org fetching in the Web Analytics Email Job
<!-- Authoring rules (agents: read). Title: <type>(<scope>): <description> — type=feat|fix|chore, scope required, lowercase, no period, <72 chars. ✅ feat(insights): add retention graph export ❌ feat: Added retention export. (capitalized, period, no scope) Description: high-level rationale,...
diff --git a/products/web_analytics/backend/temporal/weekly_digest/__init__.py b/products/web_analytics/backend/temporal/weekly_digest/__init__.py index 8b5177622109..d0d5b91337f5 100644 --- a/products/web_analytics/backend/temporal/weekly_digest/__init__.py +++ b/products/web_analytics/backend/temporal/weekly_digest/_...
2
1
1
[{"id": "G0", "claim": "When rollout_percentage < 1.0, the code loads all organization IDs from the database into memory and re-fetches them on every page call, which can cause memory issues and O(N x pages) reads that defeat the purpose of pagination.", "category": "performance", "verdict": "supported", "priority": "P...
null
PostHog__posthog__58376
PostHog/posthog
58,376
defect
e550d52800dda16976a0f1bf721bd8409c134406
abcd605c6322971fe2e522eec8a70d4b028110e6
fix: sanitize invite email input instead of failing
<!-- Authoring rules (agents: read). Title: <type>(<scope>): <description> — type=feat|fix|chore, scope required, lowercase, no period, <72 chars. ✅ feat(insights): add retention graph export ❌ feat: Added retention export. (capitalized, period, no scope) Description: high-level rationale,...
diff --git a/posthog/helpers/email_utils.py b/posthog/helpers/email_utils.py index d08d2bb9797f..c8756b22b25f 100644 --- a/posthog/helpers/email_utils.py +++ b/posthog/helpers/email_utils.py @@ -107,6 +107,54 @@ def validate_message_body(value: str | None) -> str | None: return value +def sanitize_display_name...
2
2
1
[{"id": "G0", "claim": "The two sanitize functions are almost identical and should be refactored into a common shared function.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "delegation_invite.html still gates on and renders {{ invite.message }}...
null
PostHog__posthog__58385
PostHog/posthog
58,385
defect
318f4fa14c636c1d67b7316e38cf2d9cb7e05785
6c13cc648b1f2183945d9df3953a5273a1cc78f3
fix(experiments/mcp): Fix pydantic pointing agents to the wrong class for metric types
## Problem The MCP call `experiment-update` dominant source of failures is: `('ExperimentMeanMetric', 'metric_type'), Input should be 'mean'`. This is even shown when the agent submitted a `funnel`, `ratio`, or `retention` metric. `ExperimentMetric` is a non-discriminated `RootModel[Mean | Funnel | Ratio | Retent...
diff --git a/frontend/bin/build-validators.mjs b/frontend/bin/build-validators.mjs index 458b5a42da95..d89e9e23d069 100644 --- a/frontend/bin/build-validators.mjs +++ b/frontend/bin/build-validators.mjs @@ -13,6 +13,11 @@ const schema = JSON.parse(fs.readFileSync(inputPath, 'utf-8')) const ajv = new Ajv({ allowUn...
2
2
0
[{"id": "G0", "claim": "The valid-payload assertions are lumped into one test method; each metric type should be its own parameterized case so failures are reported individually with a descriptive name.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The...
null
PostHog__posthog__58393
PostHog/posthog
58,393
defect
02f423f8d7a184341967bf1edf6ee92beef4889c
4260ad52cfa43ae85cf697defe7544eceea1976f
fix(experiments/mcp): Improve exposure-criteria validation messages
## Problem `experiment-create` / `experiment-update` rejected invalid `exposure_criteria` with a single generic `"Invalid exposure criteria"` message. LLM agents couldn't self-correct and retried the same broken payload. ## Changes - Split `validate_experiment_exposure_criteria` into targeted rejections per fa...
diff --git a/products/experiments/backend/experiment_service.py b/products/experiments/backend/experiment_service.py index c52703ac5a1a..6739265807a8 100644 --- a/products/experiments/backend/experiment_service.py +++ b/products/experiments/backend/experiment_service.py @@ -165,24 +165,79 @@ def validate_experiment_par...
2
2
1
[{"id": "G0", "claim": "The early-return guard `if not exposure_criteria:` short-circuits before the isinstance check, so falsy non-dict values (e.g. [], \"\", False) are silently accepted instead of rejected; the guard should be `if exposure_criteria is None: return` to match `validate_experiment_metrics`.", "category...
null
PostHog__posthog__58428
PostHog/posthog
58,428
defect
9c6ad7aebe85e2ac852ec9c30e2f476090cbb06e
ed324eb6130e98311ee9fbd4171673fcc63e79c1
fix(signals): Reviewer resolution failing on jsonb LOWER
## Problem Users opening Signals reports are getting 500s on the artefacts endpoint - and silently, the agentic autostart path that auto-assigns tasks crashes too. Both end up at the same SQL error: `LOWER(jsonb_column->'login')`, which Postgres refuses with `UndefinedFunction: function lower(jsonb) does not exist`....
diff --git a/products/signals/backend/report_generation/resolve_reviewers.py b/products/signals/backend/report_generation/resolve_reviewers.py index 1aff8e6356ba..5fb4db0ec596 100644 --- a/products/signals/backend/report_generation/resolve_reviewers.py +++ b/products/signals/backend/report_generation/resolve_reviewers....
1
1
0
[{"id": "G0", "claim": "The three `test_resolves_login_via_*` tests, which exercise the same logical path across different identity sources, should be collapsed into a single `@pytest.mark.parametrize` call with a per-source factory.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "i...
null
PostHog__posthog__58503
PostHog/posthog
58,503
defect
4be7a520b070960776a7345aac36a81e0c42f4a4
be4526f27370caef091fe189a3415730db2f6d29
feat(devbox): add --template flag to devbox:start and devbox:task
## Problem `hogli devbox:start` and `hogli devbox:task` were hardcoded to the `posthog-linux` Coder template. The new `posthog-microvm` template (Firecracker microVMs via hogland, landing in posthog-cloud-infra) accepts a different parameter set, so passing posthog-linux's params would error from `coder create`. ## C...
diff --git a/tools/hogli-commands/hogli_commands/devbox/cli.py b/tools/hogli-commands/hogli_commands/devbox/cli.py index b55e4aa4746d..21e0b44f04eb 100644 --- a/tools/hogli-commands/hogli_commands/devbox/cli.py +++ b/tools/hogli-commands/hogli_commands/devbox/cli.py @@ -21,6 +21,7 @@ from . import keychain from .co...
3
3
3
[{"id": "G0", "claim": "Forwarding claude_oauth_token as a `--parameter key=value` CLI flag puts the live OAuth token in the coder subprocess argument list, where any same-UID process can read it via /proc/<pid>/cmdline or ps, instead of the previous protected rich-parameter-file path.", "category": "security", "verdic...
null
PostHog__posthog__58554
PostHog/posthog
58,554
defect
e4b9080926629197f3e1100d9fb41f8a0ddd2065
54623d9329e750f1c29c1e56ca82d8446a31c959
feat(deployments): implement logs endpoint
## Problem The `GET .../deployments/{did}/logs/` action on `DeploymentViewSet` was a stub that returned `{"detail": "Logs proxy not implemented yet"}`. The deployments spec requires this endpoint to surface build logs from the Temporal worker, which emits stdout and stderr as `$log` events on the standard `events` C...
diff --git a/products/deployments/backend/api/deployments.py b/products/deployments/backend/api/deployments.py index c16b1cfa7d9d..2a4fd8e19a95 100644 --- a/products/deployments/backend/api/deployments.py +++ b/products/deployments/backend/api/deployments.py @@ -13,6 +13,7 @@ from django.db.models import Exists, Out...
3
2
1
[{"id": "G0", "claim": "The `has_more` help text says \"older lines may exist beyond this page\", but with `ORDER BY timestamp ASC` the rows beyond the page are the newer lines, so the text is backwards and will mislead API consumers and generated docs.", "category": "documentation", "verdict": "supported", "priority":...
null
PowerDNS__pdns__14617
PowerDNS/pdns
14,617
defect
036a38d561dc83cf5a42981706e10f5b82440819
863fd47fccd744676a0c429922e373a8e6413bdd
rec: dedup records
### Short description <!-- Write a small description of what this Pull Request fixes or provides, including the issue #s --> This deduplicaties records in two places: 1. Records received from authoritative servers (disabled later and replaces by specific dedup call) 2. Records sent out to clients (only on non-p...
diff --git a/pdns/dnsparser.hh b/pdns/dnsparser.hh index 07660b90ea335..757caf6da36b5 100644 --- a/pdns/dnsparser.hh +++ b/pdns/dnsparser.hh @@ -219,6 +219,26 @@ public: return record; } + [[nodiscard]] string wireFormatContent(const DNSName& qname, bool canonic = false, bool lowerCase = false) const + { + ...
8
7
1
[{"id": "G0", "claim": "A small refactoring should be considered to avoid duplicating code between `serialize` and the new `wireFormatContent`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The function `dedup` should perhaps be named `dedupRec...
null
PowerDNS__pdns__14807
PowerDNS/pdns
14,807
defect
dc2139af83a121d14ed4bc93313002a5fe65de92
2d5af4748b76dbfedbc8708f1d96448f2d3f515a
rec: drop ref in mtasker when it is no longer needed
### Short description <!-- Write a small description of what this Pull Request fixes or provides, including the issue #s --> If we do not do that, only the next call of `sendEvent` will release the shared pointer to the `TCPConnectionHandler` in `PacketID` as it overwrites `d_eventkey`. Same for `d_waitval`. This ...
diff --git a/pdns/recursordist/mtasker.hh b/pdns/recursordist/mtasker.hh index a45f64d8326b..a6e30dafef15 100644 --- a/pdns/recursordist/mtasker.hh +++ b/pdns/recursordist/mtasker.hh @@ -30,7 +30,6 @@ #include <boost/multi_index/ordered_index.hpp> #include <boost/multi_index/key_extractors.hpp> -#include "namespace...
3
2
1
[{"id": "G0", "claim": "A stack address (the local waiter object in MTasker::waitEvent) may be assigned to the non-local d_threads[d_tid].highestStackSeen member.", "category": "security", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "In sendEvent (and likewise in schedule's t...
null
PowerDNS__pdns__14897
PowerDNS/pdns
14,897
defect
6be83e2da7e7ca7bd01a2d53ff97f4afbc609124
4af3f152968a1ab823afe2ff2235ea53220a3301
fix register type race
### Short description <!-- Write a small description of what this Pull Request fixes or provides, including the issue #s --> Actually seen in recursor, but auth could also have it in theory. The issue is that you cannot call type register functions while the rest of the threads are doing their work. The actual f...
diff --git a/pdns/auth-main.cc b/pdns/auth-main.cc index 06d874249969..cc8eead13604 100644 --- a/pdns/auth-main.cc +++ b/pdns/auth-main.cc @@ -1210,6 +1210,7 @@ int main(int argc, char** argv) { versionSetProduct(ProductAuthoritative); reportAllTypes(); // init MOADNSParser + DNSRecordContent::lock(); g_pr...
3
3
2
[{"id": "G0", "claim": "Since the PR is about race cases, d_locked should be a std::atomic<bool> rather than a plain bool.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Remove reportBasicTypes()/reportOtherTypes() in favor of reportAllTypes(), make...
null
PowerDNS__pdns__14985
PowerDNS/pdns
14,985
defect
fe75d35ed456cc8af18e078de211002388689241
4a2ec313f7fdec129d249db795b0bbeb1232c484
rec: store authority recs and signatures as shared pointers to const data
### Short description <!-- Write a small description of what this Pull Request fixes or provides, including the issue #s --> Currently, we stored and return vectors, change this to store and return a shared pointer to const vectors. This allows us to return a single shared pointer on get(), avoiding to copy all vec...
diff --git a/pdns/recursordist/aggressive_nsec.cc b/pdns/recursordist/aggressive_nsec.cc index e894666d50a5..a48af4f3750f 100644 --- a/pdns/recursordist/aggressive_nsec.cc +++ b/pdns/recursordist/aggressive_nsec.cc @@ -441,7 +441,7 @@ bool AggressiveNSECCache::getNSEC3(time_t now, std::shared_ptr<LockGuarded<Aggre r...
6
5
2
[{"id": "G0", "claim": "The assert in handleHit()'s else branch is too strict: if the caller passes a *signatures that already holds entries while entry->d_signatures is empty or null, execution reaches the else branch and the assert fires.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope":...
null
PowerDNS__pdns__15040
PowerDNS/pdns
15,040
defect
5557d8c64ef57f5e1832248109908d3074b36600
538c8d3d00ec7bf1aae3dbbafc7c877720d04db4
EDNSSubnetOpts refactoring
### Short description <!-- Write a small description of what this Pull Request fixes or provides, including the issue #s --> Fixes #13704 Uses beter (rfc7871 derived) names for things and introduced encapsulation to hide the internal representation of `EDNSSubnetOpts`. Most of this are mechanical changes, th...
diff --git a/pdns/calidns.cc b/pdns/calidns.cc index 920a4df88c55..8c5d218740ee 100644 --- a/pdns/calidns.cc +++ b/pdns/calidns.cc @@ -243,8 +243,8 @@ void parseQueryFile(const std::string& queryFile, vector<std::shared_ptr<vector< if (!subnet.empty() || addECS) { EDNSSubnetOpts opt; - opt.source = N...
1
1
0
[{"id": "G0", "claim": "Add a `[[nodiscard]] const Netmask& EDNSSubnetOpts::getScope() const` method, since the pattern of building a Netmask from the source network and scope prefix length is repeated in sdig.cc and dnsproxy.cc.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "intro...
null
PowerDNS__pdns__15382
PowerDNS/pdns
15,382
defect
91920de9b64554194be694b9eb73f7b2f4d3148d
fbd96fab883f3a24c88c3c7aa9032fd9165b36fe
[auth] Backend capabilities
### Short description This PR allows backends to report whether they support various capabilities - in spirit, this extends the `doesDNSSEC()` method. This is then used in `pdnsutil` to avoid attempting to perform operations which will fail due to lack of support in the backend, and allows it to provide less crypti...
diff --git a/docs/appendices/backend-writers-guide.rst b/docs/appendices/backend-writers-guide.rst index d67a2ac4a96a1..7fd50f2a25804 100644 --- a/docs/appendices/backend-writers-guide.rst +++ b/docs/appendices/backend-writers-guide.rst @@ -66,14 +66,14 @@ following methods are relevant: class DNSBackend ...
4
4
1
[{"id": "G0", "claim": "The capability method in modules/bindbackend/binddnssec.cc is misspelled as `BInd2Backend::getCapabilities()`, a typo the reviewer expects the compiler to catch on a build without sqlite.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", ...
null
PowerDNS__pdns__15388
PowerDNS/pdns
15,388
defect
9c613b27898943a6130c973d0ea0d5eba2394377
cf6273c78f36f68e36880124e38cdb90747145a6
dnsdist: Enhancement to support rule action for query timeout case
The dnsdist already supports all types of error response code rule action except timeout. Users may want to use the same feature for timeout case. ### Short description <!-- Write a small description of what this Pull Request fixes or provides, including the issue #s --> The PR addresses the feature request https:...
diff --git a/pdns/dnsdistdist/dnsdist-backend.cc b/pdns/dnsdistdist/dnsdist-backend.cc index 33bcc7b6f582..9daae424cc68 100644 --- a/pdns/dnsdistdist/dnsdist-backend.cc +++ b/pdns/dnsdistdist/dnsdist-backend.cc @@ -442,7 +442,6 @@ void DownstreamState::handleUDPTimeout(IDState& ids) { ids.age = 0; ids.inUse = fa...
9
8
4
[{"id": "G0", "claim": "The new documentation section misspells \"timed\" as \"timeed\" in \"For Rules related to timeed out queries:\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The :param DNSrule rule description carries a copy/pasted sente...
null
PowerDNS__pdns__15412
PowerDNS/pdns
15,412
defect
e1a35ccb8055e178237e7d7976e8d180f2724cb0
370c2ae0dbd78dee3baa275c8216f16da5720298
rec: implement DNS cookie support for outgoing requests
### Short description <!-- Write a small description of what this Pull Request fixes or provides, including the issue #s --> Draft, as I need to do some bulk tests. Rebased after the ECS changes, which means the rebase was not trivial at all. Needs thorough checking by myself and reviewers. Moving back to draft....
diff --git a/pdns/ednscookies.cc b/pdns/ednscookies.cc index c390865ef7a01..4accc1997c7cb 100644 --- a/pdns/ednscookies.cc +++ b/pdns/ednscookies.cc @@ -65,6 +65,29 @@ string EDNSCookiesOpt::makeOptString() const return ret; } +string EDNSCookiesOpt::toDisplayString() const +{ + std::string ret = makeHexDump(cli...
49
37
2
[{"id": "G0", "claim": "Changing RECURSOR-MIB.txt requires updating LAST-UPDATED at the top and adding a REVISION entry.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new upgrade-note bullet says 'settings has been introduced' where it should...
null
PowerDNS__pdns__15419
PowerDNS/pdns
15,419
defect
b466a1764f4fddb8cceb18c860e1179954bcfb67
bd99c86427b8b1409a3b78bc617649d7c700a311
dnsdist: Refactor the packet cache settings
### Short description <!-- Write a small description of what this Pull Request fixes or provides, including the issue #s --> We have way too many options to keep adding them to the constructor. ### Checklist <!-- please indicate if any of these things are done/included with this Pull Request. Not all boxes need t...
diff --git a/pdns/dnsdistdist/dnsdist-cache.cc b/pdns/dnsdistdist/dnsdist-cache.cc index 020825306be53..c7ad8a00537a7 100644 --- a/pdns/dnsdistdist/dnsdist-cache.cc +++ b/pdns/dnsdistdist/dnsdist-cache.cc @@ -31,19 +31,21 @@ #include "base64.hh" // NOLINTNEXTLINE(bugprone-easily-swappable-parameters): too cumbersom...
1
1
1
[{"id": "G0", "claim": "The refactor dropped the spare bucket in shard sizing: shard.setSize should divide by shard count and add 1 (as the pre-existing comment about avoiding rehashing at a load factor of 1 still requires), so the rationale for removing that extra capacity should be explained or the + 1 restored.", "c...
null
PowerDNS__pdns__15431
PowerDNS/pdns
15,431
defect
732655a31dd81bc36863a974725380644ac2a550
538522aba0cee712214b7110d47fc944cf211c56
dnsdist: Be consistent with regard to health-check modes transition
### Short description <!-- Write a small description of what this Pull Request fixes or provides, including the issue #s --> Calling `setAuto()` on a backend used to set the health-check mode to `active`, even if it had been set to `lazy` before, which was quite confusing. This commit introduces a new method, `setAu...
diff --git a/pdns/dnsdistdist/dnsdist-backend.cc b/pdns/dnsdistdist/dnsdist-backend.cc index f4feba0bbc5e5..91677ad74dfd8 100644 --- a/pdns/dnsdistdist/dnsdist-backend.cc +++ b/pdns/dnsdistdist/dnsdist-backend.cc @@ -309,7 +309,7 @@ DownstreamState::DownstreamState(DownstreamState::Config&& config, std::shared_p s...
1
1
0
[{"id": "G0", "claim": "Fix the two typos in the getHealthCheckMode() documentation sentence (\"more\" should be \"mode\", \"ud\" should be \"if\"), as offered in the attached suggestion block.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
PowerDNS__pdns__15609
PowerDNS/pdns
15,609
defect
9d8302e2fa92f627abb468515a2b6477caa363be
5f332f62934fbbd8f99bd540c4761034f61e3e90
Packet Cache fixes for views
### Short description When extending the packet cache to become a set of per-view caches, I neglected to perform proper locking of the topmost data structure. There is thus a possibility of multiple receiver threads attempting to create cache data for a newly-found view, and ~hilarity~ memory corruption occurs. Thi...
diff --git a/pdns/auth-packetcache.cc b/pdns/auth-packetcache.cc index fd1605c8e98c2..2be70171685dd 100644 --- a/pdns/auth-packetcache.cc +++ b/pdns/auth-packetcache.cc @@ -43,16 +43,17 @@ AuthPacketCache::AuthPacketCache(size_t mapsCount): d_mapscount(mapsCount), d_la d_statnumentries=S.getPointer("packetcache-size...
1
1
1
[{"id": "G0", "claim": "The packet cache purge in apiServerViewsDELETE only removes the zone's own name and not the names inside the zone (like `www.example.com.` in `example.com.`), so it should purge with a `$` at the end of the name (suffix match); the reviewer notes it is not a new issue in this PR.", "category": "...
null
PowerDNS__pdns__15676
PowerDNS/pdns
15,676
defect
b5fdcfca6d58608ff1015ead3ab52dbba9941c12
487016c7419b4c38e7acace24672f983ad0c5f9d
dnsdist: add a count to track the number of query restarts
### Short description <!-- Write a small description of what this Pull Request fixes or provides, including the issue #s --> Sometimes it is useful to keep tracking the total number of query restarts. This is to add a restartCount field to the query which gets incremented everytime it is restarted. The enhancement al...
diff --git a/pdns/dnsdistdist/dnsdist-idstate.hh b/pdns/dnsdistdist/dnsdist-idstate.hh index a829d3589b49..86db2dcbc2ee 100644 --- a/pdns/dnsdistdist/dnsdist-idstate.hh +++ b/pdns/dnsdistdist/dnsdist-idstate.hh @@ -168,6 +168,7 @@ struct InternalQueryState uint16_t cacheFlags{0}; // DNS flags as sent to the backend ...
2
2
1
[{"id": "G0", "claim": "The doc signature for DNSResponse:getRestartCount() should use `int` instead of `uint8_t`, since Lua only has \"number\" and `int` is consistent with the rest of the docs.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The ...
null
PowerDNS__pdns__15690
PowerDNS/pdns
15,690
defect
3996733315587a57fc0564ad3bc57b8ca3df1731
651b98c6755bf164c78586ad1171f246987f4753
dnsdist: Add Lua APIs to set Meta tags in protobuf messages
### Short description <!-- Write a small description of what this Pull Request fixes or provides, including the issue #s --> Closes https://github.com/PowerDNS/pdns/issues/14901 ### Checklist <!-- please indicate if any of these things are done/included with this Pull Request. Not all boxes need to be checked for...
diff --git a/pdns/dnsdistdist/dnsdist-actions-factory.cc b/pdns/dnsdistdist/dnsdist-actions-factory.cc index 97be48fa5b55..07e8ea9b19d7 100644 --- a/pdns/dnsdistdist/dnsdist-actions-factory.cc +++ b/pdns/dnsdistdist/dnsdist-actions-factory.cc @@ -1637,6 +1637,9 @@ class RemoteLogAction : public DNSAction, public boost:...
3
2
0
[{"id": "G0", "claim": "Mark the parameters of addMetaKeyAndValuesToProtobufContent with [[maybe_unused]], since they are unused when the body is compiled out under DISABLE_PROTOBUF.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Use #if !define...
null
PowerDNS__pdns__15819
PowerDNS/pdns
15,819
defect
b933f54454e8fcaa81dc60bd64f8da1de82b6e99
e5db082886b36f30d9780439249c656ad0738605
dnsdist: Handle named rcodes in the YAML configuration
### Short description <!-- Write a small description of what this Pull Request fixes or provides, including the issue #s --> From now on we accept either their case-insensitive names (e.g. ``refused``), or by their numerical values (e.g. ``"5"``). It is unfortunately not always possible to accept the existing, unquot...
diff --git a/pdns/dns.cc b/pdns/dns.cc index 12f97eaee9e4..d78027d80e2b 100644 --- a/pdns/dns.cc +++ b/pdns/dns.cc @@ -85,6 +85,18 @@ std::string RCode::to_short_s(uint8_t rcode) { return rcodes_short_s.at(rcode); } +std::optional<uint8_t> RCode::from_short(const std::string_view& rcode_string) +{ + uint8_t posi...
2
2
1
[{"id": "G0", "claim": "The documentation is not yet updated and the pull request should not be merged until it is.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "RCode::from_short's manual position-counting loop could be rewritten using std::find...
null
PowerDNS__pdns__15833
PowerDNS/pdns
15,833
defect
92e16091206ebb9cba564566ac608d4e1efeb747
d080884c786b94b07bc1cc447538d5fe9ffe80b6
Fix narrowing conversion on 32-bit systems by using uint64_t instead …
fixes #15830
diff --git a/pdns/dnsdistdist/dnsdist-lua-configuration-items.cc b/pdns/dnsdistdist/dnsdist-lua-configuration-items.cc index e482d4767aa01..dd6d63c194e72 100644 --- a/pdns/dnsdistdist/dnsdist-lua-configuration-items.cc +++ b/pdns/dnsdistdist/dnsdist-lua-configuration-items.cc @@ -38,7 +38,7 @@ struct BooleanConfigurati...
2
1
1
[{"id": "G0", "claim": "omoerbeek is not sure uint64_t is the right type for the maximumValue fields and suspects the limit should be size_t (32-bit) in many cases, leaving the question for further evaluation.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim"...
null
PowerDNS__pdns__15881
PowerDNS/pdns
15,881
defect
d604d754809f724736acaf81e683ecfc0a7ace4b
4614830a4a18e966273fd33cf5b5f5b45a4fae69
dnsdist: Support mnemonics for the Opcode selector
### Short description <!-- Write a small description of what this Pull Request fixes or provides, including the issue #s --> Closes https://github.com/PowerDNS/pdns/issues/15845 ### Checklist <!-- please indicate if any of these things are done/included with this Pull Request. Not all boxes need to be checked for...
diff --git a/pdns/dns.cc b/pdns/dns.cc index 7d1b772a2fff8..df35dfa77f839 100644 --- a/pdns/dns.cc +++ b/pdns/dns.cc @@ -145,6 +145,16 @@ std::string Opcode::to_s(uint8_t opcode) { return s_opcodes.at(opcode); } +std::optional<uint8_t> Opcode::from_lowercase_string(const std::string_view& opcode_string) +{ + sta...
1
1
0
[{"id": "G0", "claim": "Instead of the ugly \"3\" entry, put an empty string in the s_opcodes array and return std::nullopt when position == s_opcodes.end() || position->empty().", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
PowerDNS__pdns__15924
PowerDNS/pdns
15,924
defect
9364aba5458c9b7bd90c82b4801a8d5699c798bb
6f335273f4071998277d19bd34ad36f723c13de4
dnsdist: Refactor server pools and load-balancing policies
### Short description <!-- Write a small description of what this Pull Request fixes or provides, including the issue #s --> Since the refactoring of the runtime configuration, the content of a Server Pool is now in effect immutable (we have to create a new copy and update it), so we no longer have to lock and refere...
diff --git a/pdns/dnsdistdist/Makefile.am b/pdns/dnsdistdist/Makefile.am index 951637a4c6fab..6fb2bbc614e39 100644 --- a/pdns/dnsdistdist/Makefile.am +++ b/pdns/dnsdistdist/Makefile.am @@ -244,6 +244,7 @@ dnsdist_SOURCES = \ dnsdist-rules.cc dnsdist-rules.hh \ dnsdist-secpoll.cc dnsdist-secpoll.hh \ dnsdist-self-...
11
7
2
[{"id": "G0", "claim": "The pool-helper lambdas in dnsdist-lbpolicies.cc declare variables from the structured binding of emplace (\"inserted\", then \"_\") that are never used.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "In the Lua getPool b...
null
PowerDNS__pdns__16039
PowerDNS/pdns
16,039
defect
090263e69744f5c5b2114bcb1c1e348506cfc341
c74339996b732668c1ccce0cedd446fef0048d57
dnsdist: Speed up cache hits by skipping the LB policy when possible
### Short description <!-- Write a small description of what this Pull Request fixes or provides, including the issue #s --> We used to execute the load-balancing policy to select a backend before doing the cache lookup, because in some corner cases the selected backend might have settings that impact our cache looku...
diff --git a/pdns/dnsdistdist/Makefile.am b/pdns/dnsdistdist/Makefile.am index 951637a4c6fab..1e6a6c4d9484f 100644 --- a/pdns/dnsdistdist/Makefile.am +++ b/pdns/dnsdistdist/Makefile.am @@ -410,6 +410,7 @@ testrunner_SOURCES = \ test-dnsdistpacketcache_cc.cc \ test-dnsdistrings_cc.cc \ test-dnsdistrules_cc.cc \ + ...
5
5
1
[{"id": "G0", "claim": "In the new ServerPool::updateConsistency loop the reviewer prefers an early `continue` for the first server instead of keeping the `else` branch.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new getDisableZeroScope/...
null
PowerDNS__pdns__16086
PowerDNS/pdns
16,086
defect
bc97a14ed07af610c58c2b33ba1ae6b57e85f332
069363cf77b9dae0bf9324c69dcef0cd5124073e
dnsdist-1.9.x: Backport 16015 - Don't call `nghttp2_session_send` from a callback
### Short description <!-- Write a small description of what this Pull Request fixes or provides, including the issue #s --> Backport of #16015 to rel/dnsdist-1.9.x ### Checklist <!-- please indicate if any of these things are done/included with this Pull Request. Not all boxes need to be checked for the Pull Req...
diff --git a/pdns/dnsdist-tcp.cc b/pdns/dnsdist-tcp.cc index bbe703760111..fe1317b2f203 100644 --- a/pdns/dnsdist-tcp.cc +++ b/pdns/dnsdist-tcp.cc @@ -1088,26 +1088,6 @@ bool IncomingTCPConnectionState::readIncomingQuery(const timeval& now, IOState& return false; } -class HandlingIOGuard -{ -public: - HandlingIO...
1
1
0
[{"id": "G0", "claim": "Remove the `(void)desc;` line this pull request added in the test_ConnectionReuse lambda, since it is not needed because `desc` is used by the `at(desc)` call below.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null