Skip to content

Commit 4be060d

Browse files
committed
Release v0.6.0: shared negative keyword list append + remove
Ships PR #15 (shared-list lifecycle completion) plus two review follow-ups: - Reorder write evals to 8 → 9 → 10 so the file scans sensibly. - Expand the remove_entity docstring in ads/write.py to enumerate every supported entity_type and its composite entity_id format — previously it only mentioned keyword/negative_keyword/ad/ad_group/campaign, which had grown stale as shared_criterion, campaign_asset, asset, and customer_asset were added.
1 parent 3ca9eee commit 4be060d

4 files changed

Lines changed: 35 additions & 20 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "adloop"
3-
version = "0.5.2"
3+
version = "0.6.0"
44
description = "Stop switching between Google Ads, GA4, and your code editor to figure out why conversions dropped."
55
readme = "README.md"
66
authors = [

src/adloop/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import sys
44

5-
__version__ = "0.5.2"
5+
__version__ = "0.6.0"
66

77

88
def main() -> None:

src/adloop/ads/write.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -555,11 +555,26 @@ def remove_entity(
555555
entity_type: str = "",
556556
entity_id: str = "",
557557
) -> dict:
558-
"""Draft removing an entity (keyword, negative_keyword, ad, ad_group, campaign).
558+
"""Draft removing an entity — returns preview.
559+
560+
Supported ``entity_type`` values: ``campaign``, ``ad_group``, ``ad``,
561+
``keyword``, ``negative_keyword``, ``shared_criterion``, ``campaign_asset``,
562+
``asset``, ``customer_asset``.
563+
564+
Composite ``entity_id`` formats:
565+
566+
- ``keyword``: ``adGroupId~criterionId``
567+
- ``negative_keyword``: ``campaignId~criterionId`` (use the ``resource_id``
568+
field from ``get_negative_keywords``)
569+
- ``shared_criterion``: ``sharedSetId~criterionId`` (use the ``resource_id``
570+
field from ``get_negative_keyword_list_keywords``)
571+
- ``campaign_asset``: ``campaignId~assetId~fieldType``
572+
- ``customer_asset``: ``assetId~fieldType``
573+
- ``asset``: bare asset ID
559574
560575
This is a DESTRUCTIVE operation — removed entities cannot be re-enabled.
561-
For keywords and negative keywords, this fully deletes the criterion.
562-
Returns a preview; call confirm_and_apply to execute.
576+
Prefer ``pause_entity`` unless the user explicitly wants permanent removal.
577+
Call ``confirm_and_apply`` with the returned plan_id to execute.
563578
"""
564579
from adloop.safety.guards import SafetyViolation, check_blocked_operation
565580
from adloop.safety.preview import ChangePlan, store_plan

tests/evals/write.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,14 @@
8383
]
8484
},
8585
{
86-
"id": 10,
87-
"prompt": "Remove 'test keyword' from my 'Brand negatives' shared negative keyword list.",
88-
"expected_output": "Should call get_negative_keyword_lists to find the shared_set_id, then get_negative_keyword_list_keywords to find the target criterion's resource_id, then remove_entity with entity_type='shared_criterion' and the resource_id as entity_id. Should warn that removal is irreversible and wait for confirmation.",
86+
"id": 8,
87+
"prompt": "Apply the change from plan id abc123, make it live not dry run",
88+
"expected_output": "Should confirm the user has reviewed the preview, call confirm_and_apply with dry_run=false, remind about require_dry_run config override.",
8989
"expectations": [
90-
"Calls get_negative_keyword_lists to find the shared_set_id of 'Brand negatives'",
91-
"Calls get_negative_keyword_list_keywords to find the resource_id for 'test keyword'",
92-
"Calls remove_entity with entity_type='shared_criterion' and the resource_id as entity_id",
93-
"Warns that the removal is irreversible before proceeding",
94-
"Presents the preview and waits for user confirmation"
90+
"Confirms the user has reviewed the preview before applying",
91+
"Calls confirm_and_apply with dry_run=false",
92+
"Mentions or reminds about the require_dry_run config safety override",
93+
"Notes that all operations are logged to audit.log"
9594
]
9695
},
9796
{
@@ -107,14 +106,15 @@
107106
]
108107
},
109108
{
110-
"id": 8,
111-
"prompt": "Apply the change from plan id abc123, make it live not dry run",
112-
"expected_output": "Should confirm the user has reviewed the preview, call confirm_and_apply with dry_run=false, remind about require_dry_run config override.",
109+
"id": 10,
110+
"prompt": "Remove 'test keyword' from my 'Brand negatives' shared negative keyword list.",
111+
"expected_output": "Should call get_negative_keyword_lists to find the shared_set_id, then get_negative_keyword_list_keywords to find the target criterion's resource_id, then remove_entity with entity_type='shared_criterion' and the resource_id as entity_id. Should warn that removal is irreversible and wait for confirmation.",
113112
"expectations": [
114-
"Confirms the user has reviewed the preview before applying",
115-
"Calls confirm_and_apply with dry_run=false",
116-
"Mentions or reminds about the require_dry_run config safety override",
117-
"Notes that all operations are logged to audit.log"
113+
"Calls get_negative_keyword_lists to find the shared_set_id of 'Brand negatives'",
114+
"Calls get_negative_keyword_list_keywords to find the resource_id for 'test keyword'",
115+
"Calls remove_entity with entity_type='shared_criterion' and the resource_id as entity_id",
116+
"Warns that the removal is irreversible before proceeding",
117+
"Presents the preview and waits for user confirmation"
118118
]
119119
}
120120
]

0 commit comments

Comments
 (0)