Skip to content

fix: correct targeting payload format in migration skill#15

Merged
vahidlazio merged 1 commit into
mainfrom
fix/targeting-payload-format
May 25, 2026
Merged

fix: correct targeting payload format in migration skill#15
vahidlazio merged 1 commit into
mainfrom
fix/targeting-payload-format

Conversation

@vahidlazio
Copy link
Copy Markdown
Collaborator

Summary

  • Fixed the Operator Mapping Reference in skills/migrate-posthog/SKILL.md to use the correct Confidence Targeting proto format (criteria/expression with named ref references)
  • The old format used nested rule objects ({"or": {"operands": [{"eqRule": ...}]}}) which was silently parsed as empty targeting by the proto parser's ignoringUnknownFields(), creating rules that matched ALL contexts
  • Updated all 10 flag payloads in the migration plan to use the correct format
  • Added complete examples for every operator type (equality, IN, NOT IN, AND, range, startsWith, endsWith)

Test plan

  • Verify migration plan payloads parse correctly against Confidence Targeting proto
  • Run /migrate-posthog execute and confirm targeting rules have actual conditions (not match-all)
  • Verify resolveFlag with matching and non-matching context returns correct results

🤖 Generated with Claude Code

@vahidlazio vahidlazio force-pushed the fix/targeting-payload-format branch from f068245 to 5096f79 Compare May 25, 2026 11:09
The Confidence Targeting proto uses a criteria/expression pattern with
named references, not nested rule objects. The old format was silently
parsed as empty targeting (matching all contexts) due to
ignoringUnknownFields() in the proto parser.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vahidlazio vahidlazio force-pushed the fix/targeting-payload-format branch from 5096f79 to 2e58c68 Compare May 25, 2026 11:18
@vahidlazio vahidlazio merged commit ff9fa09 into main May 25, 2026
1 check passed
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