feat(v4): expose deferred GetKeywordsSuggestion, AdImageAssociation, PayCampaignsByCard (#459)#462
Conversation
…PayCampaignsByCard (#459) Adds typed CLI commands for the functional v4 Live methods that were deferred from the 0.4.0 surface: - v4keywords get-suggestion (GetKeywordsSuggestion, read-only) - v4adimage get/set (AdImageAssociation, Get/Set; no raw --json) - v4finance pay-campaigns-by-card (PayCampaignsByCard, dry-run-only — undocumented + financially sensitive, so the live path stays closed) All v4 Live finance commands now carry an explicit "Not tested against the live API" disclaimer in --help and README. Intentionally NOT exposed (documented in README): - DeleteReport / DeleteOfflineReport — disabled by Yandex (use v5 reports) - PingAPI / PingAPI_X / GetVersion / GetAvailableVersions — diagnostics probes Registries updated: smoke_matrix (SAFE: v4adimage.get, v4keywords.get-suggestion; DANGEROUS: v4adimage.set, v4finance.pay-campaigns-by-card), api_coverage v4 WSDL-exclusions, EXPECTED_COMMANDS. New focused dry-run tests; full suite green (2033 passed). Closes #459 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Diagnostic helper distinguishing a real docs move (clean 404) from a SmartCaptcha IP rate-limit (302→showcaptcha) for the 4 v5 docs URLs that preflight flagged GONE. Manual-only; not wired into CI. Refs #460, #128 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
@claude review. Focus on critical issues: bugs, security vulnerabilities, logical errors, data loss risks, performance problems. 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 53s —— View job Review: PR #462 — v4 deferred methods
No critical bugs, security vulnerabilities, or data-loss risks found. The implementation is consistent with the existing v4 Live patterns and well guarded. Summary below. What holds up well
Minor, non-blocking notes (not critical — flagging for awareness only)
Neither note affects functionality. From a correctness/security/data-loss standpoint this PR is in good shape. |
- v4_contracts.py: update AdImageAssociation note — the method is now exposed as `v4adimage get`/`set` (was "No CLI command is exposed yet"). - probe_drift_urls.sh: document the deliberate exception to the "No URL literals outside the registry" rule (#426) — the script probes candidate paths not yet in the registry, is read-only, and never writes to any docs cache, so it cannot poison it. Both raised as non-blocking notes by the reviewer; no functional change. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
@claude review. Focus on critical issues: bugs, security vulnerabilities, logical errors, data loss risks, performance problems. 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 2m 31s —— View job Review: PR #462 — v4 deferred methods (focused: bugs / security / data-loss / perf)
No critical bugs, security vulnerabilities, or data-loss risks found. This is a clean, well-fenced implementation. Details below. Correctness / safety — holds up
Minor, non-blocking (awareness only — not critical)
From a correctness, security, and data-loss standpoint this PR is in good shape to merge. I was unable to execute the test suite in this environment (pytest invocation not permitted by the sandbox), so I relied on static review — the PR reports the full suite green (2033 passed, 47 skipped). |
A degenerate value like --logins "," made parse_csv_strings return None, which was written as "Logins": null into the request body. Now the key is set only when there are real values, never null/empty. Same guard applied to AdImageHashes/AdIDS/CampaignIDS. Malformed ID lists still raise UsageError loudly (parse_ids rejects them). Raised as a non-blocking note in review of PR #462; added two edge-case tests. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
@claude review. Focus on critical issues: bugs, security vulnerabilities, logical errors, data loss risks, performance problems. 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 25s —— View job Review: PR #462 — v4 deferred methods (focused: bugs / security / data-loss / perf)
No critical bugs, security vulnerabilities, or data-loss risks found. This is the third pass and the implementation has only tightened since the prior reviews. Details below. Correctness / safety — verified
Minor, non-blocking (awareness only)
From a correctness, security, and data-loss standpoint this PR is in good shape to merge. I relied on static review — the PR reports the full suite green (2033 passed, 47 skipped); I was unable to execute pytest in this environment. |
|
Спасибо за третий проход. Триаж двух non-blocking замечаний:
Ни одного |
Summary
Implements the functional deferred v4 Live methods from #459 as typed CLI commands (no raw
--json), with focused dry-run tests.GetKeywordsSuggestionv4keywords get-suggestion --keyword …{"Keywords":[…]}AdImageAssociationv4adimage get/v4adimage set--association AD_ID[=HASH](attach/detach)PayCampaignsByCardv4finance pay-campaigns-by-cardFinance disclaimer
All v4 Live finance commands now carry an explicit "Not tested against the live API" warning in
--helpand in the README V4 Live Finance section (per maintainer request).Intentionally NOT exposed (documented in README)
DeleteReport/DeleteOfflineReport— disabled by Yandex (docs list them under «Отключенные методы» / «Метод отключен. Используйте API версии 5»); use the v5 reports API. These were in the issue's mechanical method list but their contracts (docs-verified 2026-05-28) mark them disabled.PingAPI/PingAPI_X/GetVersion/GetAvailableVersions— diagnostics/version probes, no documented request shape.Registries / gates updated
smoke_matrix: SAFE +=v4adimage.get,v4keywords.get-suggestion; DANGEROUS +=v4adimage.set,v4finance.pay-campaigns-by-cardapi_coverage_payloadsv4 WSDL-exclusions;EXPECTED_COMMANDSTesting
tests/test_v4keywords.py,tests/test_v4adimage.py, pluspay-campaigns-by-cardcases intests/test_v4finance_money.pyruff check .cleanCloses #459
🤖 Generated with Claude Code