Skip to content

Fix the conversion-rule create path - #33

Open
amitl-levi wants to merge 1 commit into
mainfrom
fix/conversion-rule-create
Open

amitl-levi wants to merge 1 commit into
mainfrom
fix/conversion-rule-create

Conversation

@amitl-levi

Copy link
Copy Markdown
Collaborator

Two defects made every conversion-rule create the plugin described fail. Both are documentation-only; no behaviour in this repo is executable.

1. status was listed as a field to send on create

The tool table, the agent's tool reference and the write-surface reference all listed status among the fields for 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. The rule is always created ACTIVE.

status is 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 no event_name filter, and search_text matches display_name only). 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:

  • 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; any other name on a BASIC rule is rejected outright, and the tool schema does not block it.
  • It then matches any rule on the account holding that name, whatever that rule's type — an account-owned ENGAGEMENT rule blocks it too.
  • 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. 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

  • W10 fails a status-filtered pre-read and a status in the create payload; pins run-unique display_name and event_name so 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.
  • W12 gains a second variant that re-runs the duplicate-event guard against a retired incumbent — the case an ACTIVE-only read lets through.
  • W14 no longer accepts retire-and-recreate as the answer to an immutable field.
  • W15's event-name guarantee is scoped to EVENT_BASED rules.
  • The run-order chain in the test preamble now names every scenario in it.

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_rule description states the ACTIVE-only rule, and the event_name field 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.5 is still unreleased, and these are corrections to statements inside that same unreleased section. #25 and #30 both claim 0.5.6 and #32 claims 0.5.7 — adding a fourth claimant seemed worse than leaving it. Happy to bump if you'd rather.

🤖 Generated with Claude Code

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>
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