Add keyword scalar autotargeting flags#319
Conversation
|
Claude finished @axisrow's task in 2m 22s —— View job Claude Code Review
Focused review on bugs / contract regressions / scope gaps. Skipping style. 1. README example regression — loss of "normal keyword" demonstration
-direct keywords add --adgroup-id 12345 --keyword "buy laptop" --bid 10500000 --context-bid 5250000 --user-param-1 segment-a --user-param-2 segment-b --dry-run
+direct keywords add --adgroup-id 12345 --keyword "---autotargeting" --bid 10500000 --context-bid 5250000 --autotargeting-search-bid-is-auto YES --priority HIGH --user-param-1 segment-a --user-param-2 segment-b --dry-runAfter this change the README has no example of adding a regular keyword. Recommend keeping the original line and adding the autotargeting line next to it, rather than overwriting — otherwise every user who reads the README to figure out how to add a normal search keyword now sees only the special autotargeting placeholder, which is confusing for the common case. 2. WSDL audit marks both fields
|
There was a problem hiding this comment.
Pull request overview
Adds typed keywords add support for scalar autotargeting fields so single-item payloads can include AutotargetingSearchBidIsAuto and StrategyPriority, and updates WSDL optional-field audit routing + documentation examples accordingly.
Changes:
- Add
--autotargeting-search-bid-is-autoand--priorityflags todirect keywords add(single-item mode) and emit the corresponding scalar fields in the dry-run payload. - Update WSDL optional-field audit + parity gate mappings to mark these fields as supported (and remove the previous follow-up entries for #285).
- Update README one-line
keywords addexamples and add focused CLI/dry-run tests, including rejecting these new flags in batch mode.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
direct_cli/commands/keywords.py |
Adds new typed flags, maps them into single-item payloads, and adds batch-mode rejection for the new flags. |
tests/test_dry_run.py |
Adds dry-run payload shape test for scalar autotargeting fields + batch-mode rejection test. |
tests/test_cli.py |
Ensures keywords add --help documents the new flags. |
tests/test_wsdl_parity_gate.py |
Updates option coverage mappings and removes obsolete missing-followup audit routing for the two fields. |
tests/WSDL_OPTIONAL_FIELD_AUDIT.md |
Moves the two keywords.add fields from missing_followup to supported and updates counts. |
README.md |
Updates one-line usage examples to include the new flags. |
| if batch_mode: | ||
| if autotargeting_search_bid_is_auto is not None or priority is not None: | ||
| raise click.UsageError( | ||
| "--autotargeting-search-bid-is-auto and --priority are " | ||
| "supported only with --keyword single-item mode" | ||
| ) |
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ 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". |
|
Addressed Copilot feedback in 1c180c6: batch mode now rejects all single-item-only flags (--bid, --context-bid, --autotargeting-search-bid-is-auto, --priority, --user-param-1, --user-param-2) instead of silently ignoring them. Re-ran: python3 -m pytest tests/test_dry_run.py -k "keywords_add and batch_mode"; python3 -m pytest tests/test_dry_run.py -k "keywords_add and scalar_autotargeting"; python3 scripts/build_wsdl_optional_field_audit.py --check; python3 -m pytest tests/test_wsdl_parity_gate.py; python3 -m pytest tests/test_cli.py tests/test_dry_run.py tests/test_wsdl_parity_gate.py; mypy . |
|
@codex @claude review. Re-run after addressing batch-mode single-item flag feedback. Focus on critical issues: bugs, security vulnerabilities, logical errors, data loss risks, documentation or test contract regressions, and issue-scope gaps. Do not nitpick style, naming, minor formatting, or subjective preferences. |
|
Claude finished @axisrow's task in 2m 55s —— View job Claude Code Re-Review
Re-reviewed after Looks good in the fix
Remaining critical concerns (carried over)1. README example regression — still not addressed
2. Batch-rejection test still doesn't exercise
|
|
Codex Review: Didn't find any major issues. Swish! ℹ️ 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". |
|
Addressed Claude review feedback in e29281e: restored regular keyword README examples and added autotargeting examples as adjacent lines; made scalar batch rejection cover both new flags explicitly; annotated WSDL audit supported rows as single-item support with batch/from-file parity tracked in #289. Re-ran: python3 -m pytest tests/test_dry_run.py -k "keywords_add and (batch_mode or scalar_autotargeting)"; python3 scripts/build_wsdl_optional_field_audit.py --check; python3 -m pytest tests/test_wsdl_parity_gate.py; python3 -m pytest tests/test_cli.py tests/test_dry_run.py tests/test_wsdl_parity_gate.py; mypy . |
|
@codex @claude review. Re-run after addressing README, batch coverage test, and audit note feedback. Focus on critical issues: bugs, security vulnerabilities, logical errors, data loss risks, documentation or test contract regressions, and issue-scope gaps. Do not nitpick style, naming, minor formatting, or subjective preferences. |
|
Claude finished @axisrow's task in 3m 1s —— View job Claude re-review for @axisrow
Re-reviewed at e29281e against the three previous findings + the Copilot batch-silent-data-loss note. All four are addressed; I have no remaining critical issues. Previous findings — status1. README regular-keyword example regression — fixed. 2. WSDL audit overstating coverage — fixed.
The same notes mirror the in-code audit dict ( 3. Batch-rejection test asymmetry — fixed. Copilot finding (silent batch drop of
|
|
Addressed remaining stale review/disclosure items in 6024002 and PR body: batch rejection test now also covers --user-param-2, PR description explicitly calls out the user-visible batch-mode rejection for all single-item-only flags, and previous e29281e already restored regular README examples plus audit #289 notes. Re-ran full local suite and mypy. |
|
@codex @claude review. Final re-run after adding user-param-2 batch rejection coverage and updating the PR body disclosure. Focus on critical issues: bugs, security vulnerabilities, logical errors, data loss risks, documentation or test contract regressions, and issue-scope gaps. Do not nitpick style, naming, minor formatting, or subjective preferences. |
|
Claude finished @axisrow's task in 2m 8s —— View job Claude Code Final Re-Review
All four items from the previous review are resolved. No new critical issues found. The PR is in good shape for merge. Resolved
Verified looks-good in final state
No blocking issues. Approves intent (not a formal GitHub approval, which I can't issue). · Branch: |
|
Codex Review: Didn't find any major issues. Another round soon, please! ℹ️ 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". |
|
Final review triage: FIX - Copilot batch-mode silent-ignore feedback addressed in 1c180c6 and covered further in 6024002. FIX - Claude README/test/audit/disclosure feedback addressed in e29281e, 6024002, and PR body update. Final Claude re-review confirms all items resolved; Codex found no major issues; independent scope review was COMPLETE; CI is green. No blocking/actionable comments remain. Merging. |
Summary:
Docs checked:
Verification:
Closes #285