feat(masters): add direct masters add — create Мастер кампаний - #647
Merged
Conversation
axisrow
force-pushed
the
ao/issue-632-masters-add
branch
from
August 1, 2026 16:08
7b4b6ff to
6ac9015
Compare
Step 0 live recon only (per issue #632 plan) — no create_master/masters add code yet, and no campaign was actually created or saved. Documents the "Конверсии и трафик" Мастер кампаний create wizard: one micro-step (landing URL + client-side format validation) followed by a single long form (not a multi-page "Далее" wizard), its required-vs-optional field markers, and open questions blocking implementation until #631 stabilizes. Refs #632, blocked by #631.
Implements the "Конверсии и трафик" Мастер кампаний create flow found by issue #632 step 0 recon (tests/fixtures/masters_wizard_create.html): NOT a multi-page "Далее" wizard as originally assumed, but one micro-step (landing URL, client-side format validation) followed by a single long form terminating in "Запустить кампанию" (launch) or "Сохранить как черновик" (draft). --headline/--text/--region are required CLI-side even though Yandex's wizard auto-generates headlines/texts by scanning the landing page — create_master refuses to silently publish AI-written copy the caller never reviewed, given there is no sandbox or rollback for Мастер кампаний mutations. NOT idempotent (documented in --help/README/ CHANGELOG per the issue's Риски section): a second run creates a second campaign. Classified DANGEROUS in smoke_matrix.py / test_dangerous_commands.sh — no --sandbox equivalent exists. Offline-only: fake Page/Locator unit tests for every private helper plus create_master/CLI wiring; no live save/launch was performed (step 0 recon was read-only per instruction). Closes #632
axisrow
force-pushed
the
ao/issue-632-masters-add
branch
from
August 1, 2026 16:41
6ac9015 to
1e30cef
Compare
Owner
Author
Code review (post-merge)Retroactive review requested by issue #648 (item 3) since PR #647 shipped without a formal review pass. Ran the standard 5-angle review (CLAUDE.md compliance, bug scan, git-blame/history, prior-PR review comments, code-comment compliance) against the diff as merged ( No live issues found. Summary of what the passes surfaced:
No CLAUDE.md violations, no unresolved bugs, no inconsistency between code comments and behavior found in the current state of the code this PR introduced. 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
direct masters add— creates a brand-new "Конверсии и трафик" Мастер кампаний by driving the same create wizard a human uses (Мастер кампаний has no API surface at all, same aslist/get/suspend/resume/update).tests/fixtures/masters_wizard_create.htmland found the create flow is not the multi-page "Далее" wizard the issue originally assumed: one micro-step (landing URL + client-side format validation) followed by a single long form, terminating in two buttons — "Запустить кампанию" (launch) and "Сохранить как черновик" (draft) — instead ofmasters update's single "Сохранить кампанию".--headline/--text/--regionare required (repeat for multiple values), even though Yandex's own wizard auto-generates headlines/texts by scanning the landing page —addrefuses to silently publish AI-written ad copy the caller never reviewed, given there's no sandbox/rollback for Мастер кампаний.--weekly-budgetoptional;--draft/--launch(default--launch) picks the terminal button.--help, README, and CHANGELOG per the issue's "Риски" section.DANGEROUSinsmoke_matrix.py/test_dangerous_commands.sh— no--sandboxequivalent exists for Мастер кампаний mutations.Test plan
pytest tests/test_masters.py -q— 112 tests covering every new private helper (_fill_landing_url,_wait_for_step2,_add_repeating_values,_set_region,_set_weekly_budget_on_create,_click_terminal_button,create_master) plus CLI wiring, all against fake Page/Locator objects (no real browser).pytest -q— full offline suite green (2691 passed; the 62 errors are a pre-existing, unrelated VCR/aiohttp version-mismatch environment issue, not caused by this change).black/flake8clean on all touched files.create_masteris offline-tested only; end-to-end launch/draft behavior against a real account (including where the created campaign's ID can be read from) still needs a live pass with--draftfirst.Closes #632