Classify audiencetargets add bid flags (#302)#311
Conversation
|
Claude finished @axisrow's task in 2m 4s —— View job Claude Code Review
Overall: small, focused, on-spec — classifies the two optional WSDL rows correctly, enum matches the schema, audit + parity-gate map both updated, dry-run test covers happy path and rejection. Two follow-ups worth raising; nothing blocking. What's right
Issues / nits1. (Follow-up) Same @click.option("--priority", help="Strategy priority")The setBids request uses the same 2. (Nit) 3. (Nit) · branch |
There was a problem hiding this comment.
Pull request overview
This PR updates the audiencetargets add CLI command to fully support the optional bid-related WSDL fields by routing them to existing typed flags, validating --priority against the documented PriorityEnum, and updating parity/audit and dry-run coverage accordingly.
Changes:
- Added
click.Choicevalidation foraudiencetargets add --priority(LOW/NORMAL/HIGH, case-insensitive) and normalized the outgoing payload value. - Routed WSDL optional-field parity for
audiencetargets.add(ContextBid,StrategyPriority) to--bid/--priorityand marked them as supported in the optional-field audit. - Expanded dry-run tests to cover normalized priority input and rejection of invalid enum values.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
direct_cli/commands/audiencetargets.py |
Validates and normalizes --priority for audiencetargets add, ensuring correct StrategyPriority payload shape. |
tests/test_dry_run.py |
Updates/extends dry-run tests to assert normalized priority output and invalid priority rejection. |
tests/test_wsdl_parity_gate.py |
Maps audiencetargets.add optional WSDL fields (ContextBid, StrategyPriority) to the corresponding CLI flags to satisfy the parity gate. |
tests/WSDL_OPTIONAL_FIELD_AUDIT.md |
Updates optional-field audit counts and reclassifies the two audiencetargets.add rows as supported. |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ 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". |
|
Feedback classification after review-cycle:
No blocking/actionable feedback remains for #302. |
Summary
Official docs checked: https://yandex.ru/dev/direct/doc/ru/audiencetargets/add
Verification
Closes #302