Conversation
…v4 codemod Adds a REMOVED_ENUM_VALUES dict and flag_enum_value finding kind to the v3→v4 codemod so adopters see an actionable hint rather than a runtime AttributeError after migration. The hint names both replacement values (pending_start / pending_creatives) and points to valid_actions as the runtime discriminator. https://claude.ai/code/session_01294Agd3ZTguC1drs5Beous
This was referenced May 4, 2026
bokelley
added a commit
that referenced
this pull request
May 4, 2026
…ctivation Per review on #523: - REMOVED_ENUM_VALUES gains the (hint, anchor) tuple shape so findings carry a migration_anchor like REMOVED_TYPES do. - New MIGRATION_v3_to_v4.md § ``MediaBuyStatus.pending_activation`` → split with the cause-to-replacement mapping and a code example, matching the anchor the codemod now emits. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ivation Per review on #523: - REMOVED_ENUM_VALUES gains the (hint, anchor) tuple shape so findings carry a migration_anchor like REMOVED_TYPES do. - New MIGRATION_v3_to_v4.md § ``MediaBuyStatus.pending_activation`` → split with the cause-to-replacement mapping and a code example, matching the anchor the codemod now emits. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
657cc95 to
4f5fade
Compare
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.
Refs #513
Adds
REMOVED_ENUM_VALUESdict and aflag_enum_valuefinding kind to the v3→v4 codemod so adopters migrating from v3.12 see an actionable codemod report entry forMediaBuyStatus.pending_activationrather than a runtimeAttributeError. The hint names both replacement values (pending_start/pending_creatives) and points tovalid_actionson theMediaBuyresponse as the runtime discriminator for which applies at a given call site.Item 2 from #513 (required-field detection for
idempotency_key) is deferred — text-match is not reliable for multi-line constructor calls and**kwargsunpacking; an AST-based pass is the correct architecture for that.What was tested
pytest tests/test_migrate_v3_to_v4.py -v— 35 passed (2 new:test_flags_removed_enum_values,test_enum_value_word_boundary_no_false_positive)ruff check src/adcp/migrate/v3_to_v4.py— cleanmypy src/adcp/migrate/v3_to_v4.py— no errors in changed filePre-PR review
kindfield could useLiteraltype (out of scope)flag_enum_valueas separate kind is correct for JSON consumers; hint is actionable; nit: hint opens redundantly with enum value name already shown in header; no migration_anchor slot (noted, acceptable until migration doc adds a section for it)Session: https://claude.ai/code/session_01294Agd3ZTguC1drs5Beous
Generated by Claude Code