Add URL feed detail flags#265
Conversation
|
@codex @claude review. Focus on critical issues: bugs, security vulnerabilities, logical errors, data loss risks, performance problems, CLI contract violations, WSDL/API mismatch, and issue-scope gaps. Do NOT nitpick style, naming conventions, minor formatting, or subjective preferences; only flag issues that could break functionality, violate the public CLI contract, or make issue #253 incomplete. |
|
Claude finished @axisrow's task in 2m 42s —— View job Code Review — PR #265 (URL feed detail flags)Scoped to critical issues only (bugs, security, logical errors, CLI contract, WSDL/API mismatch, issue-scope gaps), per the request. VerdictNo blocking issues. The change correctly implements Checks performed
Findings1. No critical bugs. The helper 2. WSDL parity is internally consistent. Audit counts shift 3. 4. 5. Minor (non-blocking) observations — flagged only because the request asks for any CLI-contract / API-mismatch surfaces, not as required changes:
6. Issue #253 scope. PR body and the audit both indicate ConclusionPR is ready w.r.t. the stated scope. No bugs, no security regressions, no data-loss risks, no WSDL mismatch, no CLI contract violations identified. Issue #253 (UrlFeed details) is fully addressed; |
There was a problem hiding this comment.
Pull request overview
This PR extends the feeds add/feeds update CLI surface to cover additional UrlFeed fields required for WSDL parity, while explicitly deferring FileFeed upload/base64 handling to follow-up issue #264.
Changes:
- Add typed flags for
UrlFeed.RemoveUtmTags,UrlFeed.Login, andUrlFeed.Passwordindirect feeds add/update. - Update dry-run tests and WSDL parity gate/audit classifications to mark these
UrlFeedfields as supported andFileFeedas a tracked follow-up. - Refresh README single-line examples to include the new URL feed detail flags.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
direct_cli/commands/feeds.py |
Adds new URL feed detail flags and builds UrlFeed payloads via a helper. |
tests/test_dry_run.py |
Adds dry-run coverage for the new URL feed detail flags and updates the “missing fields” error expectation. |
tests/test_wsdl_parity_gate.py |
Maps new WSDL optional paths to typed flags and records FileFeed as a deferred follow-up (#264). |
tests/WSDL_OPTIONAL_FIELD_AUDIT.md |
Updates audit counts and reclassifies UrlFeed.* as supported; links FileFeed.* to #264. |
README.md |
Updates one-line examples for feeds add/update to demonstrate the new flags. |
Comments suppressed due to low confidence (5)
direct_cli/commands/feeds.py:101
--loginhere meansUrlFeed.Login, butdirectalready has a top-level--loginoption for the Direct client login (seedirect_cli/cli.py). Reusing the same flag name with a different meaning is easy to misread in scripts/docs; consider renaming to something explicit like--url-login/--feed-login(and updating parity mappings/tests accordingly).
@click.option("--login", help="UrlFeed.Login for protected feed URL")
direct_cli/commands/feeds.py:102
- Accepting
--passwordas a plain command-line option makes the credential visible in shell history and process listings, and--dry-runwill print it verbatim. Consider supporting a safer input path (e.g., envvar-backed option and/orprompt=True, hide_input=True) and redacting the password in dry-run output by default.
@click.option("--password", help="UrlFeed.Password for protected feed URL")
direct_cli/commands/feeds.py:153
- Same
--loginambiguity as infeeds add: this flag name collides with the rootdirect --login(client login) but has a different meaning (UrlFeed.Login). Consider renaming to an explicit flag name to avoid accidental misuse.
@click.option("--login", help="UrlFeed.Login for protected feed URL")
direct_cli/commands/feeds.py:154
- Same concern as in
feeds add:--passwordis a secret and is exposed via shell history /ps, and will be echoed in--dry-runoutput. Consider envvar/prompt+hide_input support and redaction in dry-run output.
@click.option("--password", help="UrlFeed.Password for protected feed URL")
README.md:1235
- Same as the English example: showing
--password FEED_PASSWORDin docs encourages passing secrets via CLI args (visible in history/process list). Consider switching the example to an env var or omitting the password.
direct feeds add --name "Фид A" --url "https://example.com/feed.xml" --business-type RETAIL --remove-utm-tags YES --login feedbot --password FEED_PASSWORD --dry-run
| if login: | ||
| payload["Login"] = login | ||
| if password: |
| direct creatives add --video-id video-id --dry-run | ||
| direct feeds add --name "Feed A" --url "https://example.com/feed.xml" --business-type RETAIL --dry-run | ||
| direct feeds update --id 18 --name "Feed A v2" --url "https://example.com/feed-v2.xml" --dry-run | ||
| direct feeds add --name "Feed A" --url "https://example.com/feed.xml" --business-type RETAIL --remove-utm-tags YES --login feedbot --password FEED_PASSWORD --dry-run |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0ad395bc5d
ℹ️ 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 login: | ||
| payload["Login"] = login | ||
| if password: | ||
| payload["Password"] = password |
There was a problem hiding this comment.
Add explicit nulling path for UrlFeed credentials
The new --login/--password support for feeds update cannot clear previously set credentials even though UrlFeedUpdate.Login and UrlFeedUpdate.Password are nillable in the Feeds API/WSDL. In _url_feed_payload, falsy values are dropped, so there is no CLI path that emits Login: null/Password: null (or equivalent clear semantics); users who need to remove auth after switching a feed to public access are stuck with stale credentials. Please add clear flags (for example --clear-login / --clear-password) or another explicit null mechanism so update parity with the API is complete.
Useful? React with 👍 / 👎.
0ad395b to
bb84815
Compare
|
Addressed review feedback in bb84815: added explicit update-only --clear-login / --clear-password flags that serialize UrlFeed.Login/Password as null, reject conflicting set+clear flags, and removed password usage from README examples. Verification: python3 -m pytest tests/test_dry_run.py -k "feeds and (urlfeed or clear or without_fields)"; 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.\n\n@codex @claude review. Focus on critical issues: bugs, security vulnerabilities, logical errors, data loss risks, performance problems, CLI contract violations, WSDL/API mismatch, and issue-scope gaps. Do NOT nitpick style, naming conventions, minor formatting, or subjective preferences; only flag issues that could break functionality, violate the public CLI contract, or make issue #253 incomplete. |
|
Claude finished @axisrow's task in 2m 13s —— View job Code Review — PR #265 (URL feed detail flags, follow-up commit
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb84815ae6
ℹ️ 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".
| type=click.Choice(_YES_NO, case_sensitive=False), | ||
| help="UrlFeed.RemoveUtmTags: delete UTM tags from feed links, YES or NO.", | ||
| ) | ||
| @click.option("--login", help="UrlFeed.Login for protected feed URL") |
There was a problem hiding this comment.
Rename feed credential --login to avoid root-login collision
direct already defines a global --login for Client-Login (in direct_cli/cli.py), and this commit adds another --login on feeds add/update; with Click parsing, direct feeds update --id 9 --login client_a ... now binds that value to UrlFeed.Login instead of account selection. That turns a previously invalid invocation into a valid but semantically wrong request, which can execute against the default account and update the wrong tenant while also leaking the client login into feed credentials. Use a distinct flag name (for example, --url-login) to keep global account routing unambiguous.
Useful? React with 👍 / 👎.
bb84815 to
7401bb3
Compare
|
Addressed the P1 CLI-contract review in 7401bb3: feed credentials now use --feed-login / --feed-password plus --clear-feed-login / --clear-feed-password, so they no longer collide with global direct --login. Also fixed the quality failure by annotating the UrlFeed payload dict for mypy. Verification: python3 -m pytest tests/test_dry_run.py -k "feeds and (urlfeed or clear or without_fields)"; python3 -m pytest tests/test_wsdl_parity_gate.py; mypy .; python3 -m pytest tests/test_cli.py tests/test_dry_run.py tests/test_wsdl_parity_gate.py.\n\n@codex @claude review. Focus on critical issues: bugs, security vulnerabilities, logical errors, data loss risks, performance problems, CLI contract violations, WSDL/API mismatch, and issue-scope gaps. Do NOT nitpick style, naming conventions, minor formatting, or subjective preferences; only flag issues that could break functionality, violate the public CLI contract, or make issue #253 incomplete. |
|
Claude finished @axisrow's task in 2m 2s —— View job Code Review — PR #265 (follow-up commit
|
|
Codex Review: Didn't find any major issues. 👍 ℹ️ 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\n- add typed feeds add/update flags for UrlFeed.RemoveUtmTags, UrlFeed.Login, and UrlFeed.Password\n- keep FileFeed upload/base64 support out of patch scope and link those WSDL rows to follow-up #264\n- update dry-run tests, WSDL parity audit, and single-line README examples\n\n## Docs\n- Official Yandex Direct Feeds.add: https://yandex.ru/dev/direct/doc/en/feeds/add\n- Official Yandex Direct Feeds.update: https://yandex.ru/dev/direct/doc/en/feeds/update\n\n## Verification\n- python3 -m pytest tests/test_dry_run.py -k "feeds and (urlfeed or without_fields)"\n- python3 -m pytest tests/test_wsdl_parity_gate.py\n- python3 -m pytest tests/test_cli.py tests/test_dry_run.py tests/test_wsdl_parity_gate.py\n\nCloses #253.