[codex] Add retargeting description flags#260
Conversation
|
@codex @claude review. Focus on critical issues: bugs, security vulnerabilities, logical errors, data loss risks, performance problems, API contract mismatches, and missing tests. Do NOT nitpick style, naming conventions, minor formatting, or subjective preferences — only flag issues that could break functionality or cause real harm in production. |
|
Claude finished @axisrow's task in 1m 31s —— View job Review of PR #260 — retargeting
|
There was a problem hiding this comment.
Pull request overview
Adds typed --description support to the retargeting CLI so RetargetingList Description is explicitly supported, validated, and reflected in WSDL parity/audit tooling.
Changes:
- Add
--descriptiontodirect retargeting addanddirect retargeting update, with a 4096-character validation guard. - Extend dry-run tests to assert
Descriptionpayload behavior and max-length rejection. - Mark
Description(and existing--rule-covered nested rule paths) as supported in WSDL parity gate + optional-field audit; update README examples.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| direct_cli/commands/retargeting.py | Adds --description options and validates Description length before building request payloads. |
| tests/test_dry_run.py | Adds dry-run coverage for Description payload inclusion and length-limit enforcement. |
| tests/test_wsdl_parity_gate.py | Declares Description (and --rule nested paths) as supported to satisfy parity gate expectations. |
| tests/WSDL_OPTIONAL_FIELD_AUDIT.md | Updates audit classification counts and marks retargeting Description/rule paths as supported. |
| README.md | Updates English/Russian usage examples to include --description. |
| def _validate_description(description: Optional[str]) -> None: | ||
| """Validate RetargetingList*.Description documented API constraints.""" | ||
| if ( | ||
| description is not None | ||
| and len(description) > _RETARGETING_DESCRIPTION_MAX_LENGTH | ||
| ): | ||
| raise click.UsageError( | ||
| "--description must be at most 4096 characters for " | ||
| "RetargetingList*.Description" | ||
| ) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f25fd48ad2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if description: | ||
| list_data["Description"] = description |
There was a problem hiding this comment.
Honor explicit empty --description on retargeting update
The update path drops --description "" because it only forwards Description when description is truthy, so an explicit empty value is silently ignored. In practice, direct retargeting update --id <id> --name ... --description "" updates the name but cannot clear an existing description, even though the CLI accepts the flag. This creates an API contract mismatch for typed input and can leave stale data in production when operators expect a field reset.
Useful? React with 👍 / 👎.
|
Addressed the actionable review feedback in 7163b6c:
Verification:
@codex @claude review. Please re-check only blocking issues: bugs, contract mismatches, and missing tests. |
|
Claude finished @axisrow's task in 3m 0s —— View job Re-review of PR #260 — addressing feedback in 7163b6c
Verdict: LGTM — feedback fully addressed, no blocking issuesFocused re-review per request (bugs, contract mismatches, missing tests). What changed in 7163b6c
Re-check against blocking-issue criteriaAPI contract mismatch — Resolved. The Codex finding that Bugs — None spotted.
Missing tests — None. Boundary coverage is complete:
Parity gate / audit — Performance / security / data loss — N/A. Note on API behavior (informational, not blocking)The change assumes Yandex Direct accepts |
|
Codex Review: Didn't find any major issues. What shall we delve into next? ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
* [codex] Add adgroup tracking params flags (#258) * Add adgroup tracking params flags * test: cover adgroup tracking params add rejection --------- Co-authored-by: axisrow <[email protected]> * [codex] Add sitelink TurboPageId typed input (#259) * feat(sitelinks): support turbo page id * test(sitelinks): cover turbo page json input --------- Co-authored-by: axisrow <[email protected]> * [codex] Add retargeting description flags (#260) * feat(retargeting): add description flags * fix(retargeting): preserve empty description --------- Co-authored-by: axisrow <[email protected]> * [codex] Add adgroups negative keyword flags (#261) * feat(adgroups): add negative keyword flags * fix(adgroups): report invalid negative set ids as usage errors --------- Co-authored-by: axisrow <[email protected]> * [codex] Add vcards nested contact flags (#262) * feat(vcards): add nested contact fields * fix(vcards): preserve grouped flag usage errors --------- Co-authored-by: axisrow <[email protected]> * feat(ads): add text ad extension update flags (#263) Co-authored-by: axisrow <[email protected]> * feat(feeds): add url feed detail flags (#265) Co-authored-by: axisrow <[email protected]> * docs: align optional WSDL audit depth notes * docs: document milestone 18 typed flags --------- Co-authored-by: axisrow <[email protected]>
Summary
Verification
Refs #256