Repository navigation
Fix the conversion-rule create path - #33
Open
amitl-levi wants to merge 1 commit into
Open
amitl-levi wants to merge 1 commit into
amitl-levi wants to merge 1 commit into
Conversation
Two defects made every conversion-rule create the plugin described fail. The tool table, the agent's tool reference and the write-surface reference all listed `status` among the fields to send on `create_conversion_rule`. That tool has no `status` parameter and its schema is closed, so the unknown field failed the whole call rather than being dropped. `status` is now documented as update-only, with the closed schema named at the point of use. The duplicate-event pre-check read `status="ACTIVE"` only, while the platform applies no status filter at all. A retired rule still holds its event name, so the pre-check cleared names the create then rejected, after the user had already confirmed. A create's pre-read is now unfiltered and paged to the stated total, which is also the only read that can settle the event half. Three qualifications bound that rule, each wrong in a different direction if dropped: the check runs only when the rule being created is EVENT_BASED (a BASIC create is exempt, but only with `event_name` exactly `page_view`); it then matches any rule on the account holding that name, whatever its type; and it is scoped to the single account while the rule listing also returns the parent network's rules and the account's own children's, so a row counts as a collision only when its `advertiser_id` is the write-target account. "Retire the incumbent, then create mine" was never a working move, and the plugin used to offer it. It ends in a second rejected create with the incumbent's reporting stopped across every campaign using it. The two honest options are updating the incumbent or picking a different event name. Tests: W10 fails a status-filtered pre-read and a `status` in the create payload, pins run-unique names so the write suite can be run more than once, and gains a network-account variant where the create must proceed. W12 gains a second variant against a retired incumbent. W14 no longer accepts retire-and-recreate for an immutable field. W15's event-name guarantee is scoped to EVENT_BASED rules. Checked against the Realize platform and MCP sources at their default branches on 2026-11-07. Upstream's text disagrees in two places and is recorded as such. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two defects made every conversion-rule create the plugin described fail. Both are documentation-only; no behaviour in this repo is executable.
1.
statuswas listed as a field to send on createThe tool table, the agent's tool reference and the write-surface reference all listed
statusamong the fields forcreate_conversion_rule. That tool has nostatusparameter, and its schema is closed — so the unknown field failed the whole call rather than being dropped. The rule is always created ACTIVE.statusis now documented as update-only, with the closed schema named at the point of use.2. The duplicate-event pre-check looked only at ACTIVE rules
The platform applies no status filter to its event-name uniqueness check. A retired rule still holds its event name, so the pre-check cleared names the create then rejected — after the user had already confirmed.
A create's pre-read is now unfiltered and paged to the stated
total, which is also the only read that can settle the event half (there is noevent_namefilter, andsearch_textmatchesdisplay_nameonly). The ACTIVE-filtered listing for a user-facing read is unchanged and still correct.Three qualifications bound that rule
Each one is wrong in a different direction if dropped, and all three are now stated wherever the rule is:
EVENT_BASED. ABASICcreate is exempt — but only withevent_nameexactlypage_view; any other name on aBASICrule is rejected outright, and the tool schema does not block it.ENGAGEMENTrule blocks it too.advertiser_idis the write-target account. Without this, the newly-unfiltered pre-read refuses legal creates on every network-attached account.3. "Retire the incumbent, then create mine" was never a working move
The plugin used to offer it. Because the name stays taken, it ends in a second rejected create with the incumbent's conversion reporting stopped across every campaign using it. The two honest options — update the incumbent, or pick a different event name — are what the skill now presents.
Tests
status-filtered pre-read and astatusin the create payload; pins run-uniquedisplay_nameandevent_nameso the write suite can be run more than once (a retired rule keeps both names and there is no delete tool); gains a network-account variant where the parent holds the name and the create must proceed.EVENT_BASEDrules.Verification
Checked against the Realize platform and MCP sources at their default branches on 2026-11-07, in a dedicated source-verification pass alongside three rounds of review. Upstream's tool text disagrees in two places — the
create_conversion_ruledescription states the ACTIVE-only rule, and theevent_namefield description states outright that a second rule is accepted once the incumbent is DISABLED. The plugin records the platform behaviour and flags the disagreement with the date checked, per the repo convention. Drop those notes when upstream fixes its text.Version
No bump.
0.5.5is still unreleased, and these are corrections to statements inside that same unreleased section. #25 and #30 both claim0.5.6and #32 claims0.5.7— adding a fourth claimant seemed worse than leaving it. Happy to bump if you'd rather.🤖 Generated with Claude Code