Skip to content

fix(ai): bind prompt reads to project token#433

Merged
Radu-Raicea merged 3 commits intomasterfrom
fix/ai-prompts-deterministic-project-token
Feb 17, 2026
Merged

fix(ai): bind prompt reads to project token#433
Radu-Raicea merged 3 commits intomasterfrom
fix/ai-prompts-deterministic-project-token

Conversation

@Radu-Raicea
Copy link
Member

Summary

  • bind prompt fetches to personal + project keys in Prompts
  • add token query param to prompt fetch URL for deterministic project resolution
  • update prompt tests for tokenized URLs and missing project key validation

Testing

  • uv run pytest posthog/test/ai/test_prompts.py

@Radu-Raicea Radu-Raicea requested a review from a team February 16, 2026 16:57
@github-actions
Copy link
Contributor

github-actions bot commented Feb 16, 2026

posthog-python Compliance Report

Date: 2026-02-17 16:59:10 UTC
Duration: 159376ms

✅ All Tests Passed!

29/29 tests passed


Capture Tests

29/29 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields 516ms
Format Validation.Event Has Uuid 1508ms
Format Validation.Event Has Lib Properties 1507ms
Format Validation.Distinct Id Is String 1507ms
Format Validation.Token Is Present 1507ms
Format Validation.Custom Properties Preserved 1507ms
Format Validation.Event Has Timestamp 1507ms
Retry Behavior.Retries On 503 9519ms
Retry Behavior.Does Not Retry On 400 3506ms
Retry Behavior.Does Not Retry On 401 3507ms
Retry Behavior.Respects Retry After Header 9510ms
Retry Behavior.Implements Backoff 23532ms
Retry Behavior.Retries On 500 7505ms
Retry Behavior.Retries On 502 7509ms
Retry Behavior.Retries On 504 7512ms
Retry Behavior.Max Retries Respected 23531ms
Deduplication.Generates Unique Uuids 1498ms
Deduplication.Preserves Uuid On Retry 7511ms
Deduplication.Preserves Uuid And Timestamp On Retry 14517ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 7512ms
Deduplication.No Duplicate Events In Batch 1508ms
Deduplication.Different Events Have Different Uuids 1507ms
Compression.Sends Gzip When Enabled 1507ms
Batch Format.Uses Proper Batch Structure 1507ms
Batch Format.Flush With No Events Sends Nothing 1005ms
Batch Format.Multiple Events Batched Together 1505ms
Error Handling.Does Not Retry On 403 3509ms
Error Handling.Does Not Retry On 413 3507ms
Error Handling.Retries On 408 7514ms

@Radu-Raicea Radu-Raicea enabled auto-merge (squash) February 17, 2026 16:56
@Radu-Raicea Radu-Raicea merged commit 23dae56 into master Feb 17, 2026
21 checks passed
@Radu-Raicea Radu-Raicea deleted the fix/ai-prompts-deterministic-project-token branch February 17, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants