Add ShoppingAd and ListingAd typed flags for ads add#339
Conversation
|
@codex @claude review. Focus on critical issues: bugs, security vulnerabilities, logical errors, data loss risks, performance problems, API contract mismatches, tests/docs/audit integrity, and issue scope completeness. Do NOT nitpick style, naming conventions, minor formatting, or subjective preferences; only flag issues that could break functionality, API correctness, or the accepted issue scope. |
|
Claude finished @axisrow's task in 5m 24s —— View job Claude PR Review
VerdictLooks good — no critical correctness, security, or data-loss bugs found. Payload shapes match WSDL ( A few non-blocking issues worth flagging: 1. Asymmetric
|
There was a problem hiding this comment.
Pull request overview
Adds first-class typed flag support for SHOPPING_AD and LISTING_AD in direct ads add, aligning CLI payload construction with the official Yandex Direct docs and updating the WSDL optional-field parity gates/docs accordingly.
Changes:
- Implemented feed-based ad subtype payload building for
ads add(requiredFeedId+ exactly oneDefaultTexts, plus optional feed filters/sources/extensions). - Updated CLI help and README examples to document the new subtype flags and constraints.
- Marked the relevant WSDL optional-field audit rows as supported and added/updated parity-gate + dry-run tests to lock payload shape and validation.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
direct_cli/commands/ads.py |
Adds SHOPPING_AD/LISTING_AD typed flags, subtype allow-lists, and payload builder for add requests. |
tests/test_dry_run.py |
Adds dry-run payload shape assertions and local validation/error-message coverage for the new subtypes. |
tests/test_cli.py |
Extends ads add --help assertions to include the new types and documented flags. |
README.md |
Adds single-line examples and brief docs for SHOPPING_AD/LISTING_AD creation flags. |
tests/test_wsdl_parity_gate.py |
Routes the new optional WSDL paths to the typed flags (and removes the old followup placeholders). |
tests/WSDL_OPTIONAL_FIELD_AUDIT.md |
Updates generated audit classification to reflect newly supported ShoppingAd/ListingAd add paths. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 02bb0286a6
ℹ️ 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".
| parsed_default_texts = _parse_required_csv_strings(default_texts, "--default-texts") | ||
| if parsed_default_texts and len(parsed_default_texts) != 1: | ||
| raise click.UsageError( |
There was a problem hiding this comment.
Accept --default-texts as a raw text value
--default-texts is documented here as a single text value, but this code parses it with CSV splitting before enforcing cardinality. As a result, a valid single default text containing punctuation like a comma (for example "Sale, today") is split into multiple items and then rejected by the exactly one value check. That makes a legitimate ShoppingAd/ListingAd.DefaultTexts input impossible to pass and causes false CLI validation failures.
Useful? React with 👍 / 👎.
|
@codex @claude review. Follow-up after addressing the DefaultTexts comma handling feedback. Focus on critical issues: bugs, security vulnerabilities, logical errors, data loss risks, performance problems, API contract mismatches, tests/docs/audit integrity, and issue scope completeness. Do NOT nitpick style, naming conventions, minor formatting, or subjective preferences; only flag issues that could break functionality, API correctness, or the accepted issue scope. |
|
Claude finished @axisrow's task in 2m 38s —— View job Claude PR Review (follow-up)
VerdictThe comma-handling fix in One follow-up from the previous review is now more pronounced and worth a separate ticket, plus the other two from the previous review still stand: 1. Update path silently splits
|
|
Codex Review: Didn't find any major issues. Breezy! ℹ️ 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". |
|
Review triage:
|
Summary
Verification
Official docs checked: https://yandex.ru/dev/direct/doc/en/ads/add
Closes #275