Skip to content

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

Open
Radu-Raicea wants to merge 2 commits intomasterfrom
fix/ai-prompts-deterministic-project-token
Open

fix(ai): bind prompt reads to project token#433
Radu-Raicea wants to merge 2 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-16 17:03:44 UTC
Duration: 159367ms

✅ 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 1507ms
Format Validation.Event Has Lib Properties 1508ms
Format Validation.Distinct Id Is String 1506ms
Format Validation.Token Is Present 1507ms
Format Validation.Custom Properties Preserved 1507ms
Format Validation.Event Has Timestamp 1507ms
Retry Behavior.Retries On 503 9518ms
Retry Behavior.Does Not Retry On 400 3505ms
Retry Behavior.Does Not Retry On 401 3507ms
Retry Behavior.Respects Retry After Header 9513ms
Retry Behavior.Implements Backoff 23529ms
Retry Behavior.Retries On 500 7502ms
Retry Behavior.Retries On 502 7512ms
Retry Behavior.Retries On 504 7512ms
Retry Behavior.Max Retries Respected 23530ms
Deduplication.Generates Unique Uuids 1496ms
Deduplication.Preserves Uuid On Retry 7515ms
Deduplication.Preserves Uuid And Timestamp On Retry 14513ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 7516ms
Deduplication.No Duplicate Events In Batch 1504ms
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 7513ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant