feat(migrate): flag MediaBuyStatus.pending_activation split#541
Closed
feat(migrate): flag MediaBuyStatus.pending_activation split#541
Conversation
The pending_activation enum value was split in 4.0 into pending_start (schedule-future buys) and pending_creatives (waiting on creative approval). Adopters hit this only at runtime — the codemod now flags every reference with the per-call-site decision hint and a migration- guide anchor. The replacement is intentionally per-site rather than a blanket auto-rewrite — the spec split was driven by adopters needing distinct behaviour for the two cases, so a uniform substitution would silently collapse a real branching decision. Adds MIGRATION_v3_to_v4.md § ``MediaBuyStatus.pending_activation`` → split with the cause-to-replacement mapping and a code example. Required-field detection (the second half of issue #513) needs schema diffing across two adcp versions and isn't shipped here — left as the follow-up the issue identified. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Author
Contributor
Author
|
Understood — deferring to #523. Nothing further needed here. Generated by Claude Code |
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.
Closes part of #513.
Summary
The codemod now flags every
MediaBuyStatus.pending_activationreference and points adopters at the per-call-site decision (pending_startvspending_creatives).Also adds the corresponding migration-guide section with the cause-to-replacement table and a code example.
Why
Salesagent feedback (issue #513):
pending_activationwas removed in 4.x and split based on cause (schedule-future →pending_start; waiting on creatives →pending_creatives). Adopters hit it as a runtimeAttributeErrorafter the import cascade was otherwise clean. The codemod's static finding count missed this — the new flagger surfaces it pre-runtime.What this does NOT do (deferred)
The second half of issue #513 — codemod detection of fields that became required (e.g.
idempotency_keyonCreateMediaBuyRequest) — needs schema diffing across two adcp versions. That's a bigger lift and stays as the follow-up the issue identified.Test plan
tests/test_migrate_v3_to_v4.py:pending_activationreference is flagged with both replacement names in the hint and the migration anchor.pending_activation_v2,.pending_activation_countruff,mypy, all pre-commit hooks pass🤖 Generated with Claude Code