Skip to content

fix(tasks): bucket the title gateway flag per user - #127943

Merged
trunk-io[bot] merged 1 commit into
masterfrom
fix/task-title-flag-bucketing
Nov 3, 2026
Merged

trunk-io[bot] merged 1 commit into
masterfrom
fix/task-title-flag-bucketing

Conversation

@charlesvien

Copy link
Copy Markdown
Member

Problem

The tasks-title-ai-gateway flag was checked with a fixed distinct id, so any rollout percentage sent either every task title through the gateway or none (follow-up to #127830).

Changes

  • create_task passes the creator's distinct id to generate_task_title and the flag buckets on it.
  • Tasks without a creator get a random id per call so the percentage still holds.
  • Analytics attribution keeps the fixed task-title-generator id.

How did you test

New parametrized test for the flag distinct id, plus the title, facade and warm facade suites locally.

@trunk-io

trunk-io Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

😎 Merged successfully - details.

@charlesvien

Copy link
Copy Markdown
Member Author

@PostHog review --deep

@parameterai

parameterai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Risk: No findings

This change buckets the tasks-title-ai-gateway feature flag on the task creator's distinct id (or a random per-call id when there is no creator) instead of a fixed constant, so percentage rollouts apply per user; the LLM client keeps the fixed task-title-generator attribution id. The distinct id is server-assigned and only reaches the internal PostHog analytics flag call, so no new attacker-controlled input or security boundary is introduced.

Sentinel reviewed 63841cc · Review settings

@posthog

posthog Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@charlesvien PostHog Review is reviewing this pull request.

@github-actions github-actions Bot added the feature/agent-infra Feature Tag: Agent infra label Nov 3, 2026
@pr-assigner-resolver-posthog
pr-assigner-resolver-posthog Bot requested a review from a team November 3, 2026 04:10
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🤖 CI report

⚠️ Trunk lane — backend Python lane

This PR is assigned to the backend Python lane. It runs backend Python tests and may merge in parallel with PRs in other lanes.

✅ Duplication (Python) — clean

New Python code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.

✅ Duplication (TypeScript) — clean

New TypeScript code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.

@posthog

posthog Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

PostHog Review · Deep · reviewed 63841cc

Nothing to post.

Step Status Result
Prepare the diff done 2 files, 1 chunk
Pick perspectives done 3 perspectives
Run review passes done 0 issues
Merge overlapping findings done 0 → 0
Validate findings done
Publish done Nothing to post

Someone relaxing in a sunny garden

@charlesvien

Copy link
Copy Markdown
Member Author

@PostHog stamp

@posthog

posthog Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@charlesvien Stamphog is reviewing this pull request.

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

The task write-path change has owning-team authorship and focused test coverage. No unresolved substantive concerns or other refusal grounds were found; the partial automated review does not count as independent review assurance.

  • Author wrote 30% of the modified lines and has 41 merged PRs in these paths (familiarity MODERATE).
  • PostHog Review (Deep) reviewed the current head (no findings) but skipped 2 changed files, so it does not count as assurance.
Gate mechanics and policy version
Gate Result
prerequisites ✓ all clear
deny-list ✓ no deny categories matched
size ✓ 17L, 2F substantive, 47L/4F incl. docs/generated/snapshots — within ceiling
tier ✓ T1-agent / T1b-small (47L, 4F, single-area, fix)
stamphog 2.7.0 .stamphog/policy.yml @ 63841cc · reviewed head 63841cc

@trunk-io
trunk-io Bot merged commit 526022d into master Nov 3, 2026
274 checks passed
@trunk-io
trunk-io Bot deleted the fix/task-title-flag-bucketing branch November 3, 2026 04:43
@deployment-status-posthog

deployment-status-posthog Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-11-03 05:09 UTC Run
prod-us ✅ Deployed 2026-11-03 05:35 UTC Run
prod-eu ✅ Deployed 2026-11-03 05:35 UTC Run

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

Labels

feature/agent-infra Feature Tag: Agent infra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant